Page 1 of 1
Image library
Posted: Thu Aug 24, 2006 4:17 pm
by alex.barylski
What are the most popular ones? Could I get away with just supporting GD?
Which one is the best as far as features? Which one do you prefer?
Which supports the most images?
GD or ImageMagik?
I'd like to hear everything you know about the subject...
Posted: Thu Aug 24, 2006 4:25 pm
by pickle
I voted GD because I've used it more & it seems to be integrated into PHP better. I have used ImageMagick on the command line before & I like it's straightforwardness. Plus, it can handle a much wider variety of images (for some reason, GD can't handle BMP files).
What are you integrating support into? What level of support are you interested in supporting? It certainly wouldn't be hard to implement both library's implementation of resizing & format conversion. ImageMagick can do a whole bunch more though. If this is just for a CMS or something similar, I'd ignore the bells & whistles & focus on implementing the basics from both libraries.
Re: Image library
Posted: Thu Aug 24, 2006 4:39 pm
by feyd
Hockey wrote:What are the most popular ones?
Likely GD since it comes with PHP and is probably one of the most enabled extensions.
Hockey wrote:Could I get away with just supporting GD?
Sure.
Hockey wrote:Which one is the best as far as features?
Well, ImageMagick probably has the longer feature list; but better? I don't know. I don't remember being able to manipulate individual pixels as I wish with it, whereas I have nearly direct access with GD.
Hockey wrote:Which one do you prefer?
Real image work I don't do in PHP. But if you're forcing me to choose, it depends. ImageMagick has allowances for larger images to work with (separated process and all) while GD is very often readily available.
Hockey wrote:Which supports the most images?
ImageMagick.
If you want the best, support both. I won't be voting.
Posted: Thu Aug 24, 2006 4:50 pm
by alex.barylski
pickle wrote:I voted GD because I've used it more & it seems to be integrated into PHP better. I have used ImageMagick on the command line before & I like it's straightforwardness. Plus, it can handle a much wider variety of images (for some reason, GD can't handle BMP files).
What are you integrating support into? What level of support are you interested in supporting? It certainly wouldn't be hard to implement both library's implementation of resizing & format conversion. ImageMagick can do a whole bunch more though. If this is just for a CMS or something similar, I'd ignore the bells & whistles & focus on implementing the basics from both libraries.
BMP files??? Are you sure about that? I think most graphics libraries actually convert GIF, JPEG, etc into a raw BMP resource before blitting to screen as it's much faster to do that then read/render JPEG, etc...
Maybe it just doesn't support Windows BMP structure...
In anycase, BMP is the simplest format for images...RLE is about the only compression it supports other than that it's very WYSIWYG as far as structure...
You could likely implement BMP support with relative ease, I've seen it done a million times...
ImageMagick can do a whole bunch more though. If this is just for a CMS or something similar, I'd ignore the bells & whistles & focus on implementing the basics from both libraries
For a image library...I've been considering developing when I get some free time...I want it to be extensive, yet modular and quick, so an abstraction layer for GD and IM would be wasteful, considering so many people seem to vote GD anyways...
Besides additional funcitonality could be implemented in PHP...although not very fast, so long as it works I guess is all that matters...
Posted: Thu Aug 24, 2006 4:59 pm
by pickle
Ya, GD doesn't support Windows BMP files. It does support WBMP and XBMP formats though (not sure what they are).
If you're wanting modular development, make a module for GD and a module for ImageMagick - certainly not wasteful IMO. Modularization is just like abstraction layers - rather than referencing GD or ImageMagick directly, you're referencing a module with (I would assume - identical function names). Plus, if new/other image libraries come into existence - you can support them too.