Re: Re: Jgen-devel digest, Vol 1 #326 - 2 msgs
Dave Patton <[email protected]> 10 Oct 2003 10:24:58 -0700
| Newsgroups | gmane.comp.java.jgenerator.devel |
|---|---|
| Message-ID | <[email protected]> |
Does this work for all image types (PNG, GIF, and JPG)? On Fri, 2003-10-10 at 09:24, Dmitry Skavish wrote: > > 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); ------------------------------------------------------- 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