RasterCachedImage.RotateFlip

RasterCachedImage.RotateFlip method

Rotates, flips, or rotates and flips the image.

public override void RotateFlip(RotateFlipType rotateFlipType)
ParameterTypeDescription
rotateFlipTypeRotateFlipTypeThe rotate flip type.

Examples

The following code shows how to rotate the image.

[C#]

var sourceFile = "1.psd";
var pngPath = "RotateFlipTest2617.png";
var psdPath = "RotateFlipTest2617.psd";
var flipType = RotateFlipType.Rotate270FlipXY;
using (var im = (PsdImage)(Image.Load(sourceFile)))
{
    im.RotateFlip(flipType);
    im.Save(pngPath, new PngOptions()
    {
        ColorType = PngColorType.TruecolorWithAlpha
    });
    im.Save(psdPath);
}

See Also