Skip to content

Instantly share code, notes, and snippets.

@nhandl3
Last active December 25, 2015 04:09
Show Gist options
  • Save nhandl3/6914778 to your computer and use it in GitHub Desktop.
Save nhandl3/6914778 to your computer and use it in GitHub Desktop.
imagemagic, command line watermark text into image
# make stamp
convert -size 300x50 xc:grey30 -font Arial -pointsize 50 -gravity center \
-draw "fill grey70 text 0,0 'SomeText'" \
stamp_fgnd.png
convert -size 300x50 xc:black -font Arial -pointsize 50 -gravity center \
-draw "fill white text 1,1 'SomeText' \
text 0,0 'SomeText' \
fill black text -1,-1 'SomeText'" \
+matte stamp_mask.png
composite -compose CopyOpacity stamp_mask.png stamp_fgnd.png stamp.png
mogrify -trim +repage stamp.png
# watermark
composite -gravity south -geometry +0+10 stamp.png test.jpg \
wmark_text_stamped.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment