Easy ways to crop after rotating in Gimp
When I posted the entry about editing the boots photo, I got a few comments about how I rotated the image.
One of the things that has always bothered me about rotating images in Gimp is that I have to manually crop the image after in order to get rid of all the transparent pieces that are left behind.
I don’t mind doing things manually because it gives me control, but what I wish I had was something that would automatically crop to the biggest image possible with now transparent bits, and then let me crop more after that if I desired – that way I’d be sure that I wasn’t accidentally including a bit of transparency in my crop.
I found two tools that are giving me a starting point. Let me show you what I’ve found.
First, I’m starting with this image:

Now, you already know I like to rotate by using the Corrective option and selecting to preview it with the grid, but this time, I also selected “Crop with aspect”. You might guess what this does – it automatically crops the photo after the rotate so that it has the same aspect ratio as the current photo.

It’s not quite as automatic as I’d like, because after rotating, my image still has the transparent “border” around it, like this:

So, it crops it, but the canvas size remains the same, so you can see all the transparent bits behind your cropped image. Easy to fix, though! Just go to Image –> Autocrop Image and voila, you have your automatically cropped image:

Using a Script
The other option I found was this Post Rotate Crop tool. So I installed it (if you don’t know how to install scripts for Gimp, check out this post).
This one is meant to be run after any transformation – like rotate, perspective, scale and shear, so I went back to the original photo and rotated it again, this time with the Clipping set back to just Adjust, and then I ran the script, which is found under Tools –> Transform Tools –> Post Rotate Crop. I immediately fell in love with this script when I saw all the options:

Not only does it have the one thing I really wanted – Maximize by Height and width – but I can even input an exact aspect ratio in the text fields that are being covered up by the dropdown in that screenshot, and have it crop to that – so if I know I’m ultimately going to print an 8×10 photo, I can automatically crop it now! How cool!
Here’s the photo now with the maximum height and width picked:

Don’t think it looks much different than the auto crop I used in Gimp before? Well, it is! In this photo, I’ve shaded the area that the clipping using the rotate tool resulted in:

As you can see, there’s a good number of pixels on the right that were saved using the Post Rotate Crop script.
The biggest downside of the script is the amount of time it takes to run (which really isn’t too bad, but it is longer than just doing the clipping in the rotate tool). Still, I plan on using it from now on.
By the way, after some additional editing, I ended up with this as my final version of that photo:

In conclusion, I really love the Post Rotate Crop tool, and highly recommend it!
Related posts:
- Gimp: Some quick tips The Gimp is a very powerful piece of software and...
- Gimp 101: Perspective One of the hardest things to take a picture of,...
- Gimp Quick Tips: Part Two This was not the entry I planned on writing tonight...
- Gimp Plug-in Review: Urban Acid This week we’re going to look at the Urban Acid...
- Adding a Watermark in Gimp (via a Script) A lot of people want to protect their images on...
Related posts brought to you by Yet Another Related Posts Plugin.
-
Abhilash
-
Maciek
-
skydvr
-
donaldharper



