Use ImageMagick to trim empty around an image
The area around the image can also be white instead of transparent like below.
Usage
convert before.png -fuzz "1%" -trim +repage after.png
Example
As bash/zsh function
function convert-trim; {
convert "$1" -fuzz "1%" -trim +repage "$1"
}
$ convert-trim image.png
Written by Raine Virta
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Imagemagick
Authors
Related Tags
#imagemagick
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#