#!/bin/zsh -f

if [[ ! -x $(which composite) ]];then
    print "You need to install ImageMagick and have it in your $PATH"
    return 1
fi

# overlay two pdf files and produce a composite in which one file is red and the other is blue.

if [[ $# == 3 ]];then
    composite -density 300x300 -compose copyred "$@"

    open -a Preview "$3"
else
    print "Usage:    overlay imagefile1 imagefile2 name_of_output_file "
    print "Uses the ImageMagick composite command.  Any image file types can be mixed and matched."
    return 1
fi
