Don't know what the problem is, but here's some quick and
dirty ways to scale and crop images simply using the
drawImage method:

http://www.javaworld.com/javaworld/javatips/jw-javatip32.html

Hope this helps,

--Andy

> ----------
> From:         Herbert Meisenkaiser[SMTP:[EMAIL PROTECTED]]
> Sent:         Tuesday, February 16, 1999 10:46 AM
> To:   [EMAIL PROTECTED]
> Subject:      [java2d] BufferedImage + scale
> 
> 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