Created
July 29, 2017 10:51
-
-
Save hskang9/96bb7833b9ce06d2638fd46f8ad1fcdc to your computer and use it in GitHub Desktop.
Auto bbox crop using imagemagick for images in a folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reference : http://www.imagemagick.org/Usage/crop/ | |
for PHOTO in *.jpeg | |
do | |
BASE=`basename $PHOTO` | |
convert $BASE -crop `convert $BASE -virtual-pixel edge -blur 0x15 -fuzz 15% \ | |
-trim -format '%wx%h%O' info:` +repage cropped/$BASE; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment