applyRotation

Applies a rotation angle (0, 90, 180, 270) to the given image.

Return

The rotated image, or the original if the angle is 0 or invalid.

Parameters

image

The image to rotate.

angle

The rotation angle in degrees.