を回転させるためにどのように画像を回転させることで、問題を解決する必要がありますが、私は完全にのPictureBox
public static Image RotateImage(Image img, float rotationAngle)
{
//create an empty Bitmap image
Bitmap bmp = new Bitmap(img.Width, img.Height);
//turn the Bitmap into a Graphics object
Graphics gfx = Graphics.FromImage(bmp);
//now we set the rotation point to the center of our image
gfx.TranslateTransform((float)bmp.Width/2, (float)bmp.Height/2);
//now rotate the image
gfx.RotateTransform(rotationAngle);
gfx.TranslateTransform(-(float)bmp.Width/2, -(float)bmp.Height/2);
//set the InterpolationMode to HighQualityBicubic so to ensure a high
//quality image once it is transformed to the specified size
gfx.InterpolationMode = InterpolationMode.HighQualityBicubic;
//now draw our new image onto the graphics object
gfx.DrawImage(img, new System.Drawing.Point(0, 0));
//dispose of our Graphics object
gfx.Dispose();
//return the image
return bmp;
}
を回転させ、メソッドを呼び出すためにこれを使用していない画像を回転するには、このコードを持っています。権利は含まれていた画像の矩形を回転させ、画像Iが過去にこの記事から、次のコードを使用している
Bitmap bitmap = (Bitmap)Pix.Image;
Pix.Image = (Bitmap)(RotateImage(bitmap, 20.0f));
可能重複[するLockBitsの画像回転方法が動作しない?](http://stackoverflow.com/questions/3860030/lockbits-image-rotation-method-not-working) –