From what I've seen, only gray scale and color palettes (i.e.,
"colormap") currently work in Octave. To show a color image, you need
independent primary color components, e.g., RGB. So first, you can't use
X = imread('testimage.jpg');
because X can't have RGB. (Unless it were a 3 dimensional matrix,
which I think it isn't.) So you need something like the RGB variant:
[r,g,b]= imread( fname );
Then you can do an
imshow(r,g,b);
But, currently here is what imshow() does for the RGB
elseif (nargin == 3)
[a1, a2] = rgb2ind (a1, a2, a3);
colormap (a2);
endif
i.e., converts to an indexed image. I believe in general that can only
be an approximation.
Dan