Hello,

I have discovered a bad bug in IndexColorModel in Java 2.  Basically, if
you create an IndexColorModel of 2 bytes per pixel, and a size of 4, the
color model is screwed up and your images can have reversed colors or
stripes.  The workaround is to convert your byte arrays so that you can
use 5 bytes per pixel or more.

Attached is a simple testcase that displays a four color block image
correctly in JDK 1.1.x and incorrectly in Java 2, using a
IndexColorModel of 2 bytes per pixel.  I will also report this on the
Bug Parade.

Regards,
David

--
***************************************
David Whiteman
Applied Reasoning
whiteman AT AppliedReasoning DOT com
ICQ# 12178974
http://www.geocities.com/Heartland/3261
***************************************

TestImageColorModel.java

Reply via email to