PHP image processing Module magickwand_php Tutorial

Source: Internet
Author: User
Tags image processing library imagemagick vars
Magickwand is a PHP module used to access the ImageMagick image processing library. Here is a code snippet that uses 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 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 ...

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