Hi Jakub,

This is a known issue.  See:
http://developer.java.sun.com/developer/bugParade/bugs/4696285.html

One workaround seems to be using 8-bit components and/or 3 band pixel
data.  We will try to resolve this issue in the near future.

Thanks,
Chris

Jakub Jabłoński wrote:
> Hello
>
> I'm doing in sequence:
> Fileload operation
> BandSelect operation
> drawRenderedImage in JFrame
>
> The problem is that when AffineTransform given in drawRenderedImage is
> not an identity transform, I get the exception, depending on the type
> of the image:
>
> D:\java\andrea>java TestFrame a_t.tif 2 2
> java.awt.image.ImagingOpException: Unable to transform src image
>         at java.awt.image.AffineTransformOp.filter(AffineTransformOp.java:262)
>         at sun.java2d.pipe.DrawImage.transformImage(DrawImage.java:273)
>         at sun.java2d.pipe.DrawImage.transformImage(DrawImage.java:784)
>         at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2899)
>         at sun.java2d.SunGraphics2D.drawRenderedImage(SunGraphics2D.java:2410)
>         at TestFrame.paint(TestFrame.java:77)
> ...
>
>
> D:\java\andrea>java TestFrame a_final.tif 2 2
> java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.System.arraycopy(Native Method)
>         at javax.media.jai.PlanarImage.cobbleUShort(PlanarImage.java:2987)
>         at javax.media.jai.PlanarImage.getData(PlanarImage.java:2073)
>         at javax.media.jai.RenderedOp.getData(RenderedOp.java:2232)
>         at sun.java2d.SunGraphics2D.drawRenderedImage(SunGraphics2D.java:2366)
>         at TestFrame.paint(TestFrame.java:77)
> ...
>
>
> Moreover if I try the same with 3-band 16 bit image and with identity
> transform, I get this exception:
>
> D:\java\andrea>java TestFrame a_final.tif 1 1
> java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.System.arraycopy(Native Method)
>         at javax.media.jai.PlanarImage.cobbleUShort(PlanarImage.java:2987)
>         at javax.media.jai.PlanarImage.getData(PlanarImage.java:2073)
>         at javax.media.jai.RenderedOp.getData(RenderedOp.java:2232)
>         at sun.java2d.SunGraphics2D.drawRenderedImage(SunGraphics2D.java:2366)
>         at TestFrame.paint(TestFrame.java:77)
> ...
>
>
> a_t.tif is 1-band grayscale 16 bits image
> a_final.tif is 3-band RGB 16 bits per band image
>
> If I convert images to 8 bit, the last problem is solved, but not the
> first two.
>
> If I skip the BandSelect operation, there is no problem.
>
> If I save the image instead of displaying it (using filestore) and
> than load it and display scaled there is no problem either.
>
> I can send the images I tested if it is necessary, maybe there is
> something wrong with them.
>
> Any ideas?
>
> Regards,
> Jakub Jablonski


--
Chris Campbell                     408-276-6429
[EMAIL PROTECTED]       x16429
Sun Microsystems, Java 2D          USCA22-212

===========================================================================
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