And the reason?
A:
What data have you obtained so far?
What functionality are you looking for? I would suggest a Google search first if you have done no research
Lizard
2010-06-11 13:24:57
+4
A:
ImageMagick is not a PHP image processing library, it's a stand-alone package that can be accessed from PHP. It is incredibly more feature-rich than GD. See the ImageMagick Usage page with hundreds of examples. GD supports very primitive operations only (copying, resizing, geometric primitives, basic text rendering).
Everyday things ImageMagick does better:
- Can handle more image formats (more than 100 IIRC - GD supports only 5)
- Better rendering of True-Type fonts, takes into consideration kerning hints in the font
- Doesn't use the PHP script's memory
Pekka
2010-06-11 13:25:48
Why do you say it's stand-alone ? I found it requires a php extension too like gd: http://valokuva.org/outside-blog-content/imagick-windows-builds/080709/
2010-06-11 13:34:09
@user the PHP extension is optional. You can call ImageMagick through `exec()` as well. It is by its nature not a library designed specifically for PHP like GD is - there are ImageMagick extensions for Perl, Ruby, Python....
Pekka
2010-06-11 13:35:05
Then what's the PHP imagick extension for if we can also make things work without it?
2010-06-11 13:36:32
@user it provides the imageMagick commands natively within PHP, instead of having to build a big command line containing all the parameters.
Pekka
2010-06-11 13:37:40
GD is not strictly a library designed for PHP, but rather just an image manipulation library with bindings for PHP (and many other languages).Imagemagick is a standalone app that you launch either using exec() or a wrapper class/extensions that simplifies the usage but you never actually need them.
Joonas Trussmann
2010-06-11 13:40:37
Do we need the imagick package if already have the PHP imagick extension?Say, does PHP imagick extension depends on the imagick package?
2010-06-11 13:41:42
@Joonas I stand corrected, you're right, GD is also not PHP specific. @user no, if you have the PHP imagick extension installed, that should give you all you need.
Pekka
2010-06-11 13:44:40
@Pekka, but see the link in my first comment, the size of the dlls are different by large. So I guess the dyn version depends on imagick package,but the st version doesn't,right?
2010-06-11 13:48:31
@user yup, I don't know 100% but I guess that is correct!
Pekka
2010-06-11 13:50:39
A:
If you want portability, stick with GD is available in almost every server that runs PHP.
If you want to use a more powerful library or image manipulation is crucial to your application AND you can control your environment, then go for ImageMagick.
xmarcos
2010-09-28 18:55:11