Rotate image🔗

Rotates an image about its principal point. Usually the principal point is at the center of the image.

Inputs🔗

  • image: The image to rotate.

  • angle: Rotation angle in degrees. Positive angle means clockwise rotation. Negative angle means counter-clockwise rotation.

  • outputSize: The size of the output image.

  • backgroundColor: The color to use for undefined pixels in the output.

  • interpolation: If true, improve the visual quality of the output by interpolating non-exact values from neighboring pixels. If false, round pixel coordinates to the nearest integer. Notice that interpolation is a significantly slower operation than rounding.

Outputs🔗

  • image: Rotated image.

enum OutputSize🔗

Method which determines the size of the output image.

Values:

enumerator Expand🔗

Make the output image big enough to contain all corners of the rotated input image.

This generally means that the corners of the output image will be undefined and painted with backgroundColor.

enumerator Retain🔗

The size of the output will be the same as that of the input.

This generally means that the corners of the input are not visible in the output and that the corners of the output will be undefined and painted with backgroundColor.

enumerator Crop🔗

The output will be a square image that will leave no undefined pixels at the corners at any rotation angle.

The output will always be smaller than the input.