CImage:ScaleXy
The ScaleXy method scales the image independently in each axis. Scaling is relative to 1.0.
bResult = CImage:ScaleXy( sx, sy, bResize=false ) |
One application of this method is to remove the distortion present in images taken with a detector having non-square pixels.
The optional bResize controls whether the image dimension (pixel count) is changed to accommodate the scaling.
Suppose an image is displayed in a CImageView named V. The following script fragment scales the image by 1.2 times in x and 1.44 times in y, without changing the number of image pixels (bResize=false):
|
-- attach the current displayed image |
|
-- perform the operation |
|
-- update the display after the scale |