PHP image processing module magickwand_PHP tutorial

Source: Internet
Author: User
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:

 
 
  1. $magick_wand=NewMagickWand();
  2. MagickReadImage($magick_wand,rose.jpg);
  3. $drawing_wand=NewDrawingWand();
  4. DrawSetFont($drawing_wand,"/usr/share/fonts/bitstream-vera/Vera.ttf");
  5. DrawSetFontSize($drawing_wand,20);
  6. DrawSetGravity($drawing_wand,MW_CenterGravity);
  7. $pixel_wand=NewPixelWand();
  8. PixelSetColor($pixel_wand,"white");
  9. DrawSetFillColor($drawing_wand,$pixel_wand);
  10. if (MagickAnnotateImage($magick_wand,$drawing_wand,0,0,0,"Rose") != 0)
  11. {
  12. MagickEchoImageBlob( $magick_wand );
  13. }
  14. else
  15. {
  16. echo MagickGetExceptionString($magick_wand);
  17. }
  18. ?>

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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.