Installation: ImageMagick
The code is as follows: |
Copy code |
Wget http://www.imagemagick.org/download/ImageMagick-7.0.1-5.tar.gz Tar-xzvf ImageMagick-7.0.1-5.tar.gz ./Configure -- prefix =/usr/local/imagemagick Make Make install |
Install the php extension of ImageMagick:
The code is as follows: |
Copy code |
Yum install ImageMagick-devel-y Ln-s-f/usr/local/imagemagick/include/ImageMagick-7/usr/local/imagemagick/include/ImageMagick Wget http://pecl.php.net/get/imagick-3.1.0RC1.tgz Tar-xzvf imagick-3.1.0RC1 Phpize ./Configure -- with-php-config =/usr/local/php/bin/php-config -- with-imagick =/usr/local/imagemagick/include/ImageMagick Make Make install |
Php. ini configuration
The code is as follows: |
Copy code |
Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626 /" Extension = imagick. so
|
Attached Discuz configuration path:/usr/local/ImageMagick/bin
If you want to use ImageMagick to process image watermarks/zooming in the Discuz program, allow the exec function to run in the php. Ini file. Otherwise, it will not work.
Find disable_functions and remove the exec field.
Friendly reminder: allowing the php exec function to run may cause security problems. Please choose this function as needed.
The configuration encountered a strange problem./usr/local/ImageMagick/bin cannot be entered in php5.5... Go directly to pre_common_setting to search
Fill in imageimpath, and update the cache in the discuz background, which is perfect .... Bmp can also be compressed.