Image processing process graphicsmagick Image Processing System

Source: Internet
Author: User
Tags php server
Http://www.graphicsmagick.org/

 

Resource Collection: http://cn.php.net/gmagick.modulateimage

Procedure

1: install PHP extension gmagick-1.0.9

# Installation 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
Copy code

2. Modify the php. ini file.

# Modifying the 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
Copy code

3: display the configuration information of the PHP server and check whether the extension is installed.

# Creating files
VI/usr/local/apache2/htdocs/index. php
# Write
<? PHP
Phpinfo ();
?>
Copy code

Graphicsmagick PHP extension usage

Procedure

1: Prepare an image, like Sun honglei

<? PHP
# If an extension error is reported, install LibPNG, libjpeg, and libmcrypt in the default directory.

$ Image = new gmagick('1.jpg ');

$ Image-> borderimage ('blue', 3,3)-> oilpaintimage (0.1 );

$ Image-> write('2.jpg ');
?>
Copy code

 

<? PHP
$ Image = new gmagick('1.jpg ');

// Change the image size
$ Image-> resizeimage (100,200 );

$ Image-> write('2.jpg ');
?>
Copy code

Source: http://www.cnblogs.com/wubaiqing/archive/2011/10/01/2196280.html

 

Graphicsmagick PHP extension usage

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.