Loading...
 
Skip to main content
How to install ImageMagick

Install ImageMagick

For those that use the image gallery in tiki, note that GD is used by php for image processing. But GDlib comes with some restrictions on file formats, especially regarding GIF use. Support for Image Magick is added now, that offers a wider range of available file formats.

Install ImageMagick and Libs

Get Image Magick from http://www.imagemagick.org/

  • Be sure to install the libraries.
    • On RPM based system (RedHat, Mandrake)
      rpm -q libMagick5
      libMagick5-5.4.8.3-2mdk
    • On APT based system (Debian, Knoppix)
      apt-get -s install imagick

Install Imagick PECL Module

  • Get the PECL module from http://pecl.php.net/package/imagick Or use pecl to download it:
    Copy to clipboard
    pecl install imagick
    • Activate the extension in /etc/php.ini
      Copy to clipboard
      extension=imagick.so
  • Windows Users can download a dll from http://php.chregu.tv/php_imagick.dll or http://snaps.php.net/ pecl file. php_imagick.dll has to be placed into the extension_dir directory (/php/extensions...), add
    Copy to clipboard
    extension=php_imagick.dll
    to php.ini, and finally copy all the dll files from ImageMagick installation root directory to /windows/system32.
  • Debian sid users have that package : apt-get install php4-imagick
  • Other users have to compile it. To compile it, you have to recompile your PHP Get the PHP sources on http://php.net, read the INSTALL file from the imagick module and ./configure PHP with --with-imagick

Special Tip :
If your compilation stops, There are 2 Bugs:

  • do a "rm ./configure" in your php src directory before performing Step 8 of the INSTALL-file of imagick.
  • edit imagick.c (Version 0.95) Line 624 should be "RunlengthEncodedCompression" not "RLECompression", this may depend on your libMagick however your make should tell you the right way. Install your new PHP, restart your webserver. Do a phpinfo() to see if Imagick support is added. If not, you may have forgot to rm ./configure.

Tikiwiki setting up

In the Image Gallery Config select Imagick as Library to use for processing images. If PHP is unable to find the PHP Imagick the setting reverts back to GD.

Useful Links