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.
  1. Install php and the php-devel packages.
  2. Download the source from http://www.magickwand.org/download/php/
  3. Unzip tarball, and change into directory
  4. Type "phpize"
  5. Type "autoconf"
  6. Type "./configure"
  7. Type "make"
  8. You should end up with the file modules/magicwand.so and copy that to /usr/lib/php4/ or /usr/lib/php/modules (for php5).
  9. You *must* (at least on my system) add the line in your php.ini "extension=magickwand.so
  10. 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

  1. 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)
  2. Place the file in the ext directory of your PHP installation.
  3. Add extension="php_magickwand_q16_st.dll" to your php.ini file
  4. Restart Apache
  5. 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:

  1. Freetype2
  2. libwmf
  3. Ghostscript 8
  4. JPEG Tools & Library
  5. ImageMagick
  6. FontForge
  7. 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

by , 15 May 2005 (22:26 UTC)
download it from http://www.php.net/downloads.php and use with PHP5

by hiran, 29 Nov 2006 (19:26 UTC)
Sorry, guys. I keep getting
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'

by Liutauras, 03 Feb 2007 (22:46 UTC)
magickwand-0.1.9 gives me:
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

by Phil R, 06 Mar 2007 (16:25 UTC)
I found that the problem with being unable to find the .so file was the base extension path in php.ini. If I made that path absolute, it worked fine.
  Page 1 of 1  1