ImageMagick
Using the Imagemagick image processing package with bitweaver
Created by: Lester Caine, Last modification: 14 Jun 2007 (07:43 UTC)
MagickWand
The official API from the ImageMagick project is called MagicWand. This program interface is highly capable and well supported.For developers, we have the MagickWand API documentation available.
MagicWand on Unix
Currently there is now RPM distro for the magickwand API. However, the good news is that it is very easy to compile.- Install php and the php-devel packages.
- Download the source from http://www.magickwand.org/download/php/
- Unzip tarball, and change into directory
- Type "phpize"
- Type "autoconf"
- Type "./configure"
- Type "make"
- You should end up with the file modules/magicwand.so and copy that to /usr/lib/php4/ or /usr/lib/php/modules (for php5).
- You *must* (at least on my system) add the line in your php.ini "extension=magickwand.so
- restart apache, and hit kernel/admin/phpinfo.php to make sure you have it installed and running.
MagicWand on UNIX as embedded ext in PHP src-build
if you're installing MagickWand-PHP *into* (embedded) a PHP src build, the instructions are just a little different ...i've removed this option/comment, as bw.o's installer isn't 'happy' unless the re's a standalone *.so ... i.e., don't embed the extension.
MagicWand on Windows
- Download php_magickwand_q16_st.dll from ftp://ftp.imagemagick.org/pub/ImageMagick/php/windows (This is for 5.2.x still tring to find a copy for PHP5.1.x)
- Place the file in the ext directory of your PHP installation.
- Add extension="php_magickwand_q16_st.dll" to your php.ini file
- Restart Apache
- Here are detailed instructions for windows
php-imagick
php-imagick was a 3rd party interface to the ImageMagick code libraries. It has not been well supported, and Windows support is very sketcky at best. The API support is also incomplete in areas. We highly recommend MagickWand instead for these reasons.ImageMagick for Unix
ImageMagick for OSX
An elegantly simple way to get ImageMagick etc installed on OSX is to use the TeXShop installer ...
cref: http://darkwing.uoregon.edu/~koch/texshop/index.html
fwiw, i use the installer to install/maintain:
- Freetype2
- libwmf
- Ghostscript 8
- JPEG Tools & Library
- ImageMagick
- FontForge
- TeX (Basic Installation, 2004 Stable)
for MagickWand-PHP to build successfully you'll need to install, of course 'ImageMagick', as well as the libjasper jpeg libs (cref: http://www.ece.uvic.ca/~mdadams/jasper/) provided by the 'JPEG Tools & Library' install, above.
ImageMagick for PHP5 on Windows
Install version 5.5.7 of ImageMagic ( same applies for PHP4 )
http://sourceforge.net/project/showfiles.php?group_id=24099&package_id=47692&release_id=236163
The Q16 versions provide 48/64 bit resolution(16 bits per pixel), while the Q8 versions provide 24/32 bit (8 bit per pixel). The Q8 is probably more than adaquate for bitweaver.
PHP5
Get php_imagick.dll from the matching PECL distribution for your version of PHP5
http://www.php.net/downloads.php
PHP4
4.3.x distributions do not have this file
but the http://php.chregu.tv/php_imagick.dll link should work with PHP4
Just for the record
http://kromann.info/download.php?strFolder=php5-Release_TS&strIndex=PHP5
Always has the latest build for the current development version of PHP5.1
Comments
php_imagick is part of PECL
codePHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Programme\\PHP\\ext\\php-5.0.4_magickwand_q8_st.dll' - Die angegebene Prozedur wurde nicht gefunden.\r\n in Unknown on line 0/code
which says the given method was not found. But I am on PHP 5.2.0.
Unable to load dynamic library '/usr/lib/php/extensions/magickwand.so'
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/magickwand.so' - /usr/lib/php/extensions/magickwand.so: undefined symbol: MagickRecolorImage in Unknown on line 0
while
magickwand-0.1.8 - loads ok
My system:
Mandriva 2007, 2.6.17-5mdv, Apache 2.2.3, PHP 5.1.6
Tried magickwand form src rpms from Mandriva Contribs and building from source. Either way magickwand 0.1.9 could not be loaded.
.so not found