ImageMagick is a set of software (can be called a library) to process image files.
ImageMagick is well known for being compatible with many image formats and for its rich interface (API).
ImageMagick can help you perform simple operations such as: move, resize, rotate, skew drag, image zoom, adjust color, draw text, geometry ... to add effects as complex as gotham, lomo, kelvin, toaster (most complex filter) and nashville (most common filter).
Imagick is a PHP extension for creating and modifying images using the ImageMagick API.
yum install ImageMagick ImageMagick-devel
cd /usr/local/php73/bin
./pecl install imagick
In there php73 is the PHP version that I am using, if you use another PHP version, you can replace it accordingly like php56, php72…
At this point, the following message will appear, press Enter to be okay:
Please provide the prefix of ImageMagick installation [autodetect] :
/usr/local/bin/php --ini | grep 'Loaded Configuration File'
Results returned
Loaded Configuration File: /usr/local/php73/lib/php.ini
- Step 4: Edit php.ini file, run command
vi /usr/local/php73/lib/php.ini
You can use nano to edit, but not everyone knows how to use nano, so I will guide you with we
More extension=imagick.so at the end or anywhere you like (I usually add it at the end of the file)
Save the file and proceed to restart php-fpm
service php-fpm73 restart
php -m | grep imagick
The result returned as follows is done.
Good luck.
Post a Comment
Post a Comment