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