/* Compute the Image X,Y after removal of scaling and subsetting.            */
/* zoom is the zoom factor.  65536 is equal to 1.                            */
/* zoom is changed in the ZoomImage subroutine.                              */

procedure expose zoom Xoffset Yoffset

parse arg ImageX ImageY

/* Apply scaling correction. */
zoomScale=65536/zoom

parse arg ImageX ImageY
ImageX=space(format(ImageX*zoomScale,10,0),0)
ImageY=space(format(ImageY*zoomScale,10,0),0)

/* Apply offset due to subsetting. */
ImageX=ImageX+Xoffset
ImageY=ImageY+Yoffset


return ImageX ImageY

