Click here to Skip to main content
15,907,874 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have found several posts to rotate an image based on image center but my requirement is to rotate an image based on viewport center.
For example, if the image is in top left corner of the view port at first and then after rotate the image should be in top right corner with same display area of the image.

Can you anyone help me to do this?
Posted
Updated 16-Nov-15 19:41pm
v3

1 solution

Check this link on code project C# Image/PictureBox Rotations[^]

Just move (TranslateTranform) point to your own custom point. Play a bit to get exactly what you need.

Good luck!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900