

While find allows for much greater control where output files will be placed, it is also possible to do the same with ImageMagick's mogrify: mogrify -trim *.pngĪnd if you want to crop colors near the corner colors (adjust the percentage based on the results you are observing): mogrify -trim -fuzz 10% *.png ImageMagick Batch Trim (find)Ībove command for ImageMagick Trim can also be used to batch process images combined with the find command: find.

Use the option +repage to remove a canvas (if applicable). Note: The -fuzz option must precede -trim because options' order matters for convert command to work as expected. fuzz 10%) also removes colors near the corner colors. The additional option -fuzz (which takes a percentage as an argument, e.g.

Usage: convert input.png -trim output.png The command line option trim used together with convert, or mogrify lets you trim borders of the same color as the corners of an image.
