4

I have about 4000 images that need to be cropped. The task is rather simple really. They all have a white border that varies but is always between say 20 and 50 pixels. I want to use graphics magick to remove that white border from all the images. How?

3 Answers 3

3

The GraphicsMagick -trim operator here. Does what I need. Thanks for the other suggestions.

1

You could write a php script that crops all of the images.

http://php.net/manual/en/function.imagecopyresampled.php

1
  • This suffers the same issue as the above (only crops fixed sized borders).
    – unixman83
    Commented Apr 26, 2012 at 15:10
0

You can batch crop & resize images with the free IrfanView tool

1
  • Unfortunately the borders on the images vary. I can't tell IfranView to just crop all images by 20 px on each side. That would crop some of the content of some of my images.
    – unixman83
    Commented Apr 26, 2012 at 15:08

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