Skip to content

Instantly share code, notes, and snippets.

@Boldewyn
Created December 18, 2012 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Boldewyn/4326313 to your computer and use it in GitHub Desktop.
Save Boldewyn/4326313 to your computer and use it in GitHub Desktop.
Apply an alpha mask from mask.img on an image source.img and store in result.img.
#!/bin/sh
SOURCE=$1
MASK=$2
TARGET=$3
convert "$SOURCE" "$MASK" -compose CopyOpacity -composite "$TARGET"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment