[JAVA2D] Calculate new image width and image height

2006-09-15 Thread java2d
I'm working on an application that reads a image from file, applies AffineTransform including scale, shear and rotate parameters and then saves it to another image file. But the new image is lost some when I keep it the same size as the original image. Question: Is there any ways to calculate

Re: [JAVA2D] Calculate new image width and image height

2006-09-15 Thread java2d
I'd suggest to try getBounds2D() method of the AffineTransformOp. It calculates the bounding box of the transformed destination. Also, the method createCompatibleDestImage(src, destCM) could be helpful: it creates destination image of correct size. Thanks, Andrew [Message sent by forum member

Re: [JAVA2D] Calculate new image width and image height

2006-09-15 Thread Nidel, Mike
If you just want to know the size, you could create a Rectangle containing the bounds of the original image and call AffineTransform.createTransformedShape() on the Rectangle. Then call getBounds() or getBounds2d() on the resulting Shape. -Original Message- From: Discussion list for

Re: [JAVA2D] Rendering using BufferStrategy with Swing Components

2006-09-15 Thread Chris Campbell
Hi Mark, On Sep 13, 2006, at 7:40 PM, [EMAIL PROTECTED] wrote: Hi all, I am currently trying to modify an application which displays an image with various Java2D primitives rendered over it in the middle of a JFrame, with various Swing components around the edges of the JFrame (a JMenuBar and

Re: [JAVA2D] Calculate new image width and image height

2006-09-15 Thread java2d
Thanks very much for your help, Andrew. Both work and I'd prefer the second one. Hoa [Message sent by forum member 'lmhoa' (lmhoa)] http://forums.java.net/jive/thread.jspa?messageID=153807 === To unsubscribe, send email to