Php+imagemagick+imagick API Configuration Guide _php Tutorial

Source: Internet
Author: User
Tags imagemagick
To download the relevant software first:

ImageMagick 5.5.7
Ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-5.5.7-15.tar.gz

Imagick:a native PHP (as the current mainstream development language)-extension to ImageMagick
Wget http://pecl.php (as the current mainstream development language). net/get/imagick-0.9.8.tgz


How do you not know what ImageMagick is, you might as well come here to see the charm of ImageMagick
Use ImageMagick to flip, scale, rotate, and more
ImageMagick Learning


How ImageMagick is more powerful than GD, so we'll install it.

What we're going to talk about today is to make PHP support ImageMagick instead of using ImageMagick's command line for graphical conversion.

Tar imagemagick-5.5.7-15.tar.gz
CD ImageMagick-5.5.7

./configure
ldflags= "-l/usr/lib" cppflags= "-i/usr/include"
--prefix=/usr/local/imagemagick
--enable-shared
--enable-lzw
Make
Make install

More parameters everyone see compile help.

By the way, forget to tell everyone, it is best not to use Redhat to bring the Imagemagick-devel package, or compile their own good, otherwise you compile PHP (as the mainstream development language now) will be killed, I said in the front, out of the question don't blame I didn't say oh:)

To join the ImageMagick API for PHP, which is now the mainstream development language. Then we need two times to compile PHP (as the mainstream development language now), PHP (as the current mainstream development language), after the first compilation, will produce the PHP we need to compile the API (as the current mainstream development language) ize this program. The first compilation does not speak, and the second time after the compilation basically almost.

In PHP (as the current mainstream development language) of the source code directory

1. mkdir Ext/imagick
2. Then unzip the imagick-0.9.8.tgz into the Ext/imagick directory.
3. Run command PHP (as the current mainstream development language) ize
4. CD PHP (as the current mainstream development language) source code root directory
5. RM Configure
6../buildconf--force #好像不加--force not allow configure file to be re-generated

The following is the second compilation of PHP (which is now the mainstream development language)


./configure--prefix=/usr/local/php (as the current mainstream development language)
--with-mysql (best combination with PHP) =/usr/local/mysql (the best combination of PHP collocation)
--with-imagick=/usr/local/imagemagick
--with-apxs=/usr/local/apache (the most popular Web server platform for UNIX platforms)/bin/apxs
Make
Make install

As for the other parameters of PHP (which is now the mainstream development language), you can add the appropriate data.

All right, write a test program for PHP, which is now the mainstream development language.

PHP (as the current mainstream development language) info ();
?>

Congratulations, the installation has been successful, to enjoy the great features of ImageMagick

http://www.bkjia.com/PHPjc/508658.html www.bkjia.com true http://www.bkjia.com/PHPjc/508658.html techarticle Download the relevant software first: ImageMagick 5.5.7 ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-5.5.7-15.tar.gz imagick:a Native PHP (as the current mainstream development language)-exte ...

  • Related Article

    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.