Sub topic 6
Straightening a Tilted Image
This chapter assumes you can open and save images in Photoshop, find the toolbar and options bar, and understand layers at a basic level. It also assumes you know that an image is a grid of pixels. You should have read the chapter on the Crop tool, because straightening is built on it.
A tilted horizon is one of the most common photo flaws. Photoshop fixes it by rotating the image, then cropping away the empty corners the rotation creates. This chapter covers the Straighten option, manual rotation, what happens to the pixels, and the errors that trip people up.
What straightening really does
Straightening is a rotation followed by a crop. Photoshop turns the image by a small angle so that a line you choose becomes perfectly horizontal or vertical. A rotated rectangle does not fit inside the original rectangle, so the corners of the canvas are left with empty space.
You have two ways to deal with that space:
- Crop it away. The crop box stays inside the rotated image, so you lose some of the edges. This is the default.
- Fill it. You expand the crop box past the image and let Content-Aware fill invent pixels for the gaps. The next chapter covers this.
Because of this, every straightening costs you some of the frame. A larger angle costs more. Check your composition after straightening, since the subject may now sit closer to an edge.
Straightening with the Straighten option
The Straighten option lets you draw a line along something that should be level or plumb. Photoshop measures the angle of your line and rotates the image to correct it.
- Choose the Crop tool (shortcut C).
- Click Straighten in the options bar. The icon looks like a level.
- Click one end of a feature that should be horizontal, such as the horizon, a shelf edge or a table top.
- Drag to the other end and release. The longer the line, the more accurate the angle.
- Photoshop rotates the image inside the crop box and shows a preview.
- Press Enter (Windows) or Return (macOS), or click the check mark in the options bar, to commit.
The line can also follow a vertical feature, such as a door frame or a lamp post. Photoshop picks whichever correction, horizontal or vertical, needs the smaller rotation. In practice, draw along the edge that is closest to level and the result is what you expect.
Choosing a good reference line
The result is only as level as the reference you pick. Good references are:
- The sea horizon, which is level in almost any photo taken at ground level.
- Man-made edges known to be level, such as a window sill, a building roofline or a floor line.
- Plumb features, such as a door frame, a tall building edge or a flagpole.
Poor references are:
- Natural hills, tree lines and ridges, which are rarely level.
- Features in a photo taken with a wide-angle lens close to the subject, because perspective distorts lines.
- Lake shores, which curve in the picture.
A horizon is only truly level at the camera's own height. If you shoot from a mountain top, the horizon can look slightly tilted because of lens distortion, not because you tilted the camera. Correct lens distortion first (Filter > Lens Correction), then straighten.
Straightening by manual rotation
You can also rotate by hand, which gives you control when no single line is a reliable reference.
- With the Crop tool active, click and drag the image or the crop box.
- Move the pointer just outside a corner of the crop box until it becomes a curved double-headed arrow.
- Drag up or down to rotate. A grid appears over the image to help you judge level lines.
- Release, then press Enter to commit.
While you rotate, Photoshop shows the angle. Rotation turns around the centre of the crop box by default. You can move the centre point (the small reference marker) if you want to pivot around another spot.
Using the options bar angle control
Some versions of Photoshop also show an angle slider or field next to the Straighten button. Use it when you know the number, for example when a previous photo in a series needed 1.4 degrees. Positive and negative values rotate in opposite directions. Try small values first, since a few tenths of a degree is often enough.
Both methods give the same result. Choose Straighten for speed and accuracy. Choose manual rotation when you are judging by eye, for example to match a tilt that looks natural.
Which pixels are changed
Rotating an image by an angle that is not a multiple of 90 degrees cannot map pixels one-to-one. Photoshop has to resample, which means it computes new pixel values from neighbouring ones. This slightly softens the image. Fine detail and sharp edges lose a little crispness.
Three things control how visible this is:
- Interpolation method. In Preferences > General, the Image Interpolation setting decides how the new pixels are computed. Bicubic Automatic is the default and is a sensible choice.
- Number of rotations. Each separate rotation resamples again. Rotate once, with the correct angle, instead of rotating several times by small amounts.
- Delete Cropped Pixels. When this option is off, the original pixels stay in the file, so you can change the angle later without compounding the quality loss.
Straightening and Delete Cropped Pixels
The Delete Cropped Pixels checkbox in the options bar controls what Photoshop keeps after you commit.
| Setting | What happens on commit | Can you re-adjust the angle later? |
|---|---|---|
| Off | Pixels outside the crop box are hidden but kept in the file | Yes. Select the Crop tool again and the full rotated image returns |
| On | Pixels outside the crop box are permanently discarded | No. The discarded edges are gone |
With the option off, you can pick the Crop tool again on a straightened image and see the whole rotated layer along with the hidden area. You can then drag the box outward to include more of it, or adjust the angle.
There is a catch for the Background layer. A Background layer is locked and cannot hold hidden pixels outside the canvas. In that case Photoshop converts the hidden area into a layer that extends beyond the canvas, but only if the layer is an ordinary layer. To keep straightening reversible, convert the Background layer to a normal layer first: double-click it in the Layers panel and click OK, or choose Layer > New > Layer from Background.
A stronger choice for a non-destructive workflow is to turn the layer into a Smart Object first. Straightening a Smart Object keeps the original data intact, and later edits are applied to the preserved source rather than to already-modified pixels.
A worked example
Suppose you have a seascape named harbour.jpg where the horizon slopes down to the right by about two degrees.
- Open the image. In the Layers panel, double-click the Background layer and click OK to turn it into Layer 0.
- Choose the Crop tool.
- In the options bar, make sure Delete Cropped Pixels is unchecked.
- Click Straighten.
- Zoom to 100% and drag a line along the horizon from the far left to the far right of the frame.
- Check the preview. The horizon should now line up with the horizontal grid lines.
- Press Enter to commit.
- If the crop removed too much of the sky, press C and click the image. Drag a crop handle outward, then commit again.
Because the hidden pixels were kept, step 8 works without any loss. If you had left Delete Cropped Pixels on, you would have to undo and start again.
The straighten workflow at a glance
Common errors and how to avoid them
The image is straighter but looks wrong
If the horizon is level but buildings lean inward, the problem is perspective, not tilt. Straightening rotates the whole image and cannot fix lines that converge. Use the Perspective Crop tool or the Adaptive Wide Angle and Transform tools instead. The perspective chapter covers this.
You overcorrected a natural tilt
Not every tilt is a mistake. A sloping hillside, a street on a slope or an intentionally tilted shot may look worse when forced level. Look at the whole picture and ask what the viewer expects to see as level.
Straighten seems to do nothing
If the Straighten button does not respond, check these points:
- The Crop tool must be active. Straighten is part of its options bar.
- The image must not be in a mode that blocks tools, such as a Quick Mask or an open text edit.
- The layer must be unlocked if you want hidden pixels kept.
- If you drew a line shorter than a few pixels, Photoshop may ignore it. Draw it again.
The angle is slightly off
Small errors almost always come from a short or badly placed line. Redo the line over a longer distance at a higher zoom. Another cause is a lens that curves straight lines, so apply lens correction first.
Empty corners show after commit
If you expanded the crop box beyond the rotated image, the corners are transparent or filled with the background colour. Either pull the crop box back inside the image or set Content-Aware fill, covered in the next chapter, to fill them.
Quality loss after several straightenings
Each rotation resamples the pixels again. If you realise the angle is wrong after committing with Delete Cropped Pixels on, undo with Ctrl+Z (Windows) or Cmd+Z (macOS). Do not straighten the straightened result a second time. Return to the original and rotate once.
Straightening a Smart Object or a multi-layer file
When a document has several layers, the Crop tool rotates all of them together. This keeps them aligned. If a layer is a Smart Object, Photoshop records the transform and applies it to the object without destroying its source. Adjustment layers and layer masks stay in place and follow the rotation.
For a single layer in a multi-layer file, use Edit > Transform > Rotate instead. This rotates only the selected layer and leaves the canvas size unchanged. That is useful for straightening a scanned print that sits on top of other content. Straighten as described in this chapter when you want the whole composition turned.
Quick reference
| Task | How |
|---|---|
| Straighten along a line | Crop tool, then Straighten, drag along the feature, Enter |
| Rotate by hand | Crop tool, drag outside a corner, Enter |
| Keep pixels for later changes | Leave Delete Cropped Pixels unchecked |
| Cancel a straighten in progress | Press Esc |
| Change an earlier straighten | Select the Crop tool again, adjust, Enter |
Exercise
You straighten a photo using the Straighten option and commit with Delete Cropped Pixels turned on. Afterwards you notice that you cropped away too much sky. Why can't you simply drag the crop box outward to get the sky back, and what should you have done differently?
Show answer
With Delete Cropped Pixels on, the pixels outside the crop box were permanently discarded when you committed, so there is nothing left to reveal. You should have left Delete Cropped Pixels unchecked, and converted the Background layer to a normal layer (or a Smart Object) first, so the hidden pixels stayed in the file and the crop could be adjusted later. Now you can only undo the step or start again from the original file.
Exercise
A photo shows a calm lake with a distant shoreline of hills. The shoreline slopes slightly, and a wooden pier in the foreground has a flat top edge. Which feature should you draw the Straighten line along, and why?
Show answer
Draw it along the top edge of the pier. Man-made edges that are known to be level make reliable references. The hill shoreline is natural and is not guaranteed to be level, so using it could tilt the whole image. Draw the line as long as possible and zoom in so the ends sit exactly on the edge.
Exercise
You straightened a picture of a tall building and the horizon is now level, but the building still seems to lean inward at the top. Does the Straighten option fix this? What do you use instead?
Show answer
No. Straighten only rotates the image by one angle, so it cannot correct lines that converge because of camera perspective. Use the Perspective Crop tool, or the Transform and Adaptive Wide Angle tools, to correct converging lines.