Snippets - Text

Snippets index page

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.

Multiple text on an image - Anthony 21/6/2008

Write multiple shadowed text onto an image.

  1. <?php  
  2. $cmd " input.jpg -font Arial ".
  3. " -pointsize 50 -draw \" gravity north fill black text 0,-5 'Rubblewebs' \" ".
  4. " -pointsize 25  ".
  5. " -draw \" gravity north fill black text 2,47 'Website design' \" ".
  6. " -draw \" gravity north fill white text 0,45 'Website design' \" ".
  7. " -draw \" gravity north fill black text 2,77 'www.rubblewebs.co.uk' \" ".
  8. " -draw \" gravity north fill white text 0,75 'www.rubblewebs.co.uk' \" ".
  9. " -draw \" gravity north fill black text 2,107 'anthony@rubblewebs.co.uk' \" ".
  10. " -draw \" gravity north fill white text 0,105 'anthony@rubblewebs.co.uk' \" "
  11. exec("convert $cmd output.png ");
  12. ?>

For more examples and information check out the main Imagemagick section.

Add a label View

Change font to Italic View

Fonts installed View

Fonts Installed view View

Label with image data View

Multiple text on an image View

Text made from an image on another image View

Watermark text and shadow View

Watermark tiled text View