Straightening an image in Photoshop
Often when you scan things, or take pictures, you discover after you see the picture on your screen that you were a few degrees off the horizon. Usually this doesn’t matter, and you can get away with cropping out the edges, and nobody will ever be able to tell.
Some times, however, you aren’t so lucky, and will have to straighten the lines in an image considerably. You might be trying to use the Transform tool, or you might try to rotate the image in another way, but you will find that it can be incredibly hard to completely align an image. This is particularly frustrating if you have a line running along the length of an image; The edge of a building for example. If the line is only a fragment of a degree off, it becomes very obvious.
Luckily, Photoshop provides a useful way to solve the problem; Arbitrary rotation.
If you have a look in the Image – Rotate – Arbitrary, you see that you can fill in any value you want the image rotated. “Great”, I hear you think, “But how the hell do I know how many degrees I am off?”. Easy; Use the Measurement tool!
Using this tool (it looks like a little ruler), drag a line along the line in the picture – this can be a vertical line or a horizontal line. Now, go back to the arbitrary rotation menu. Look! Magically, a number is filled in. This number is the exact inverse of the rotational error to the nearest 45 degrees. In other words, unless your image is spectacularly askew, you can just select the line, chose arbitrary rotation, and Photoshop sorts the rest out! When it is done, you can just crop off the edges (you will get a little blank space along the edges where the rotation happened), and you are done!
And now, in pictures:
![]() |
Such a gorgeous picture of Organic marmelade… But it’s all crooked! |
![]() |
Use the measurement tool, and make a line that runs exactly along whatever you want to straighten.
If you want to use a vertical line instead, that’s possible, Photoshop is clever enough to know what you mean. |
![]() |
From the Image menu, select Rotate Canvas, then Arbitrary… |
![]() |
… And the correct value will be filled in already! Just click OK. that gives you… |
![]() |
The final picture! Use the marquee or crop tools to crop of the edges… |
![]() |
… And you are left with a perfectly aligned photograph! |



































My day job, if it can be called that, is being a writer. I've got one book out there so far and it's awesome, so go ahead and buy a copy! It's available from
In front of you, five hyperactive men with guitars, drums, and microphones. Behind you, five thousand fans. In your hands, a camera... You're going to need more than just a little bit of good luck to pull this one off. That's where this book comes in.
Take a Canon EOS 450D. Attach a Canon 50mm f/1.4 lens. Hit the streets of London. See what happens.




Insights, suggestions and comments
Great tip!
i disagree. bad tip. from the introduction, i expected something fancy, like perspective correction, horizon alignment and barrel distorsion correction all at the same time. if you’re just going to crop the image so your horizon becomes, well, horizontal, just use the crop tool; grab a corner of the rectangle showing the resulting frame and rotate it until it’s aligned with whatever you want to align it with. press enter. no measuring, no manually-entering-the-number-ing. i know, i know, at first it might seem non-intuitive and, frankly, a little weird to choose the crop tool if what you want to do is to crop something, but you’ll get used to it.
Nex: I’m not sure if I understand – of course you can use the crop tool to rotate, but it’s darn tricky to get things exactly straight, I find. Also, there is no manually entering the number – it’s entered for you, by Photoshop
YMMV, of course – I do use the crop tool when I’m in a hurry – this one is good for precision, though.
The trial and error method of the Crop Tool can be a little frustrating unless you have a really great eye for angles. The Ruler Tool sounds to me to be a great short cut! Now if I could just find it on CS2 I will use it.
Dick, on CS (I don’t have CS2 yet), the measurement tool is under the same palette button as the eyedropper.
In CS2, you can use the Straighten Tool (Filter/Distort/Lens Correction) in Lens Correction, icon in upper left corner of the tool. You draw a horizontal line and CS2 will straighten the photo based on your line .. as well as correct for other optical abberations.
The crop tool can be used in a way as accurate as the measurement tool without trial and error. And it saves a step.
What you do is select a smaller area and use an edge of your crop to align, by dragging a corner of your crop selection, then expand your crop without changing that precise angle and commit the crop. Done.
thanks, ford, for expanding my suggestion to something more clear. i’m not sure from which photoshop version you’re able to rotate the crop rectangle (haven’t got anything earlier than 7 here), so this might have been a source of confusion. but as you said, if you can rotate that rectangle, it’s of course every bit as presice as using the ruler.
here’s another tip: you can’t use the crop tool to enter precise numbers (e.g. for the angle), but you can _display_ the presice numbers by opening the info palette and adjust the rectangle accordingly.
Nex-
I think Photoshop 7 was the first to allow rotation of the crop selection. It’s kind of an essential feature, I think.
Thanks for great tip! I have a strange problem in Photoshop on my work, when I canät rotate an image precizely using crop tool, your tip saved me the day!
I was looking for this tip for the past several months. Now I got two nice tips instead of one (one from your article and one from the discussion). Thanks.
Some people have written about the crop rotation bug in photoshop. I have investigated this bug a little deeper, look here:
http://bugreporter.blogger.de/topics/Photoshop+CS2+Bugs/
i come to this situation a lot and wanted to try it but i dont understand where to find this tool (it looks like a little ruler), thing.
i have photoshop cs, is this available for this version
and here’s how to easily crop the image correctly after rotating it:
http://www.shutterfreaks.com/Tips/GuideCropping.html
It’s a wonder the ‘Crop Rotation Bug’ didn’t set agriculture back hundreds of years!
That is a good guide for people who have Photoshop and advanced editing capabilities. For individuals that do not have access to Photoshop; Snapfish offers a unique FREE tool that can detect the horizon and automatically correct the image. Check it out here: http://www.hp.com/idealab/us/en/snapfish.html
the best and easiest way is the distortion lens correction filter but you can use the crop tool to. just use the perspective option and work with the selection edge to make it fit to a straight line then expand it to the maximum or to the point you wish to keep the picture.
for those of us who have only the really old versions without all the neat new features & don’t use photoshop often enough to justify the upgrade
I thank you so much for this tip.
i found this link useful as well
http://www.mutinydesign.co.uk/web-design-resources/how-to-rotate-an-image-in-photoshop/
here is another tutorial i found of use
http://www.mutinydesign.co.uk/web-design-resources/how-to-rotate-an-image-in-photoshop/
excellent, thanks a lot
Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.
Trackbacks
Share your wisdom