Image library

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply

Image library???

GD
5
100%
ImageMagik
0
No votes
Other
0
No votes
 
Total votes: 5

alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Image library

Post 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...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Re: Image library

Post 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.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post 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...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply