Created
January 27, 2017 03:25
-
-
Save dobesv/67a698b99a76b5e192b1875183d819d5 to your computer and use it in GitHub Desktop.
Re-center all the pngs in the current folder using ImageMagick
This file contains 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
#!/usr/bin/env bash | |
# Re-center all the pngs in the current folder using ImageMagick | |
for F in *.png ; do | |
convert -size $(identify -format '%wx%h' $F) xc:white \( $F -trim \) -gravity center -compose copy -composite $F | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment