Page 1 of 1

How to learn to use MagickWand for PHP

Posted: 2011-08-23T18:55:34-07:00
by diegocaprioli
Hello,

I'm new to ImageMagick and to MagickWand. I'm moving from PHP's GD library because I need to work with very good quality images for professional photographer's websites. There is plenty of documentation for GD, but I can't say the same for MagickWand. It's really difficult to fien any good manual, tutorial or any example that teaches how to use it (apart from the very basic stuff).

For example, how to create good quality thumbnails? This is something PHP's GD is not good at... and ImageMagick can create thumbnails almost as good as Photoshop (at least that's what I read in other forums/blogs/etc), but I didn't find any useful information. All I have found is this topic viewtopic.php?f=10&t=9109&p=28257, where it's suggested something like "try it in the command line, and then try to find how to do it in the PHP API for your own". Is this the way to go? There's no other resource, document, manual or something that can help? Is really necessary to learn the command line first and then try to "guess" how to do the same in the API?

Is there anybody with some knowledge in MagickWand for PHP that can briefly write his/her experience learning it?

Thanks in advance!

Re: How to learn to use MagickWand for PHP

Posted: 2011-08-23T19:15:51-07:00
by fmw42
I would suggest you start with PHP exec() function to run commands as used in IM command line mode. There is lots of documentation on the command line functions. Then later you can learn to use MagickWand for PHP or try using Imagick for PHP as there is documentation for that.

for command line and PHP exec, see
http://www.imagemagick.org/script/comma ... ptions.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
and
for PHP exec() see
http://www.rubblewebs.co.uk/imagemagick/index.php
and
for Imagick see
http://us3.php.net/manual/en/book.imagick.php