Last active
June 26, 2019 13:35
-
-
Save gotofritz/4645209 to your computer and use it in GitHub Desktop.
ImageMagick bits and pieces
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
# resize image, padded |
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
# This will resize images so that they exactly X wide and Y high, keeping the image ratio, and centering them, padding as needed with black | |
convert -resize XxY source.jpg -background "#000000" -gravity center -extent XxY destination.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment