Last active
January 28, 2021 09:44
-
-
Save clarityflowers/47003dc2817072fa1778776b62d291e8 to your computer and use it in GitHub Desktop.
Make a little dithered image
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 | |
USAGE="${0##*/} <origin> <dest> <size> <num-colors> [<filter-color> <filter-amount>]" | |
if [[ $1 == --help ]]; then | |
echo $USAGE | |
elif [[ -n $5 ]]; then | |
magick $1 -dither Floyd-Steinberg -resize $3 -colors $4 \ | |
\( +clone -fill $5 -colorize $6 \) -compose dissolve \ | |
-define compose:args=25 -colors $4 -composite \ | |
$2 && open -a Preview $2 | |
else | |
magick $1 -dither Floyd-Steinberg -resize $3 -colors $4 \ | |
$2 && open -a Preview $2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment