Log in

View Full Version : GD vs ImageMagick



james438
10-08-2009, 05:42 AM
Is there much of a difference between the functionality of GD vs ImageMagick? I am new to ImageMagick and it seems that it does more than GD does.

djr33
10-09-2009, 03:01 AM
Both are theoretically unlimited. I've written pixel by pixel scripts with GD that do whatever I want with the color data. That said, obviously it's easier to work with built in options, so if you don't want to deal with making up all the functions yourself you're better off using the one that has what you need.
I haven't used imagemagick much, but in short I think it is a little better than GD, but doesn't come as a default on all systems, so it's not as portable if that's a requirement (like if you are giving the script to others, etc.).
The main problem with both will be slow processing and server load, and I believe ImageMagick is better than GD in this, too, but not so much that it's pleasant to use-- just not quite as bad as GD.

In a lot of ways they give you more control than even photoshop, if you want to deal with all of the code yourself... usually it's just not worth it, and the results probably won't be that great. But if you do need to do something manually (at the pixel level) then it's a good option, probably. And of course you can generate things like captchas with them too.

Is there something particular you want to do with it, or just figure out which one is best? The real question there is just whether you want the slightly better one or the one installed on all systems... up to you. And in general avoid both as much as possible. But if you do need images in php, both are theoretically capable of most tasks.

james438
10-09-2009, 07:09 AM
Thanks, the information that you gave is pretty much what I was wondering about.

I recently discovered that I have ImageMagick on my website via godaddy.com. I guess they load it on all their servers, so I am now exploring ImageMagick and seeing how it differs from GD and if it is the next best thing as far as image processing programs go. Web design programs that is, not photoshop or adobe or whatnot.

To answer your question about what I want to do with these programs I'm really just playing around. I have a couple GD programs that I created. One is more of a toy that lets me alter any image in many different ways and when I am done the image can be reset; sort of like an Etch A Sketch. Another program auto formats images that are uploaded to my site, which is a real time saver for me and one or two other lesser programs that I never ended up using.

I have only spent a day or two with ImageMagick though. I don't really plan on doing anything complex with either GD or ImageMagick, but I was partly wondering if I should abandon one as being outdated or if maybe they both have their uses. It sounds like the answer is more of the latter: use whichever one you feel more comfortable with.