Hello, I am using a drawImage (RenderedImage, AffineTransform) method to draw the image on the screen. I use an instance of AffineTransform to scale the image in X and Y directions (AffineTransform.getScaleInstance(x, y) ). Suppose the values of x and y are less than 1.0, say 0.65 and I draw the image using the scale AffineTransform with these values of x and y. The resultant image will be a scaled image. A per my undestanding, the way scale affine transform works is that it will apply the scale transform on all the pixel coordinates of the original image. But since the scale factor is a non integer value(double value), the transformed points are going to be non-integer. However the pixel cordinates of the scaled image are integers. My first question: How are these non-integral values (of the transformed points) mapped to the integral values of the scaled image? In other words, how are the pixel coordinates (which are integers) of the original image mapped to the pixel coordinates (which again are integers) of the scaled image (especially if the scale factor is less than 1.0)? My second question: Is there any way of finding which pixel in the original image maps to a particular pixel in the scaled image? In other words, if I have a pixel coordinate (which is an integer) in a scaled image and I want to get the corresponding pixel (which again is an integer) in the original image, how do I get it? My third Question: If the answer to the above two questions is that some kind of Interpolation is applied while scaling the image, then which type of Interpolation is used for this drawImage(RenderedImage, AffineTransform) method. I would really appreciate if somebody could tell me the algorithm used for that type of Interpolation and whether it is possible to find exactly, which pixel coordinate in the scaled image maps (or corresponds) to which pixel in the original image and viceversa, using this algorithm? I would really appreciate if somebody could answer my questions. Thanks, Ajay Gupta ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com ===================================================================== To subscribe/unsubscribe, send mail to [EMAIL PROTECTED] Java 2D Home Page: http://java.sun.com/products/java-media/2D/
