imshow/image colormap problems in 3.0.1
Michael G. Ross
mgross at MIT.EDU
Wed Apr 30 11:04:47 CDT 2008
I'm using the Octave-Forge packages for Octave 3.0.1 and Gnuplot 4.2.3
on Mac OS X 10.5.2
I read a truecolor PNG image in with imread, and if I display it using
image or imshow it appears in Gnuplot but the colormap is off -
everything is very white as if very small RGB values are being treated
as the maxes. However if I display it with imagesc it appears fine.
If I specify imagesc(img, [0 255]) I also seem to get the correct
scaling (reducing image brightness reduces its display brightness in
Gnuplot).
The main difference appears to be that imagesc(img) calls
set(ret, 'cdatamapping', 'scaled'), which puts the colors back in the
displayable range. Specifying the scale ranges calls set(ax, 'clim',
[0 255]).
According to the Matlab docs, the cdatamapping property should not
affect a truecolor image, so image/imshow should not have to set these
properties - but something appears to be going wrong.
----
Michael Ross
mgross at mit.edu
More information about the Bug-octave
mailing list