Dear Thomas, > A good color palette will put less pressure on the > dithering function, so given a good palette you will > get a significantly better image given the same > dithering function. The exact difference depends > on the image.
Thank you for your kind reply. In these days, I was thinking: What is the "Good color palette" ? I installed GIMP (some image manipulation tool, which is available at http://www.gimp.org ). While I'm viewing the indexed image, GIMP can pop up another window for color palette for it. As for the indexed PNG generated by: new BufferedImage(w, h, BufferedImage.TYPE_BYTE_INDEXED) the same color palette is always shown. But, when I convert the RGB-PNG to the indexed one by GIMP, the different color palette is shown for each image. For example, if the image consists of the only 2 colors, the color palette has the only 2 colors too. GIMP seems to create "optimal color palette" for each image while converting RBG to INDEXED. I guess GIMP picks up all the available colors from the original RGB-PNG, and creates the color cube only for them. I reached the conclusion that I'll need to find the same way as GIMP. > I'll also remind you that there are a number of C > programs that will palettize images in the manner I > describe so if a two step processes is acceptable you > could use a package like Image Magik (SP?) > to go from our 24bit PNG to a 4 or 8 bit PNG. Thank you for your information. I ran into: http://www.imagemagick.org There is the Java interface, JMagick, by which Java program can use this useful library. Because ImageMagick is written in C, this Java interface depends on JNI. I'd like to try it personally. But, I think that Batik API should be written only in Java. What do you think? Happy Java programming! ------------------------ Jun Inamori OOP-Reserch E-mail: [EMAIL PROTECTED] URL: http://www.oop-reserch.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]