coordinate transformation

What is the correct method to calculate each pixel’s coordinate translation after an image is zoomed around center ? I’m using the following steps to zoom an image around it’s center :

AffineTransform atT=new AffineTransform();

int dx=img.getWidth()/2;
int dy=img.getHeight()/2;

atT.preConcatenate(AffineTransform.getTranslateInstance(-dx, -dy));

atT.preConcatenate(AffineTransform.getScaleInstance(scale, scale));

atT.preConcatenate(AffineTransform.getTranslateInstance(dx, dy));

g.drawImage(img,atT, this);

How can find out each pixel’s coordinate translation after zooming ?

Thanks,

Jay

To calculate the new coords of every point in the image :-

int imgWidth = img.getWidth(), imgHeight = img.getHeight();

double [] points = new double[imgWidth*imgHeight*2];

for(int i = 0;i< points.length;i+=2)
{
   points[i] = (i/2)%imgWidth;
   points[i+1] = (i/2)/imgWidth;
}

atT.transform(points,0,points,0,points.length/2);

If you just want a few points, use afT.transform(Point2D src, Point2D dst)