PHP image processing module magickwand. MagickWand is a PHP module used to access the image processing library of ImageMagick. The following is a code snippet using MagicWand :? Php $ magick_wandNewMagickWand (); MagickReadIm MagickWand is a PHP module used to access the image processing library of ImageMagick. The following is a code snippet using 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 extension directory
Add extension = php_magickwand_q16_st.dll to the php. ini file.
Restart apache
Http://www.bkjia.com/PHPjc/486302.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486302.htmlTechArticleMagickWand is a PHP module used to access ImageMagick's image processing library. The following is a code snippet using MagicWand :? Php $ magick_wand = NewMagickWand (); MagickReadIm...