views:

272

answers:

4

I'm working on a package which includes rescaling of images in PHP. For image rescaling, PHP has the GD and ImageMagick libraries. Are those likely to be part of a given client's PHP install already?

Is there a "default" install of PHP, for that matter? By default, are either GD or ImageMagick included?

If neither is installed, should I have some sort of horrible fallback position of reading, rescaling, and saving GIFs, JPGs, and PNGs, or is it simple to add GD or ImageMagick to an existing install?

+3  A: 

It is reasonable to expect the client to have the capability or an understanding of how to add the library. Are you selling software or servers maintenance?

If you're going for the whole "ease of use" angle, you'll want to package php with your app (and GD installed already), of which I'm not sure the legality. (but there's probably some way to get it done)

altCognito
I'm selling a service that includes some software. I just figured the easier to install, the better. The lower the impact, the easier the pitch.
Nosredna
+5  A: 

GD is the easiet library to include in php.. it is "only" an extension, mainly included in php packages... the only operation needed is to activate the extension.

Regarding ImageMagik, it is more complecated, since the php imageMagik library is only an interface for the image magik software. Using imageMagik require both software and php library installed

kemar
+4  A: 

i can't remember when i've last seen a lamp hosting provider without GD. the imagemagick extension is not that widespread. if they run their server themself, they really should be able to activate one of it or both. in your place i'd build the full functionality with GD and a (probably reduced) imagemagick fallback. if they got neither, show them the basic concepts of the wheel and/or fire, they should be grateful.

PS: i encountered providers that deactivated certain GD functions (computationally too intensive on a shared hosting environment), like imagerotate and imagefilter.

Schnalle
+1 for the *show them the basic concepts of the wheel and/or fire...* That totally made my day =)
David Thomas
+1  A: 

90% GD - 10% ImageMagick

Cristi Cotovan