Straighten a Horizon With GIMP

This tutorial also works for crooked vertical lines

Landscape and sea with crooked horizon

Millan Pokhrel/EyeEm/Getty Images 

GIMP is suitable for a wide range of digital photo editing uses, from the simple through to quite advanced digital photo editing. A common problem that often needs correcting in digital photos is straightening a crooked or skewed horizon. This can be achieved very easily using GIMP, as demonstrated in this tutorial.

Open Your Digital Photo

For this tutorial, you'll obviously need a digital photo with a crooked horizon. To open the picture in GIMP, go to File > Open and navigate to the photo and click Open.

Select Rotate Tool

Now you can set up the Rotate Tool in preparation for correcting the horizon.
Click on the Rotate Tool in the Toolbox and you'll see the Rotate options appear in the palette below the Toolbox. Check that Transform is set to Layer and change the Direction to Corrective (Backward).

Use the Cubic setting for Interpolation as this produces a good quality image. You may prefer to change the Clipping option to Crop to result as this will produce an image that has vertical and horizontal edges and makes the resulting image as large as possible.

Finally set the Preview to Grid, set the next drop down to Number of grid lines and move the following slider to 30.

Activate the Rotate Tool

The previous step may set the ​Rotate Tool up quite differently to how you usually use it, but these settings are ideal for this digital photo editing technique to straighten the horizon.
When you now click on the image, you'll see the Rotate dialog open and a grid superimposed upon the image. The Rotate dialog contains a slider that allows you to rotate the grid, but we're going to rotate the grid by clicking directly on it and dragging it with the mouse as this is more intuitive.

Rotate the Grid

We now want to rotate the grid so that the horizontal lines align with the horizon.
Click on the image and drag your mouse and you will see that the digital photo remains fixed but the grid rotates. The aim is to align the horizontal lines with the horizon and when you've achieved this click Rotate.

Check the Result

You should now have a digital photo that is smaller than previously, sat within a transparent frame.
If you're not happy that the horizon is straight, go to Edit > Undo Rotate and then try using the Rotate Tool again. You can click on the ruler at the top of the document window and drag down a guide if you want to check the horizontal lines in your photo more closely, but usually checking by eye is sufficient.

Crop the Digital Photo

The final step of this digital photo editing tip is to remove the transparent area around the picture.
Go to Image > Autocrop Image and the transparent frame is automatically removed. If you added a guide in the previous step, just go to Image > Guides > Remove all Guides to remove it.


Thanks to the Corrective option in GIMP's Rotate Tool, this common digital photo editing technique to straighten the horizon is very straightforward. This same technique can also be applied to digital photos that have strong vertical lines that are crooked, such as buildings.