dcsimg
TYPE_BYTE_INDEXED with ANTIALISING causes some colors shading in JDK 1.4
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Steve_Hipp
Posted On:   Wednesday, March 12, 2003 11:11 AM

Creating Graphics2D object from a BufferedImage of type BufferedImage.TYPE_BYTE_INDEXED (for gif encoding) and setting hint to turn on antialiasing ( RenderingHints.KEY_ANTIALIASING ) causes some colors to become "shaded" including the white background. This started happening after upgrading from JDK 1.3 to 1.4.1 and it can even be seen in the arcs_curves sample of the demo: jdkdemojfcJava2DJava2Demo.html Drawing the same image without anti-aliasing or using TYPE_INT_RGB does not distort the colors. With the limited color pallette of INDEXED I expect color degredation around the curves that are anti-aliased but this is happening in entire sections of the drawing and even when there are no curves to anti-a   More>>

Creating Graphics2D object from a BufferedImage of type
BufferedImage.TYPE_BYTE_INDEXED (for gif encoding) and setting hint to turn on antialiasing ( RenderingHints.KEY_ANTIALIASING ) causes some colors to become "shaded" including the white background. This started happening after upgrading from JDK 1.3 to 1.4.1 and it can even be seen in the arcs_curves sample of the demo:

jdkdemojfcJava2DJava2Demo.html

Drawing the same image without anti-aliasing or using TYPE_INT_RGB does not distort the colors. With the limited color pallette of INDEXED I expect color degredation around the curves that are anti-aliased but this is happening in entire sections of the drawing and even when there are no curves to anti-alias and it it not just around. Any ideas on why this is happening and why it started in JDK 1.4?


thanks....shipp    <<Less
About | Sitemap | Contact