How to Correct a Photo's Perspective Distortion With GIMP

Female photo editor reviewing digital photo proofs on computer in office
Hero Images / Getty Images

GNU Image Manipulation Program, otherwise known as GIMP, is free software that is used to edit, retouch, and manipulate images.

Save the Practice File

Photo with Perspective Distortion
Sue Chastain

You probably have photos of tall buildings in your collection. You might notice that the sides appear to slant inward at the top due to the perspective from which the photo was taken. We can correct this with the perspective tool in The GIMP.

If you'd like to follow along, you can right click on the image here and save it to your computer. Then open the image in The GIMP and continue to the next page. We're using GIMP 2.4.3 for this tutorial. You may need to adapt these instructions for other versions.

Place Your Guidelines

Place Your Guidelines

With the photo open in GIMP, move your cursor to the ruler at the left side of the document window. Then click and drag to put a guideline on the image. Place the guideline so it's close to one of the angled sides of the object you want to straighten in your photo.

Then drag a second guideline for the other side of the building.

If you think you need horizontal adjustment, drag a couple of horizontal guidelines and place them close to the roof line or another part of the image that you know should be horizontal.

Set Perspective Tool Options

Set Perspective Tool Options

Activate the Perspective tool from The GIMP's tools. Set the following options:

  • Direction: Normal (Forward)
  • Interpolation: Sinc (Lanczos3)
  • Clipping: Crop to result
  • Preview: Image
  • Number of grid lines: 15

Activate the Perspective Tool

Activate The Perspective Tool

Click once in the image to activate the tool. The Perspective dialog will appear, and you'll see squares on each of the four corners of your image.

Adjust the Corners to Align the Building

Adjust the Corners to Align the Building
Sue Chastain

You might find that the image looks a little odd after you've corrected it. The building will often appear distorted in the opposite way, even though the walls are aligned vertically now. That's because your brain expects to see some perspective distortion when you're looking up at a tall building. Graphics guru and author Dave Huss offers this tip: "I always leave a little of the original distortion to make the image appear natural to the viewer."

Move the perspective dialog box aside if it's blocking your image, then drag the bottom corners of the image to the side to make the sides of the building line up with the vertical guidelines you placed earlier. Leave a slight amount of the original distortion when adjusting the sides.

You only need to compensate a tiny bit to make the corrected photo appear much more natural. Move the corners up or down if you need to adjust the horizontal alignment.

You can always hit reset on the Perspective dialog if you want to start over.

Otherwise, click transform on the perspective dialog to complete the operation when you're happy with the adjustment

Autocrop and Remove Guides

Autocrop and Remove Guides
Sue Chastain

The slanting sides of the building should now look much straighter.

As a last step, go to Image > Autocrop Image to remove the empty borders from the canvas.

Go to Image > Guides > Remove all Guides to remove the guideline.