Skip to content

Instantly share code, notes, and snippets.

@themarcthomas
themarcthomas / moo-code
Last active August 29, 2015 14:00
ImageMagick Shell Command for Discount Codes
#!/bin/sh
#
# Uses ImageMagick to add text to an image based on Graham Ashton's Gist: https://github.com/gma/moo-card-codes.
COLOR="${COLOR:-black}"
FONT="${FONT:-Courier-Bold}"
FONT_SIZE="${FONT_SIZE:-31}"
TEMPLATE="${TEMPLATE:-template.jpg}"
TEXT_POSITION_X="${TEXT_POSITION_x:-+450}"
TEXT_POSITION_Y="${TEXT_POSITION_Y:-+365}"