Re: [JAVA2D] Any way to make ANTIALIAS only use one color

2008-08-04 Thread Harald Kuhr

Once again, this time to the list.. ;-)

On 2. aug.. 2008, at 00.24, Jim Graham wrote:

Since it doesn't seem to be working well with your particular  
colormap, my suggestion is to not use Antialiasing - or to come up  
with a better selection of colors in your colormap that provide  
enough intermediate colors for the AA algorithm to do its job...


One thing you could try, is creating an intermediate image in full RGB  
(copy the indexed image first), then render text with antialiasing to  
the intermediate image. Then either create a new indexed image from  
that (might end up with a different color map), or paint the image  
back to the original indexed image. It usually gives a better result.



--
Harald K

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


Re: [JAVA2D] Any way to make ANTIALIAS only use one color

2008-08-01 Thread Jim Graham
You shouldn't be using Antialiased rendering on an Indexed image. 
Antialiasing requires the ability to choose a color that is N% of the 
way from the foreground to the background and store that color, but that 
color may not be in the colormap of an Indexed image.


One could argue that we should have just ignored the AA hint for Indexed 
images since we may not find the intermediate colors that we need for 
the effect, but some images may actually have enough of the intermediate 
colors that we can render a nice effect even just restricting ourselves 
to the colors available in the colormap.  So, we left it in and let the 
developer choose whether or not it is working well for their situation 
(which depends on the colormap that they are using).


Since it doesn't seem to be working well with your particular colormap, 
my suggestion is to not use Antialiasing - or to come up with a better 
selection of colors in your colormap that provide enough intermediate 
colors for the AA algorithm to do its job...


...jim

[EMAIL PROTECTED] wrote:

If I draw into an Indexed bitmap, it seems that with antialias on it uses some kind of 
change color on edges algorithm. I am writing with one color, but the new 
pixels that antialiasing adds are not always the same color. I need to find a way to turn 
this off, and force it to use the same color.
[Message sent by forum member 'keith198' (keith198)]

http://forums.java.net/jive/thread.jspa?messageID=290418

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.


[JAVA2D] Any way to make ANTIALIAS only use one color

2008-07-30 Thread java2d
If I draw into an Indexed bitmap, it seems that with antialias on it uses some 
kind of change color on edges algorithm. I am writing with one color, but the 
new pixels that antialiasing adds are not always the same color. I need to find 
a way to turn this off, and force it to use the same color.
[Message sent by forum member 'keith198' (keith198)]

http://forums.java.net/jive/thread.jspa?messageID=290418

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.