Actually, when I change it to actual bits, and run it with some of my SVGs, it messes 
up some colors. I did some experiment, it seems work only with 8 bit. Is it because 
the lines above use 0xFF as mask for r,g,b arrays?
Sorry, I have been too busy on other thing to check in my changes yet. 
Haitao 

-----Original Message-----
From: Thomas E Deweese [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 11:05 AM
To: Jun Inamori
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [RE] Question about IndexImage


>>>>> "JI" == Jun Inamori <[EMAIL PROTECTED]> writes:

JI> Hi,

JI> Congratulations for the release of Version 1.5 Beta 4!  By the
JI> way, while I looked into the source of:
JI> org/apache/batik/ext/awt/image/rendered/IndexImage.java I had the
JI> small question.  Within its "getIndexedImage" method, there is a
JI> line of:

JI>    IndexColorModel model=new IndexColorModel(4,256,r,g,b);

JI> But, I think the length of byte[] (which are passed as the last 3
JI> parameters) does not always equal to 256.  So, the line below may
JI> be safe:

JI>    IndexColorModel model=new IndexColorModel(4,nCubes,r,g,b);

       Yes, good point, and the '4' should really be the number of bits.
I'll check in this fix.


JI> Happy Java programming!  ------- Jun Inamori OOP-Reserch E-mail:
JI> [EMAIL PROTECTED] URL: http://www.oop-reserch.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to