Using the Ruler Tool to Straighten in Photoshop
It's difficult to create a perfectly straight photo when taking a picture. Most of the time a small rotation isn't that noticeable, but it's possible that a rotation could cause problems for other corrections, especially if the tool you're using requires things to be lined up properly, like the rectangular marquee. We can also easily introduce an unintended angle when scanning images as well.
Straightening an image is fairly straightforward in Photoshop. This is where the Ruler tool comes in. With the Ruler tool, we can map out the angle that the image is currently at, and then we can rotate the image using that method.
Let's see how to do this now.
Use this image to follow along: ![]()
In this image, it's easy to tell that it is slightly crooked because of the border around the edge. This also gives us an easy way to straighten it.
Let's grab the Ruler tool now.
- To activate the Ruler tool, Click and hold the Eyedropper tool (
), and then select the Ruler tool.
With the Ruler tool active, we need to press and drag a line in the image. When we draw this line, we're looking for something that will be at a right angle in the final image. Things like the border around this image are ideal, but structures in the image like doors and patterns that you believe are at right angles will work as well.
Let's draw our line now. Since the vertical borders are the only ones that are complete, we will draw our line along one of those borders.
- Press and drag a line along the edge of one of the vertical borders
It's important that this line matches the border as it appears in the image. We are attempting to show Photoshop a line that should be straight in the final image. The longer this line is, the more accurate it will be, so feel free to draw a line along the entire length of the border.
Notice in the Options bar, there will be an 'A' value listed. This is the angle of the line we just drew. If it is at 90 degrees or 0 degrees, then your job is done, the image is straight.
Once the line is drawn, we can rotate the image.
- To rotate the image, in the menu bar, Click Edit, then Click Image Rotation, and then Click Arbitrary...
The Rotate Canvas dialog box appears. Here's where the Ruler tool helps us out. Photoshop will automatically set up this dialog box to the exact measurements needed to straighten the image.
- To complete the rotation, Click OK.
The image rotates, but Photoshop has to add blank spaces around the edges to make the image fit in a rectangular canvas. We'll crop the image to finish.
- In the Toolbox, click the Crop Tool (
) - Press and drag a rectangle around the part of the image you want to keep.
- Adjust the handles around the edge of the selection to modify it.
- Double Click inside the selection to complete the crop.
The image crops, and the areas outside the selection are removed.
There you go, a perfectly straightened image.
Crop and Straighten
Poking around Photoshop you might see a menu item called "Crop and Straighten", and you might think that this does the same thing as I just described. However, the option located at File->Automate->Crop and Straighten Photos is actually designed for use with a scanner.
When scanning a photograph, you usually scan a bit of the scanner bed around the photograph as well. Crop and Straighten will remove that border, and straighten the image based on that border. So it works well on images that have a set border, like the one we just worked on, but unless it has a very strong border, that option will not work.
You can also use Crop and Straighten to separate images scanned together. If you have many images to scan, you can place them all on the scanner glass at the same time (assuming they don't overlap). Open this image in Photoshop, and select the Crop and Straighten option, and Photoshop will crop out each individual photo and place it in it's own document, which you can then save.
