ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats like GIF, JPEG, PNG, Postscript, and TIFF. We can also 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.
Install ImageMagic on CentOS/RHEL
Follow the below command to install ImageMagic on CentOS/RHEL.
1. Install Required Packages
First of all you need to install required packages if not installed to install ImageMagic and IMagic PHP extension.
# yum install gcc php-devel php-pear
2. Install ImageMagic
Now run the below command to install ImageMagic.
# yum install ImageMagick ImageMagick-devel
3. Install ImageMagick PHP Extension
You have effectively installed ImageMagick bundle on your system. Presently we have to introduce ImageMagick php extension. Use following command to install ImageMagick php extension.
# pecl install imagick # echo "extension=imagick.so" > /etc/php.d/imagick.ini
4. Restart Apache
Now restart the apache web service.
# service httpd reload