[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: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot |
Date: |
Tue, 27 Sep 2016 23:40:45 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #11, bug #49130 (project octave):
In "direct" mode the clamping is done to the size of the colormap (LUT)
itself. Something like this is correct.
if (strcmp ("mode", "direct"))
cmin = 1;
cmax = numel (colormap ());
cdata(cdata < cmin) = cmin;
cdata(cdata > cmax) = cmax;
else # scaled data
clim = caxis ();
cmin = clim(1);
cmax = clim(2);
cdata(cdata < cmin) = cmin;
cdata(cdata > cmax) = cmax;
endif
For "direct", the example above is correct for floating point variables
(double or single). For the integer type variables (uint8, int8, ...) the
value '0' is supposed to map to the first color in the colormap. This may
have already been taken care of by the time you reach this point in the
rendering code.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49130>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, (continued)
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Mike Miller, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/19
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/20
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/20
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/20
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/23
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/27
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot,
Rik <=
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/27
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/27
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/28
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/30
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/30
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Dan Sebald, 2016/09/30
- [Octave-bug-tracker] [bug #49130] uint8 images are not shown correctly by imshow with gnuplot, Rik, 2016/09/30