I also had image scaling problems using AffineTransform's except I wasn't
getting an exception. My problem was the image display was 'corrupt'. Sun
were aware of this problem and suggested using drawImage to do the scaling.
I also had strange problems using this but I haven't verified exactly what's
going on. I'll post my findings when I have them.

In short, it seems image scaling is 'a bit flakey' in places :(

mick

Herbert Meisenkaiser wrote:

> Hi !
>
> I have trouble with the scaling in Graphics2D ...
> When i am trying
>
>    public void paintComponent ( Graphics graphics )
>    {
>       super.paintComponent ( graphics );
>
>       ((Graphics2D)graphics).scale (2.0D,2.0D);
>       if (currentBufferedImage != null) ((Graphics2D)graphics).drawImage
>                                         ( currentBufferedImage, 0,0,null
> );
>    }
>
> i get a
>
> java.awt.image.ImagingOpException : Unable to transform src image
>
> ARGH!!!
> This only happens with x.0 Scalingfactors > 1.0 !!!
> When i try 1.9999 everything works! And with an AffineTransform
> the same thing happens.
> What is wrong? Is this a known bug?
> How can i zoom a BufferedImage instead?
>
> Thanks!  TRI
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 2D Home Page: http://java.sun.com/products/java-media/2D/

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/

Reply via email to