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.

Text made from an image on another image - Anthony 21/6/2008

This creates some text from on image and places it on another image.

  1. <?php  
  2. // Create the text from an image and a tempory mask of the word Rubblewebs
  3. $cmd " -size 490x110 xc:none -pointsize 90 ".
  4. " -gravity center -fill black -annotate +0+0 \"Rubblewebs\"  miff:- | ".
  5. " composite -compose Dst_In -gravity center - input.jpg -matte"
  6. Create tempory image
  7. exec("convert $cmd temp.png"); 
  8. // Place the word image from above over the second image
  9. exec("composite -gravity center temp.png input1.jpg output.png ");
  10. // Delete tempory image
  11. unlink('temp.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