[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly b

From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot
Date: Fri, 30 Sep 2016 17:36:34 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #17, bug #49130 (project octave):

I'm not seeing anything hang here.  What version of gnuplot are you using?

There are some other recent changes that might have influence:

* scripts/general/inputParser.m(parse) : reset Unmatched and UsingDefaults
  a new parse.


"double->uint8->double to achieve clamping of RGB values.  Keep cdata as

Just noting that in one case there is:

    cdata = double (cdata);
    cdata = 255 * (cdata - clim(1)) / (clim(2)-clim(1));

and in another:

      cdata = double (cdata);
      clim = double (clim);
      cdata = 1 + fix (cmap_sz * (cdata - clim(1)) / (clim(2) - clim(1)));

for which the difference is "clim" cast to double.  It's probably a low
likelihood of someone setting the clim to uint8

>> cdata = [1 10];
>> clim = uint8([0 10]);
>> (cdata - clim(1)) / (clim(2) - clim(1))
>> class ( (cdata - clim(1)) / (clim(2) - clim(1)) )
ans = uint8
>> class (cdata)
ans = double

More importantly, is to make the two consistent.

I've tried experimenting to see if casting clim to double is necessary, but I
can seem to set(gca,'clim') to make it stick.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]