[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49137] some grayscale images are displayed ba
From: |
Carnë Draug |
Subject: |
[Octave-bug-tracker] [bug #49137] some grayscale images are displayed badly |
Date: |
Tue, 20 Sep 2016 14:14:12 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #2, bug #49137 (project octave):
This are two different issues. One of them is a bug:
1. call imshow with a filename
This is a bug, and the problem ins that imshow does:
## Get the image.
if (ischar (im))
[im, map] = imread (im);
indexed = true;
colormap (map);
endif
but that's now how imread works. If the image is not indexed, then map is
empty. This should be something like:
## Get the image.
if (ischar (im))
[im, map] = imread (im);
if (isempty (map))
indexed = false;
else
indexed = true;
colormap (map);
endif
endif
2. call image instead of imshow.
The call to subplot is irrelavant here. I don't think this is a bug. image()
is not the function to display an image, it is meant to display a matrix as if
it was a figure and needs a colormap. Because there is no colormap, it uses
the default colormap which has only 64 indices. Because all values are higher
than 64, then all pixels show up "saturated" (yellow in 4.1, red in 4.0)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49137>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/