Created
April 29, 2022 15:20
-
-
Save jamesrampton/bb57d6c9127a460a245bb815161414cd to your computer and use it in GitHub Desktop.
GraphicsMagick add 10% border based on shortest edge
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 | |
BORDER=$((`gm identify -format "%w\n%h" image.jpg | sort -n | head -1`*10/100)) | |
gm convert -border $BORDERx$BORDER -bordercolor #111111 image.jpg image-with-border.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment