RotateFlip

RasterCachedImage.RotateFlip method

Roterar, vänder eller roterar och vänder bilden.

public override void RotateFlip(RotateFlipType rotateFlipType)
ParameterTypBeskrivning
rotateFlipTypeRotateFlipTypeDen roterande fliptypen.

Exempel

Det här exemplet laddar en rastercachad bild, roterar den 90 grader medurs och vänder bilden eventuellt horisontellt och/eller vertikalt.

[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)
{
    // Rotera, vänd och spara till utdatafilen.
    using (Aspose.Imaging.RasterCachedImage image = (Aspose.Imaging.RasterCachedImage)Aspose.Imaging.Image.Load(dir + "sample.bmp"))
    {
        image.RotateFlip(rotateFlipType);
        image.Save(dir + "sample." + rotateFlipType + ".bmp");
    }
}

Se även