Export (0) Print
Expand All

Image.RotateFlip Method

Rotates, flips, or rotates and flips the Image.

Namespace:  System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

member RotateFlip : 
        rotateFlipType:RotateFlipType -> unit


Type: System.Drawing.RotateFlipType

A RotateFlipType member that specifies the type of rotation and flip to apply to the image.

The RotateFlip method rotates the image clockwise.

If you wish to draw on an image once it has been rotated, you should always retrieve a new graphics object from the image, otherwise an exception could occur.

The following code example demonstrates how to call the RotateFlip method on an Image and the RotateFlipType enumeration.

This example is designed to be used with a Windows Form that contains a PictureBox named PictureBox1 and a button named Button1. Paste the code into a form, call InitializeBitmap from the form's constructor, and associate Button1_Click with the button's Click event. Ensure the file path to the bitmap is valid on your system.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft