Hi Sumit,
it'd help if you point out the version of jdk you're using and the
platform you run it on..
Thanks,
Dmitri
Java2D Team
On Tue, Jun 14, 2005 at 08:03:43AM -0700, sumit shah wrote:
> Dear Java2D Users:
>
> I am trying an affine transformation operation that works
> fantastically when using JAI.create methods. However I am trying to
> do the same thing using the Java2D methods. Unfortunately it works
> only for AffineTransformOp.TYPE_NEARESTNEIGHBOR, but does not work
> well when
> using AffineTransformOp.TYPE_BICUBIC. The image becomes
> significantly brighter when using bicubic interpolation (as well as
> for bilinear) I've attached two test images where it works and
> doesn't work as well as some test code.
>
> Does anyone out there have any ideas?
>
> Thanks so much.
> Sumit
>
>
> try {
> BufferedImage b = ImageIO.read(new File("works.png"));
> AffineTransform at = new AffineTransform();
> at.setToScale(5.3, 5.3);
> AffineTransformOp aop = new AffineTransformOp(at,
> AffineTransformOp.TYPE_BICUBIC);
> b = aop.filter(b, null);
> ImageIO.write(b, "png", new File("works1.png"));
>
>
> b = ImageIO.read(new File("doesntwork.png"));
> b = aop.filter(b, null);
> ImageIO.write(b, "png", new File("doesntwork1.png"));
>
> } catch (Exception e) {
> e.printStackTrace();
> }
>
>
>
> ===========================================================================
> 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".