Page 1 of 1

Auto-cropping

Posted: 2010-02-09T14:24:38-07:00
by michaelmuller
I've looked through the documentation and can't find anything that will autocrop an image.

For example, a 500px X 500px file that has only a 100px X 100px logo near the bottom left on a white background.

Anyway for the utility to auto-find the top, left, right and bottom edges of image data within a larger file?

Thanks.

Re: Auto-cropping

Posted: 2010-02-09T14:28:35-07:00
by Bonzo
-trim would work for the logo on a white background example you quoted.

Re: Auto-cropping

Posted: 2010-02-09T15:25:33-07:00
by fmw42
add -fuzz XX% -trim

if the background is not pure white.

also see my autotrim script at the link below