What is graphicsmagick?
How to install graphicsmagick?
PHP Image Processing (I) graphicsmagick introduction and Installation
Graphicsmagick PHP extension Installation
Operating System: centos 5.6 environment: Lamp
Programming Language : PHP: gmagick documentation: gmagick
Procedure
1: install PHP extension gmagick-1.0.9
#Install Extension
Tar-zxvf gmagick-1.0.9b1.tgz
CD gmagick-1.0.9b1
/Usr/local/PHP/bin/phpize
./Configure -- With-PHP-Config =/usr/local/PHP/bin/PHP-config
Make
Make install
2. Modify the php. ini file.
# Modify configuration file
VI/usr/local/PHP/etc/PHP. ini
# Extension_dir = './' change the path
Extension_dir = "/usr/local/PHP/lib/PHP/extensions/no-debug-non-zts-20060613/gmagick. So"
# Enable gmagick Extension
Extension = gmagick. So
# Restart Apache
/Usr/local/apache2/bin/apachectl restart
3: display the configuration information of the PHP server and check whether the extension is installed.
#Create a file
VI/usr/local/apache2/htdocs/index. php
#Write
<? PHP
Phpinfo();
?>
Graphicsmagick PHP extension usage
Procedure
1: Prepare an image.Sun honglei
<? PHP
#If an extension error is reported, install LibPNG, libjpeg, and libmcrypt in the default directory.
$ Image=NewGmagick('1.jpg ');
$ Image-> Borderimage ('blue', 3,3)-> oilpaintimage (0.1 );
$ Image-> Write('2.jpg ');
?>
<? PHP
$ Image=NewGmagick('1.jpg ');
//Change image size
$ Image-> Resizeimage (100,200 );
$ Image-> Write('2.jpg ');
?>
For more information, see the relevant documentation above.
Graphicsmagick PHP extension Installation
graphicsmagick PHP extension