How to rotate an image

How to rotate an image

Rotate and flip an image

         You can rotate an image to a fixed angle of 90/180/270-degree with or without a flip. Use RotateFlip method and specify `ROTATE_270_FLIP_NONE` type parameter to flip on 270 degrees without flip. Python code example:

         Full list with all available rotate types you can find in the Rotate and flip types parameters descriptions.

Rotate an image to the arbitrary angle

         If you want to rotate an image to arbitrary choice angle, you can use the rotate method with specific rotation angle. The angle value can be positive if a rotation is clockwise or negative for the opposite direction. The size of the original image might be changed after rotating the image, so you have to specify `Resize proportionally` boolean parameter to indicate should the resulting image resized proportionally or not. In case you want to preserve the image size after rotating, you need to specify the background color to fill the empty corners of the rotated image.