Re: Re: Jgen-devel digest, Vol 1 #326 - 2 msgs

Dmitry Skavish <[email protected]> Fri, 10 Oct 2003 12:24:34 -0400
Newsgroups gmane.comp.java.jgenerator.devel
Organization JZox, Inc.
Message-ID <[email protected]>
> This code below for turning an Image into a BufferedImage
> works for me in another application.

Yeah, but I don't think there is need to convert Image to BufferedImage here. The scaling 
can be done another way. For example there is snipped from my other project:

     BufferedImage image = ....
     BufferedImage scaledImage = ....

     AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY);
     RenderingHints hints = new RenderingHints(RenderingHints.KEY_INTERPOLATION, 
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
     AffineTransformOp op = new AffineTransformOp(xform, hints);
     scaledImage = op.filter(image, null);

-- 
Dmitry Skavish



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php