Snippets - Watermark
NOTE: Most of the IM snippets have been tested on IM version 6.3.5 There may be some differences if you are using the code on other versions.
Watermark tiled text - IM Forum 15/6/2008
This uses the imagemagick miff which saves the image into the memory and then the Unix "pipe". This uses the image created in the first part of the code in the second part of the code. Note the extra - between -tile and the image name; without it the code will fail.
<?php$cmd = "-size 140x80 xc:none -fill grey -gravity NorthWest "." -draw \"text 10,10 'Copyright'\" -gravity SouthEast "." -draw \"text 5,15 'Copyright'\" miff:- | composite "." -tile - input.jpg";exec("convert $cmd output.png");?>
