Install ImageMagick and Imagick tutorials under Linux

Source: Internet
Author: User
Tags imagemagick ini zts

ImageMagick Installation

wget http://www.imagemagick.org/download/ImageMagick.tar.gz
Tar zxvf ImageMagick.tar.gz
CD imagemagick-6.8.9-7
./configure--prefix=/usr/local/imagemagick/--enable-lzw--with-modules--with-quantum-depth=8?--enable-shared- Disable-openmp
Make && make install

Compile the installation process for a long time, please be patient!

Execution after installation:/usr/local/imagemagick/bin/convert logo:logo.gif test to see if ImageMagick can function correctly, if no errors are prompted, and then check the directory where the command was executed. See if the logo.gif file is generated.

You can also run convert-version command detection after the installation is complete, and you should receive information similar to the following:


<p>version:imagemagick 6.8.9-7 Q8 x86_64 2014-08-20 http://www.imagemagick.org<br>
Copyright:copyright (C) 1999-2008 ImageMagick Studio llc</p>

Convert default is installed under/usr/local/imagemagick/bin, the above command may indicate that the convert command could not be found, then you can create a/usr/bin below the/usr/local/imagemagick/bin Links to/convert:

Cd/usr/bin
Ln-s/usr/local/imagemagick/bin/convert Convert

ImageMagick Installation Instructions

1, in the installation can also add –without-xxx to prohibit a number of options, specific./configure–help | grep without to see what it is;

2. Notes on Q8,q16,q32:

3, –enable-shared compiled into a shared library;
4, –disable-openmp Disable multithreading, the use of multithreaded performance did not improve, but CPU occupancy reached 100%, so disabled;

5, uninstall command: Make uninstall.

PHP Extended Imagick Installation

wget http://pecl.php.net/get/imagick-3.1.2.tgz
Tar zxvf imagick-3.1.2.tgz
CD imagick-3.1.2
Phpize//Each server location is different
./configure--with-php-config=/your PHP path/php-config--with-imagick=/usr/local/imagemagick/
Make && make install

Imagick Installation Execution Results

Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files:/usr/local/php/include/php/
Generate imagick.so to/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/, Then manually configure PHP.ini to take effect, manually add Imagick extensions to the php.ini, extension=imagick.so, restart PHP, check the phpinfo to see if the load succeeds, the extension is not used – With-imagick PHP in the compiler when the static compiled into PHP, but similar to the Memcache way, compiled into so module dynamic loading.

Imagick solution when unable to install

Sometimes installing Imagick will prompt:

"Configure:error:not found. Please provide a path to Magickwand-config or Wand-config program. "

This is because only the "ImageMagick" is installed and the "Imagemagick-devel" is not installed, the Imagemagick-devel is installed through the following command line, and then the previous steps to install Imagick will be done.

Yum Install Imagemagick-devel

discuz! ImageMagick settings on X

Login discuz! x background, select ImageMagick in the "Upload settings" and write on the ImageMagick program installation path:/usr/local/imagemagick/bin/

Turn off multithreading

Single-thread conversion each picture about 50ms, two threads but need 500ms?

Check with the convert–version command to see if OpenMP appears, because the machine does not support OpenMP, and needs to be recompiled./CONFIGURE–DISABLE-OPENMP, and then install.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.