Lately I have noticed what I believe is an error in the function getframe(). When an image is displayed in a figure of the same size with the axis invisible, I would expect [x,map]=getframe to return an array which is the same as the 'Cdata' property of the image. However, getframe() does not return what I expect.
Perhaps as example will better illustrate what I mean: test=reshape(round(linspace(1,256,100*100)),100,100); testmap=gray(256); fh=figure('position',[100 100 100 100]); axes('position',[0 0 1 1],'units','normal'); colormap(testmap); ih=image(test); set(gca,'visible','off');
The error is not even constant. If you display another image in a different figure before doing the test above, you will get a different error. For example, try the test above and then display the demo image gatlin: load gatlin figure image(X) colormap(map) and then repeat the test above. I get a different answer.
Sure the error is small, but why is it there an error at all? I am running Matlab 4.2c on a Sun.