Last active
April 25, 2022 17:19
-
-
Save lincerely/fef57ebf16e396dc3ab0db087d7520b2 to your computer and use it in GitHub Desktop.
[imagemagick] get clear color from top left corner and set it to transparent
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
#!/bin/sh | |
# | |
if [ $# -ne 2 ]; then | |
echo usage: clear_color.sh IN_FILE OUT_FILE | |
exit 1 | |
fi | |
convert "$1" -transparent "#"`magick "$1" -format "%[hex:p{0,0}]" info:` "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment