Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes when I take a picture of a rectangular object, it comes out rotated by a small number of degrees (less than 5 or so).

I can make the space where the rectangle isn't white or whatever, but how can I select a non-rectangular (in the sense that it does not line up with the four ninety degree angles that I am given when I use a rectangular select tool), and rotate it by this small number of degrees?

Additionally, if I could "stretch" one end of the rectangle because it got skewed to match the height of the other one, that would be great. I realize that there will be some loss of resolution if it do it this way (though just as good would be a way to "compress" the other side, and that would not reduce the quality of the image).

I am pretty flexible on the program (GIMP, Paint.NET, Paint, and Visio), but I am open to downloading any free software that can do this.

share|improve this question
I am not completely clear on what you need, but the perpective tool in Gimp should help the skew part, and then once you have it even, you could rotate the selection. – Paul Jan 19 '12 at 23:04
Probably unrelated but info that should go with this answer. When you said "match the height of the other one" it made me think that many people run into this problem when trying to stitch photos together (for example a panoramic view). There is one software which is specialized for this purpose and I absolutely love. It is the Hugin Panorama Photo Stitcher – Dennis Jan 21 '12 at 12:40
up vote 7 down vote accepted

In GIMP, select the whole picture or crop of the picture. Select the "Perspective Tool" (menu Tools -> Transform Tools -> Perspective), and adjust the skew , and rotations (see rotations next) by adjusting each of the 4 corners as needed. In GIMP 2 you can do this live and see the results, then hit transform to finish.

For small rotations, and better control of just the rotate, before or after adjusting the skew, use the "Rotate Tool" (menu Tools -> Transform Tools -> Rotate), which can again be rotated live, then transformed and has entry box for small rotation adjustments.

share|improve this answer

You can rotate by degrees in Paint by using the Skew command. Click Resize, and place a value in the horizontal and vertical fields.

To maintain the look of your image, use equal values, one negative and one positive.

For example:

Horizontal=10, Vertical=-10.
share|improve this answer
Nice quick hack! – Karlo Apr 12 at 14:13

Irfan View is free and can rotate by up to 0.01 degrees.

However, since you mentioned stretching one end of the rectangle, it sounds like you're beginning to see the issues of camera lens distortion. Have a look at this page on barrel distortion - the examples really are worth 1,000 words (disclaimer: I'm the author of the page).

share|improve this answer
Facinating (really!). I had no idea about this. Thank you. – shufler Jan 19 '12 at 23:57
It is not so much camera distortion as the camera was held at the wrong angle when the picture was taken. Very interesting article though. – soandos Jan 20 '12 at 1:38

If you don't want to download anything - and if skewing isn't an issue - MS-Office's picture viewer will allow arbitrary (degree-level precision) rotations.

From Win Explorer, right click the image and Open with ... Microsoft Office 20xx Select 'Picture/Roate and Flip...' from the menu Then, in the right hand pane, you'll notice the 'by degree' text box.

share|improve this answer
Brilliant! Thank you from saving me from the hassle of downloading a new program. – Tarzan Jan 8 '15 at 0:01
  • In, select "Move Selected Pixels" tool.
  • On Mouse Right Click and try moving your mouse left and right.
  • Your image starts rotating.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .