4

Cropping an image from the outside is easy in Gimp: Select a rectangular part of the image, Image > Crop to Selection.

Is there an comparably easy way to crop out something? For example, when having this image: Small image with two shapes and space inbetween

When I want to "crop out" the unused area in the middle, how can I do that?

The expected result should be like this of course (without the black lines at the sides):

The same image without the space inbetween

3 Answers 3

7

As others find alternatives, it does seem like this is not the best way to do it at all. Both Photoshop & Gimp it would appear have tools that can at least go part way towards this.


There's no easy way in any app I know of, but see the other answer for a quite specific 'image reducer'.

Cut one section, paste to new layer, move to desired location, crop the result [merge/flatten if appropriate].

enter image description here

3
  • 1
    Alternatively, create a new canvas, copy and paste each section to new canvas, flatten and save. (Similar idea, but maybe less confusing then dealing with layers in the original pic)
    – davidgo
    May 10, 2021 at 9:02
  • Mmmh, that's exactly what I thought: No way to skip the annoying "shift around patches of the image manually". :-(
    – Bowi
    May 10, 2021 at 9:19
  • 1
    Not as far as I'm aware. I can see exactly what you mean by the 'inner crop' idea, but in 30 years of using Photoshop et al, I've never come across it as an executable action in any app. [I would, of course, be happy to be proven wrong on this ;)
    – Tetsujin
    May 10, 2021 at 9:33
4

For the image in the post above for example, in Gimp 2.10 I used "Image > Zealous Crop" which resulted in this image.

Zealour Crop

Although not sure on the results with a more detailed image or complex background.

2
  • I don't use Gimp and I haven't tested, but it seems you're right. +1. May 12, 2021 at 7:27
  • Yes, this shouldn't work with a more complex background, as the link of @KamilMaciorowski says: The Zealous Crop command crops an image using a single solid color as a guide. It crops [...] the areas in the middle of the image which have the same color (at least, in principle). (emphasis by me).
    – Bowi
    May 12, 2021 at 10:04
2

Let me introduce you to the Liquid Rescale plugin. It magically knows which rows/columns should be removed. It's not perfect, but the results are sometimes impressive nevertheless.

Here's your image liquid rescaled. Keep in mind that the only parameters were the target dimensions.

Original and scaled image, side by side

This photo resized to widescreen. Again, the algorithm decides what to remove on its own, I've only changed the image height:

Original and scaled image, side by side

Now the coolest part: the same photo, but with the dog automatically removed by Liquid Rescale. I just had to paint a "feature discard" mask over the dog. The algorithm decided what pixels to put in its place.

Original and scaled image, side by side. The dog is gone, instead of it a mostly natural-looking vista was added.

This is what the feature discard mask looked like:

Original photo, with the dog roughly covered with semi-transparent red mask

3
  • That's pretty impressive! Pity they don't do it as a Ps plugin too.
    – Tetsujin
    May 14, 2021 at 11:40
  • @Tetsujin If my googling skills are any good, Ps's content-aware scaling uses the same algorithm. I don't think feature removal is implemented though.
    – gronostaj
    May 14, 2021 at 11:49
  • Ahh… I think I've never even tested that before. It does do remarkably well, though as you say, there's no removal. It also doesn't crop the result, it leaves it inside a larger transparent area, which then needs trimming, even if you use the one click crop & straighten..
    – Tetsujin
    May 14, 2021 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .