Created
September 20, 2010 15:18
-
-
Save ajashton/588052 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/sh | |
# Applies a greyscale image as the alpha channel to another image. | |
# Black will be transparent, white will be opaque. | |
# Useful for tilesets, ie: find . -name "*.png" -exec alphafy.sh {} \; | |
tile=$1 | |
fill_tile=/mnt/white.png | |
echo "Tile: $tile" | |
mv "$tile" "$tile.bak" && \ | |
composite -compose CopyOpacity "$tile.bak" "$fill_tile" "$tile" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment