Created
September 30, 2016 08:03
-
-
Save uxder/04de77e04557c53eaea46adc396bb1bd to your computer and use it in GitHub Desktop.
alpha-transparency-gif-maker.sh
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
## A script to make a series of pngs that uses alpha transparency into an animated gif. | |
## Gifs only support 100% transparent or a 100% opaque pixel colors so imagemagick will convert your 80% transparent color into 100%. | |
## Requires: Imagemagick | |
# Make all transparency into white pixels. | |
mogrify -background white -alpha remove *.png | |
# Convert the white pixels back to transparency. | |
for f in *.png | |
do | |
echo "Processing for - $f" | |
# convert $f -white-threshold 90% -transparent white $f | |
convert $f -transparent white $f | |
done | |
convert -alpha set -delay 1.5 -dispose 2 -loop 0 *.png animated.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment