RotateFlip
TiffImage.RotateFlip method
仅旋转、翻转或旋转和翻转活动帧。
public override void RotateFlip(RotateFlipType rotateFlipType)
范围 | 类型 | 描述 |
---|---|---|
rotateFlipType | RotateFlipType | 旋转翻转类型。 |
例子
此示例加载 TIFF 图像,将其顺时针旋转 90 度,并可选择水平和(或)垂直翻转图像。
[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)
{
// 旋转、翻转并保存到输出文件。
using (Aspose.Imaging.FileFormats.Tiff.TiffImage image = (Aspose.Imaging.FileFormats.Tiff.TiffImage)Aspose.Imaging.Image.Load(dir + "sample.tif"))
{
image.RotateFlip(rotateFlipType);
image.Save(dir + "sample." + rotateFlipType + ".png", new Aspose.Imaging.ImageOptions.PngOptions());
}
}
也可以看看
- enum RotateFlipType
- class TiffImage
- 命名空间 Aspose.Imaging.FileFormats.Tiff
- 部件 Aspose.Imaging