Straightening an image in Photoshop

The easiest way to get those horizons straight!

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!

Do you enjoy a smattering of random photography links? Well, squire, I welcome thee to join me on Twitter -

© Kamps Consulting Ltd. This article is licenced for use on Pixiq only. Please do not reproduce wholly or in part without a license. More info.

Comments

Anonymous
Anonymous

Great tip!

Anonymous
Anonymous

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.

Anonymous
Anonymous

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.

Anonymous
Anonymous

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.

Anonymous
Anonymous

Dick, on CS (I don’t have CS2 yet), the measurement tool is under the same palette button as the eyedropper.

Are you finding Website of Chanel Handbags Fors Sale ? Please be careful ,there are many online store are selling the cheap chanel items ,which are not original. But if you can accept a replica ,it will be a good choice..

Anonymous
Anonymous

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.

Anonymous
Anonymous

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.

Anonymous
Anonymous

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.

Anonymous
Anonymous

Nex-
I think Photoshop 7 was the first to allow rotation of the crop selection. It’s kind of an essential feature, I think.

Anonymous
Anonymous

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!

Anonymous
Anonymous

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.

Anonymous
Anonymous

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/

Anonymous
Anonymous

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

Anonymous
Anonymous

and here’s how to easily crop the image correctly after rotating it:

http://www.shutterfreaks.com/Tips/GuideCropping.html

Anonymous
Anonymous

It’s a wonder the ‘Crop Rotation Bug’ didn’t set agriculture back hundreds of years!

Anonymous
Anonymous

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

Anonymous
Anonymous

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.

Anonymous
Anonymous

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.

Anonymous
Anonymous
Anonymous
Anonymous

excellent, thanks a lot

Anonymous
Anonymous

Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

Anonymous
Anonymous

I think Photoshop 7 was the first to allow rotation of the crop selection. It’s kind of an essential feature, I think.

Anonymous
Anonymous

Thanks for great tip!

Anonymous
Anonymous

Thanks for the help , been wondering how to do this for along time . cheers

Post new comment

Pixiq on Facebook

Join the 10141 Pixiq fans on Facebook

Share

  • Share

Subscribe

Get weekly updates from Pixiq. Short, sweet, and always interesting.