RotateFlip

RasterCachedImage.RotateFlip method

Gira, voltea o gira y voltea la imagen.

public override void RotateFlip(RotateFlipType rotateFlipType)
ParámetroEscribeDescripción
rotateFlipTypeRotateFlipTypeEl tipo rotar voltear.

Ejemplos

Este ejemplo carga una imagen ráster almacenada en caché, la gira 90 grados en el sentido de las agujas del reloj y, opcionalmente, voltea la imagen horizontal y (o) verticalmente.

[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)
{
    // Rotar, voltear y guardar en el archivo de salida.
    using (Aspose.Imaging.RasterCachedImage image = (Aspose.Imaging.RasterCachedImage)Aspose.Imaging.Image.Load(dir + "sample.bmp"))
    {
        image.RotateFlip(rotateFlipType);
        image.Save(dir + "sample." + rotateFlipType + ".bmp");
    }
}

Ver también