Originally from: http://www.cnblogs.com/cocowool/archive/2010/08/16/1800954.html
GraphicsMagick
Current stable version: 1.3.12 (release date 2010-03-08)
Brief Introduction :
GraphicsMagick is known as the Swiss Army knife in the field of image processing. The dapper Code provides a robust and efficient collection of tools and libraries to handle the reading, writing, and manipulation of images, supporting more than 88 image formats, including important DPX, GIF, JPEG, JPEG-2000, PNG, PDF, PNM, and TIFF.
By using OpenMP, you can use multithreading for picture processing, which enhances processing power by extending the CPU.
GraphicsMagick can be used on most platforms, Linux, MAC, windows are no problem.
GraphicsMagick supports the processing of large images and has done a gigabyte-level image processing experiment. GraphicsMagick can generate images dynamically, especially for applications in the Internet. Can be used to handle resizing, rotation, highlighting, color adjustment, adding special effects and so on. Gaphicsmagick not only supports command line mode, but also supports calls from C, C + +, Perl, PHP, Tcl, Ruby, and so on. In fact, GraphicsMagick is from the ImageMagick 5.5.2 Branch, but now he has become more stable and excellent, the following is a comparison between two.
GM is more efficient (evaluation), can complete processing work faster
GM smaller and easier to install
GM has been used by Flickr and Etsy to process millions of images per day
There is no conflict between GM and installed software
GM has little safety problems.
The Handbook of GM is very rich
... (irrelevant to the right nonsense)
How to install :
GraphicsMagick can be installed on any modern UNIX machine (Linux and MacOS X) and Windows, only the installation under Linux, and other installations need to see here.
Download the. tar.gz Source package for decompression
Tar-xvzf graphicsmagick-1.3.12.tar.gz
After decompression, the original GZ file becomes a tar file and enters the folder
CD GraphicsMagick-1.3.12
Before installation, because it is picture processing, it is necessary to install the libpng and Libjpeg development packages in the system, otherwise the support of both files will not be installed.
Use configure for automatic configuration, build, and installation
./configure
Of course, you can specify parameters through –prefix=path, and you can specify other compile-time variables, a tested configure configuration is used, and Enable-sybol-prefix is added, which avoids the ImageMagick, the following are the completed configuration parameters:
./configure '--build=i686-redhat-linux-gnu '--host=i686-redhat-linux-gnu '--target=i386-redhat-linux-gnu '-- program-prefix= '--prefix=/usr/local/sinasrv2 '--exec-prefix=/usr/local/sinasrv2 '--bindir=/usr/local/sinasrv2 /bin '--sbindir=/usr/local/sinasrv2/sbin '--sysconfdir=/usr/local/sinasrv2/etc '--datadir=/usr/local/sinasrv2/ Share '--includedir=/usr/local/sinasrv2/include '--libdir=/usr/local/sinasrv2/lib '--libexecdir=/usr/local/ Sinasrv2/libexec '--localstatedir=/usr/local/sinasrv2/var '--sharedstatedir=/usr/local/sinasrv2/share/com '-- Mandir=/usr/local/sinasrv2/share/man '--infodir=/usr/local/sinasrv2/share/info '--enable-libtool-verbose '-- With-included-ltdl '--enable-shared '--disable-static '--with-modules '--with-frozenpaths '--without-perl '-- Without-magick-plus-plus '--with-quantum-depth=8 '--enable-symbol-prefix
The next step is to install
Make
Make install
Install Gmaick:
After installing GraphicsMagick, you will also need to install Gmaick in order to use PHP, first download the installation package from PECL's website. Then unzip and go into the Gmaick directory.
CD GMAGICK-1.0.7B1
Then run Phpize
/usr/local/php/bin/phpize
Perform the installation process after completion
./configure--with-php-config=/usr/local/sinasrv2/bin/php-config--with-gmagick=/usr/local/sinasrv2/
Make
Make install
After php.ini opens the extension, restarting Apache is ready to use the
comparison with Magickwand :
This article uses 20 different sizes of picture files, respectively, using Gmagick and Magickwand to open the picture, read the picture information, close the operation of the picture, the final result is as follows:
Overall, the efficiency of magickwand than GraphicsMagick, but the efficiency of the increase seems to be processed with the file does not have a significant linear relationship, perhaps the picture is too small, it is said that GraphicsMagick can deal with GB-level pictures, more use of details, Can only be further studied in the future.
Resources:
1, GraphicsMagick
2, Gmagick
3, ImageMagick
4. OpenMP in GraphicsMagick
5. Resolve conflicts between GraphicsMagick and ImageMagick
6, Gmagick
7. Manipulating Images with PHP and GraphicsMagick
8, ImageMagick Installation Memo
Turn: GraphicsMagick Introduction and Installation