|Home -> JCNIX -> Example: ImageTest|
[If your browser is broken, try: ImageTest.jpg]
The ImageTest.java code can be compiled and run both under libgcj/jcnix and the Sun JDK. The screenshot above shows ImageTest run on a display of depth 24 (true color), under libgcj/jcnix on the left, and under JDK 1.2 on the right.
[If your browser is broken, try: ImageTest_8bit.png]
What happens under pseudo color is interesting. My IndexColorModel code doesn't do dithering, and image quality (left window) is obviously suffering from that. The Sun runtime (right window) doesn't paint the background image for some reason. I'm not sure what causes this, but I don't think I'll be replicating that (mis)feature in my implementation. However, the quality of the Sun image is much better due to dithering.
If anyone has any references to papers on doing deterministic dithering using arbitrary palettes (no color cubes), I'd like to hear about them.