Install Imagick and ImageMagick for PHP on CentOS

Source: Internet
Author: User
Tags imagemagick

Imagick is a local extension of PHP that creates and modifies a picture by invoking the API provided by ImageMagick.

And ImageMagick is a set of software series, mainly for the creation of pictures, editing and creating bitmap pictures,
It supports many formats for picture reading, conversion, and editing,
These formats include DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIF, and more.
ImageMagick's official website (http://www.imagemagick.org/script/index.php) describes it as:

Imagemagick®is a software suite to create, edit, compose, or convert bitmap images.
It can read and write images in a variety of formats (over) including PNG, JPEG, JPEG-2000, GIF,
TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort,
Shear and transform images, adjust image colors,
Apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
Because Imagick uses the API inside the ImageMagick, we need to install ImageMagick first.
This article provides two ways to install Imagick and ImageMagick

Here is an example of a CentOS system:

Installing ImageMagick
Yum Install ImageMagick
Yum Install Imagemagick-devel
Yum Install Php-pear
Yum-y Install Php-devel
Installing Imagick
Yum Install GCC
Yum install gcc gcc-c++ autoconf automake
PECL Install Imagick

Tips:
Please provide the prefix of Imagemagick installation [AutoDetect]:
Note: It will require you to provide a ImageMagick installation prefix, which can be automatically detected by pressing the ENTER key.

Enable Imagick in PHP
You can manually add extension=imagick.so to the/etc/php.ini,
or directly under the shell command echo extension=imagick.so >>/etc/php.ini
Then restart PHP-FPM and Nginx separately:
or direct service httpd restart
iteblog#/ETC/INIT.D/PHP-FPM Reload
iteblog#/usr/sbin/nginx-s Reload
Verify
Verify with the following command

iteblog# Php-m | grep Imagick
Imagick
If the above information is output, the installation is successful.

Install Imagick and ImageMagick for PHP on CentOS

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.