Hi,
I need to resize some images.
I have written a small java program that:
1) loads an image
2) creates a BufferedImage of required destination size
3) uses drawImage(Image img, int x, int y, int width, int height,
ImageObserver observer) to draw and scale the image
4) saves out the bufferedImage using the codec classes.
My problem is that the drawImage method doesn't resize the image very
well, creating moire effects and so on.
Is there a better way to resize an image, maybe one that averages out
the colour or pixels instead of chopping out every nth pixel of the
source?
Also is the drawImage(Image img, int x, int y, int width, int height,
ImageObserver observer) the best way to do this?
Should I be looking at using an AffineTransform or a filter?
Cheers,
--
Nigel
===========================================================================
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".