On 5 November 2012 07:05, Lucas Sá <lucas...@gmail.com> wrote: > Today I noticed that the image package treats indexed images differently in > functions within the module. > > Using [X, map] = imread will give me a matrix X with values from 0 to n-1, > while all other image package functions expect index mapping from 1 to n, > such as imshow, ind2rgb, ind2gray. > > This fact makes the execution of a simple imshow('some_file.gif') to show > something different from the original image. imshow(X+1, map) would show it > fine as well. > > The function ind2rgb, for example, even has a validation for indices less > than 1 in line 43 of ind2rgb.m: > > ## Check if X is an indexed image. > if (ndims (x) != 2 || any (x(:) != fix (x(:))) || min (x(:)) < 1) > error ("ind2rgb: X must be an indexed image"); > > > Is it normal that I am receving 0 values in X matrix? I am using octave > 3.6.2 and graphicsmagick 1.3.16.
Hi Lucas imshow, ind2rgb and ind2gray do not belong to the image package, they belong to octave core. I'm CC'ing the octave core mailing list. If you believe this to be a bug, please report at at http://savannah.gnu.org/bugs/?func=additem&group=octave Carnë ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev