>>>>> "JI" == Jun Inamori <[EMAIL PROTECTED]> writes:
JI> 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. JI> Thank you for your kind reply. In these days, I was thinking: JI> What is the "Good color palette" ? JI> I installed GIMP (some image manipulation tool, which is available JI> at http://www.gimp.org ). While I'm viewing the indexed image, JI> GIMP can pop up another window for color palette for it. JI> As for the indexed PNG generated by: new BufferedImage(w, h, JI> BufferedImage.TYPE_BYTE_INDEXED) the same color palette is always JI> shown. But, when I convert the RGB-PNG to the indexed one by JI> GIMP, the different color palette is shown for each image. For JI> example, if the image consists of the only 2 colors, the color JI> palette has the only 2 colors too. GIMP seems to create "optimal JI> color palette" for each image while converting RBG to INDEXED. I JI> guess GIMP picks up all the available colors from the original JI> RGB-PNG, and creates the color cube only for them. JI> I reached the conclusion that I'll need to find the same way as JI> GIMP. Correct GIMP creates palette that adapts to the contents of the image. There are many ways of doing this, I don't know what method GIMP uses but it is probably a pretty good one, the one I referenced earlier is also pretty good and very standard. >> 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. JI> Thank you for your information. I ran into: JI> http://www.imagemagick.org There is the Java interface, JMagick, JI> by which Java program can use this useful library. Because JI> ImageMagick is written in C, this Java interface depends on JNI. JI> I'd like to try it personally. But, I think that Batik API should JI> be written only in Java. What do you think? Yes, I think it would be a mistake to include a JNI module just to do indexed image output. However for private use it may be extremely useful. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]