Install ImageMagick Correctly and Easily
ImageMagic is an opensource program which can be used to manipulate raster images, this quick post we are looking into ways how you can install ImageMagic into your Ubuntu or Mac computer
In Ubuntu
1. Install ImageMagic through the console
sudo apt-get install imagemagick #verify installation by convert --version #install php extension cd /opt/lampp/bin sudo ./pecl install imagick
if the final command fails and gives
if you cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable.
Then, rerun this script.
apt-get install autoconf
Finally go to php.ini and add this line ( /opt/lampp/etc )
extension=imagick.so
if this did not work you may need to set the php.ini path
./pecl config-set php_ini /opt/lampp/etc/php.ini
Restart the server
In Mac Computer
brew install imagemagick cp /opt/local/lib/libfreetype.6.dylib /Applications/XAMPP/xamppfiles/lib
Finally go to php.ini and add this line ( /opt/lampp/etc )
extension=imagick.so
Restart the server, ReadMore on detailed instructions, also if you like this article comment below.. wait there is more if you wanted to install ImageMagic because you wanted to write some image manipulation code with PHP we have got you covered with a simple yet powerful free library which does image manipulation insanely easy. check out ImageArtist article