WinForms直接提供了图片旋转的功能,相对来说比较方便。
示例代码:
var bitmap = Bitmap.FromFile(fileName);
if (clockwise)
{
bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone);
}
else
{
bitmap.RotateFlip(RotateFlipType.Rotate270FlipNone);
}
bitmap.Save(tempFileName, System.Drawing.Imaging.ImageFormat.Png);
标签:C#,bitmap,RotateFlipType,旋转,RotateFlip,图片
From: https://www.cnblogs.com/wzwyc/p/17663132.html