The colormap seems to get messed up when trying to change the contrast
or brigtness of an image. You can do this pixel by pixel but it becomes
extremely slow. To reproduce the problem, save the attached test case and
run:
%java MouseColormap2 surfsunset.gif
Then either drag the mouse left or right over the image. The desired behavior
is to have the image get darker or lighter. Instead, you will notice the
colormap gets messed up. It almost seems like their is some bug where
the sign bit of a byte is not checked and you get some rap around as a result.
or brigtness of an image. You can do this pixel by pixel but it becomes
extremely slow. To reproduce the problem, save the attached test case and
run:
%java MouseColormap2 surfsunset.gif
Then either drag the mouse left or right over the image. The desired behavior
is to have the image get darker or lighter. Instead, you will notice the
colormap gets messed up. It almost seems like their is some bug where
the sign bit of a byte is not checked and you get some rap around as a result.