How to rotate an image
How to rotate an image
Rotate and flip an image
Rotating an image with a fixed angle of 90/180/270-degree with or without a flip can be done with RotateFlip method. You need to pass a rotate type parameter to the method. In the Java code example below we use the type `Rotate270FlipNone`:
Please refer to the Rotate and flip types parameters list for available rotating types.
Rotate an image to the specific angle
Additionally, you can rotate an image to a specific angle with Rotate method. For clockwise rotation, the rotation angle value should be positive and for the opposite direction - negative. Also, you can use Rotate method with additional parameters. `Resize proportionally` boolean parameter indicates whether the resulting image resizes proportionally or not. Otherwise, empty corners will appear after the image was rotated and you need to indicate the background color to fill the corners.