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

closed as off-topic by Zach Saucier, Cai, DᴀʀᴛʜVᴀᴅᴇʀ Apr 5 '16 at 16:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "If you're asking for help with implementation, please include what you've tried and why it didn't work with screenshots. Please edit your post with what your desired results are, what resources you referenced and why those didn't work. See this meta post for discussion and see this post on how to ask a good question." – Zach Saucier, Cai, DᴀʀᴛʜVᴀᴅᴇʀ
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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?


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.