Created
June 14, 2020 15:34
-
-
Save omundy/a25ea3e80d1bbd07e7e5d0326f0a5158 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
## Convert non-transparent pixels in a PNG image to a solid color "silhouette" | |
## Uses imagemagick | |
# install imagemagick | |
brew update && brew install imagemagick | |
# convert input.png to silhouette | |
convert input.png -fill "cyan" -colorize 100 output.png | |
# convert *all* PNG files in current directory, overwriting existing files | |
find ./ -iname '*.png' -exec convert "{}" -fill "#990000" -colorize 100 "{}" \; | |
# convert *all* PNG files in current directory, save new file in output-files | |
mogrify -format png -path ../output-files/ -fill "#754bc3" -colorize 100 *.png | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment