I wanna trim all white spaces surrounding an image's content using Gimp. Is there some straightforward method, or any trick?

  • Can anyone tell me how this question may be wrong? I got 2 answers of what i exactly wanted. – EliuX Apr 6 '16 at 19:02

What do you have there that

Image->Autocrop image did not work?

  • As of Gimp 2.10.8, if I'm not wrong, it appears "Autocrop image" has been renamed to "Crop to Selection". – CreativiTimothy Jun 28 '20 at 6:05

To trim white borders with Gimp we may

  1. select the white border with the Select by Color Tool enter image description here

  2. Invert the selection Ctrl + I

    enter image description here

  3. Crop the image to the selection (Image > Crop to selection)

    enter image description here

For a quicker workflow we can also use the following steps:

  1. Select all Ctrl+ A
  2. Subtract selection by color by Ctrl + mouseclick on selecting
  3. Crop image to selection

Batch processing of large numbers of files can better be done with ImageMagick Trim to remove all colors having the same color as the image corners:

mogrify -trim *.png

Note that this will overwrite your files, work on copies.

  • Isn't perhaps autocrop even faster? – Paolo Gibellini Apr 4 '16 at 23:10
  • 1
    @PaoloGibellini: yeah it sure is... I was under the impression that the OP didn't have access to this plugin (or may not be satisfied with it for reasons we don't know yet). – Takkat Apr 5 '16 at 7:47
  • It would be strange not to have access to a plug-in that comes with GIMP by default. – Michael Schumacher Apr 6 '16 at 21:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.