How to learn to use MagickWand for PHP

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Posts: 5
Joined: 2011-08-13T16:00:33-07:00
Authentication code: 8675308

How to learn to use MagickWand for PHP

Post by diegocaprioli »


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!

User avatar
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to learn to use MagickWand for PHP

Post 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 ... ptions.php
for PHP exec() see
for Imagick see