Hi Mark,

On 12/14/06, Mark Stephens <[EMAIL PROTECTED]> wrote:
I have some bitmapped images of characters I scale down and draw onto
a Graphics2D object. I am losing detail and the characters are hard to
read.

There is no perfect solution, but here are some suggestions:

1) If you are not already, use one of the interpolation
RenderingHints, e.g. VALUE_INTERPOLATION_BICUBIC

2) Instead of scaling in one go, do multiple passes over the image,
scaling down a little bit each time. This should eliminate some of the
aliasing.

3) Use Image.getScaledInstance using the SCALE_AREA_AVERAGING hint. Be
aware that this is deprecated/discouraged/something similarly
negative, and quite slow.

4) Vote for this bug to get better downscaling interpolation methods
added to the JDK:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500894
and then wait a few years.

Chris

===========================================================================
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".

Reply via email to