i am developing C# application in that i have to rotate whole picturebox with its iamge, i use rotateFlip() method but it only support 90,180,270 degrees and i want it for 1 degree
Asked
Active
Viewed 4.3k times
8
-
Wait, what? You wish to rotate teh actual PictureBox control, or just the Image inside? – Adriaan Stander Feb 16 '11 at 12:00
-
total pictureBox along with image – Kailas Mirgane Feb 16 '11 at 12:01
-
I dont think you can *rotate* the PictureBox control. You can rotate the pixture within it though. Why do you wish to rotate the control? – Adriaan Stander Feb 16 '11 at 12:03
-
If i go to rotate only image from pictureBox then image rotate in pictureBox and it looks cut so i want to rotate image with whole pictureBox – Kailas Mirgane Feb 16 '11 at 12:07
-
Yes, that is what happens when you rotate squares. Why not make the PictureBox bigger that the actual image size, so that it will fit at any angle? – Adriaan Stander Feb 16 '11 at 12:09
-
i tested with maximum size but it didnt worked. – Kailas Mirgane Feb 16 '11 at 12:11
2 Answers
0
Image img = pictureBox1.Image;
img.RotateFlip(RotateFlipType.Rotate90FlipNone);
pictureBox1.Image = img;

Kirtan Magan
- 31
- 1
- 2
-
Please elaborate your answer a bit, instead of just posting the code. – Stephan Hogenboom Nov 19 '20 at 09:22
-
Code is so simple that no explanation required. `RotateFlipType.Rotate90FlipNone` will rotate image at 90 degree without flipping. Simple ! – Gray Programmerz Aug 03 '22 at 18:16
-1
PIC_LOAD.Image.RotateFlip(RotateFlipType.Rotate90FlipXY);
PIC_LOAD.Refresh();
-
1As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 29 '22 at 05:26