RotateFlip

DicomImage.RotateFlip method

Rotiert, kippt oder dreht und kippt nur den aktiven Rahmen.

public override void RotateFlip(RotateFlipType rotateFlipType)
ParameterTypBeschreibung
rotateFlipTypeRotateFlipTypeDer Rotations-Flip-Typ.

Beispiele

Dieses Beispiel lädt ein DICOM-Bild, dreht es um 90 Grad im Uhrzeigersinn und dreht das Bild optional horizontal und/oder vertikal.

[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)
{
    // Drehen, spiegeln und in der Ausgabedatei speichern.
    using (Aspose.Imaging.FileFormats.Dicom.DicomImage image = (Aspose.Imaging.FileFormats.Dicom.DicomImage)Aspose.Imaging.Image.Load(dir + "sample.dicom"))
    {
        image.RotateFlip(rotateFlipType);
        image.Save(dir + "sample." + rotateFlipType + ".png", new Aspose.Imaging.ImageOptions.PngOptions());
    }
}

Siehe auch