I am excited to announce the release of the Gmagick PHP extension, which I ported from Imagick along with Mikko Koppanen, one of the Imagick author who got me to do the extension and guided me along the way.
The extension seeks to make the image processing capability of GraphicsMagick accessible from PHP. GraphicsMagick is forked from version 5.5.2 of ImageMagick and had since developed with important differences and improvements (for more details, see GraphicsMagick's website).In terms of Gmagick and Imagick, we try to keep the method interface similar so existing Imagick users will find converting to Gmagick a breeze. One major difference however, is that most of the mutator methods in Gmagick are chainable.
We'll leave you to decide which extension is more suitable for your needs. A high level difference that we keep in mind when developing Gmagick is that Imagick's feature set is more extensive and powerful, whereas Gmagick should be simpler and more efficient (see benchmarks).
Does it have compatibility with PHP 5.3-dev? I'm going to find out in about an hour, but it would be nice if it did.
ReplyDeleteAll I have to say is, "Yes!" and "Oh hell yes!"
Seems nice.. but I have a hard enough time finding documentation on how to use the imagick php extension.. this one seems to lack that as well..
ReplyDeleteDocumentation for the supporting library isn't enough..the mappings don't always match 100%.
Hi Vito,
ReplyDeleteGmagick looks promising!
But can you point me to api documentation/example code? I can't find anything besides the source code itself.
Regards,
Tuk
Awesome. I'm sick of GD2's inefficiency and tried GM today, which is just so much faster.
ReplyDeleteGreat work!
Thanks for the comments! Documentation is available at www.php.net/gmagick. Several people had gone through the Gmagick API docs, but if you find anything or wish to share examples, feel free to contact me. There will also be more examples and guides upcoming on php.net and elsewhere. Will post links on this blog.
ReplyDeleteAwesome work!
ReplyDeleteI've been migrating a PHP app from magickwand to gmagick ... everything was going well until I tried to find a suitable replacement for MagickGetStringWidth().
ReplyDeleteI don't see any sign of this or QueryFontMetrics anywhere in the gmagick extension. Any idea if this will be added soon?
The queryFontMetrics() method is available on Gmagick v1.0.3b2.
ReplyDeleteAny chance of a getting started guide, some very simple examples, etc. All I want to do is take an image and create 4 standard sized, padded square 'thumbnails', but I have no idea where to start.
ReplyDeleteRegards
John
Check out the article on the October 2009 issue of php|architect (http://www.phparch.com/). There's also an article on DevZone (http://devzone.zend.com/article/10531).
ReplyDeleteImageMagick is a great tool, but not without it's problems. I've seen it consume tons of memory, and write huge files to disk for no apparent reason. I've also found MagickWand to be a buggy interface, where parameters like image quality just don't as advertised, or expected.
ReplyDeleteDoes GMagick address some of these issues?
Gmagick is a PHP extension that exposes GraphicsMagick functions. GraphicsMagick was forked from ImageMagick in 2002. While ImageMagick focuses on adding new features, GraphicsMagick has maintained a stable interface; more time had been spent optimizing and debugging its code. See http://www.graphicsmagick.org/FAQ.html#how-does-graphicsmagick-differ-from-imagemagick.
ReplyDeleteAccordingly, GraphicsMagick is more efficient with large images as well but I had not done any memory consumption profiling or benchmarking of GraphicsMagick myself. Speed-wise, the Flickr guys observed that GraphicsMagick is about 15% faster (with version 1.1.5!), see http://www.kitchensoap.com/2009/04/03/slides-from-web20-expo-2009-and-somethin-else-interestin/.
Am I just daffy or is there no way to set JPG compression levels before writing?
ReplyDeleteYes, there is, it's setCompressionQuality(int).
ReplyDelete