私は次の機能を持っています:
static private Image CropRotate(Image wholeImage, Rectangle cropArea)
{
Bitmap cropped = new Bitmap(cropArea.Width, cropArea.Height);
using(Graphics g = Graphics.FromImage(cropped))
{
g.DrawImage(wholeImage, new Rectangle(0, 0, cropArea.Width, cropArea.Height), cropArea, GraphicsUnit.Pixel);
g.RotateTransform(180f);
}
return cropped as Image;
}
画像をトリミングしてから、結果のサブ画像を回転させることになっています。ただし、実際には、トリミングのみを実行します。
なぜRotateTransform()
適用されないのですか?