Magickwand is a PHP module used to access the ImageMagick image processing library. Here is a code snippet that uses Magicwand:
-
- $magick _wand =newmagickwand ();
- magickreadimage ($magick _wand,rose.jpg);
- $drawing _wand =newdrawingwand ();
- Drawsetfont ($drawing _wand,"/usr/share/fonts/bitstream-vera/vera.ttf" );
- drawsetfontsize ($drawing _wand, 20);
- drawsetgravity ($drawing _wand, mw_centergravity);
- $pixel _wand =newpixelwand ();
- Pixelsetcolor ($pixel _wand,"white");
- Drawsetfillcolor ($drawing _wand,$pixel _wand);
- if (Magickannotateimage ($magick _wand,$drawing _wand, 0,0,0, "Rose" )! = 0)
- {
- Magickechoimageblob ( $magick _wand );
- }
- Else
- {
- Echo magickgetexceptionstring ($magick _wand);
- }
- ?>
Installation method:
Download Php_magickwand_q16_st.dll for 5.2.x
Put it in the PHP extensions directory
Total increase in php.ini files Extension=php_magickwand_q16_st.dll
Re-launch Apache
http://www.bkjia.com/PHPjc/486302.html www.bkjia.com true http://www.bkjia.com/PHPjc/486302.html techarticle Magickwand is a PHP module used to access the ImageMagick image processing library. Here is a code snippet that uses Magicwand: PHP $magick _wand =newmagickwand (); Magickreadim ...