Snippets - Text
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.
Fonts installed - Anthony 15/6/2008
You can find which fonts are available to you in your standard installation by using the code below. ( NB: "font" replaced "type" in the latest release due to a name clash for the '-type' options list ).
<?php// Select the version number from the configeration filepreg_match('/^LIB_VERSION_NUMBER ([0-9,]+)$/m', shell_exec("convert -list configure "), $vnums);// Seperate the numbers at the ,$number = explode( ",", $vnums[1] );// Format the version from 6,3,4,1 format to 06030401$version = "";for($i=0;$i<4;$i++){$version .= str_pad( $number[$i], 2, '0', STR_PAD_LEFT );}// The 'list' method used to get the fonts changed in IM v6.3.5-7$font_list = ( $version > "06030507" ) ? "font" : "type";// Display the version of Imagemagick, the method to read the fonts and the list of fontsecho "<h2>IM version: ".$version." </h2>\n<h3>Method used: convert -list $font_list</h3>\n<hr>\n<pre>";system("convert -list $font_list");echo "</pre>\n<hr>";?>
For more examples and information check out the main Imagemagick section.
Add a label ViewChange 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