ROT_INT Function

Standard Library function that rotates and magnifies (or demagnifies) an image on the display screen.

Usage

result = ROT_INT(image, ang[, mag, xctr, yctr])

Input Parameters

image—The input image to be manipulated. Can be of any data type except string. Must be two-dimensional.

ang—The angle of rotation in degrees clockwise.

mag—(optional) Magnification or demagnification factor (see Discussion).

xctr—(optional) The x subscript of the center of rotation. If omitted, xctr is equal to the number of columns in image divided by 2.

yctr(optional) The y subscript of the center of rotation. If omitted, yctr is equal to the number of rows in image divided by 2.

Returned Value

result—A rotated and magnified (or demagnified) image. The dimensions are the same as those for the input image.

Keywords

None.

Discussion

ROT_INT calls the function POLY_2D to rotate and scale the input image.

The magnification factor can be of integer or floating-point data type. It is specified as follows (with 1 being the default value):

mag = 1—no change

mag > 1—causes magnification

mag < 1—causes demagnification

For example, if mag is set to 0.5, this would result in an image half the size of the original image, and if mag is set to 3, this would result in an image three times the size of the original.

ROT_INT uses the bilinear interpolation method to rotate and scale the input image.

Note:

If a faster (but less accurate) method of interpolation is needed, use the related function ROT, which uses a nearest neighbor method.

See Also

AFFINE, POLY_2D, ROT, ROTATE

For information on interpolation methods, see the PV‑WAVE User Guide.