Hi Guys,

Sorry for the omission.  Here is my platform:

Windows XP Service Pack 2
JDK 1.5.0_03
JAI  1.1.2_01

However I have seen this problem with JDK 1.4.2 as well.

Doing the same operation in JAI with the same images has always
worked flawlessly with Bicubic, Bicubic2, Bilinear, and Nearest
neighbor interpolation algorithms.

Thanks,
Sumit

On Jun 14, 2005, at 8:26 AM, Dmitri Trembovetski wrote:


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

Reply via email to