Straighten a Crooked Photo with GIMP

Young woman taking picture on street
Oscar Wong / Getty Images

We've all probably taken pictures when the camera wasn't perfectly level, resulting in a skewed horizon line or a crooked object. It's very easy to correct and straighten a crooked photo using the rotate tool in GIMP.

Whenever you have an image with a skewed horizon, you must lose something from the edges of the photo to fix it. The sides of the image must be cropped to make up for the slanting of the photo from rotation. You always have to crop a photo when you rotate, so it makes sense to rotate and crop in one step with the rotate tool.

GIMP 2.10.8 was used for the tutorial below. It should work for other versions up to GIMP 2.8 as well.

Straighten Your Image

  1. Open your photo in GIMP.

    Photo open in GIMP

    This photo was taken by a talented photographer on Unsplash. She didn't make it crooked, we did for this guide.

  2. With your photo open, move your cursor to the ruler at the top of the document window. Click and drag down to put a guideline on the image. Place the guideline so it intersects with the horizon in your photo. This doesn't necessarily have to be the actual horizon line as it is here in the practice photo shown -- use anything that you know should be horizontal, such as a roofline or a sidewalk.

    GIMP photo with horizontal guideline
  3. Select the Rotate Tool from the toolbox.

  4. Turn your attention to the tool options. By default, they're just below your toolbox. Set the Clipping option for the Rotate Tool to Crop with aspect.

    GIMP rotate tool options
  5. Select your photo to highlight it for rotation. From there, you have your choice of how to rotate it. You can click and drag the photo in a circular motion to adjust it. You can also use the slider on the Rotate window that just popped option to set your rotation. Finally, if you have a number in mind, you can punch it into the Rotate window to jump right to it.

    GIMP rotate photo
  6. Once you have your image aligned correctly, press Rotate to set it in place.

    GIMP image rotated
  7. Things will probably still look a bit off to you here. The image is going to be floating in a bunch of empty space. Thankfully, GIMP has a way to fix that. Select Image from the top menu. Then, pick Crop to Content.

    GIMP photo crop to content

    On versions of GIMP prior to 2.10, Crop to Content was Autocrop Image.

  8. Take a look at the result. Your image should now be perfectly aligned with your horizontal guide.

    GIMP image cropped
  9. Next, get rid of that horizontal guide before you export your image. Go to Image > Guides > Remove all Guides to remove the guideline. 

    GIMP remove guides
  10. You can export the result when you're ready. It'll be smaller than the original, but it will also be perfectly straight and horizontal.

    GIMP photo corrected horizontal