RotateFlipType

RotateFlipType enumeration

Specifies how much an image is rotated and the axis used to flip the image.

public enum RotateFlipType

Values

NameValueDescription
RotateNoneFlipNone0Specifies no clockwise rotation and no flipping.
Rotate90FlipNone1Specifies a 90-degree clockwise rotation without flipping.
Rotate180FlipNone2Specifies a 180-degree clockwise rotation without flipping.
Rotate270FlipNone3Specifies a 270-degree clockwise rotation without flipping.
RotateNoneFlipX4Specifies no clockwise rotation followed by a horizontal flip.
Rotate90FlipX5Specifies a 90-degree clockwise rotation followed by a horizontal flip.
Rotate180FlipX6Specifies a 180-degree clockwise rotation followed by a horizontal flip.
Rotate270FlipX7Specifies a 270-degree clockwise rotation followed by a horizontal flip.
RotateNoneFlipY8Specifies no clockwise rotation followed by a vertical flip.
Rotate90FlipY9Specifies a 90-degree clockwise rotation followed by a vertical flip.
Rotate180FlipY10Specifies a 180-degree clockwise rotation followed by a vertical flip.
Rotate270FlipY11Specifies a 270-degree clockwise rotation followed by a vertical flip.
RotateNoneFlipXY12Specifies no clockwise rotation followed by a horizontal and vertical flip.
Rotate90FlipXY13Specifies a 90-degree clockwise rotation followed by a horizontal and vertical flip.
Rotate180FlipXY14Specifies a 180-degree clockwise rotation followed by a horizontal and vertical flip.
Rotate270FlipXY15Specifies a 270-degree clockwise rotation followed by a horizontal and vertical flip.

Examples

This example loads an image, rotates it by 90 degrees clockwise and optionally flips the image horizontally and(or) vertically.

[C#]

string dir = "c:\\temp\\";

Aspose.Imaging.RotateFlipType[] rotateFlipTypes = new Aspose.Imaging.RotateFlipType[]
{
    Aspose.Imaging.RotateFlipType.Rotate90FlipNone,
    Aspose.Imaging.RotateFlipType.Rotate90FlipX,
    Aspose.Imaging.RotateFlipType.Rotate90FlipXY,
    Aspose.Imaging.RotateFlipType.Rotate90FlipY,
};

foreach (Aspose.Imaging.RotateFlipType rotateFlipType in rotateFlipTypes)
{
    // Rotate, flip and save to the output file.
    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.bmp"))
    {
        image.RotateFlip(rotateFlipType);
        image.Save(dir + "sample." + rotateFlipType + ".bmp");
    }
}

See Also