#!/bin/sh # # Given a shaped image, create a color image with a highlight shading. # INPUT=$1 COLOR=$2 OUTPUT=$3 convert $INPUT -matte \ \( +clone -channel A -separate +channel -negate \ -bordercolor black -border 5 -blur 0x2 -shade 120x30 \ -normalize -blur 0x1 -fill $COLOR -tint 100 \) \ -gravity center -compose Atop -composite \ $OUTPUT #\( +clone -fx A +matte -bordercolor black -border 5 \