What are the odds of GD or ImageMagick that are already part of the PHP client installation?

I am working on a package that includes resizing images in PHP. For scaling images, PHP has the GD and ImageMagick libraries. Most likely they will be part of an already installed PHP client?

Is there a default setting for PHP, for that matter? Are GD or ImageMagick enabled by default?

If none of them are installed, should I have some terrible fallback position for reading, scaling and saving GIF, JPG and PNG, or just add GD or ImageMagick to an existing installation?

+4
source share
5 answers

I can’t remember the last time I saw a lamp hosting provider without GD. The imagemagick extension is not so widespread. if they start their server on their own, they really should be able to activate one of them, or both. in your place I would build full functionality with GD and (possibly reduced) imagemagick border. if they have not received a single one, show them the basic concepts of wheel and / or fire, they should be thankful.

PS: I came across providers who deactivated certain GD functions (which complicate calculations in a shared hosting environment), such as imagerotate and imagefilter.

+7
source

GD is the easiet library for inclusion in php .. it is an β€œonly” extension, mainly included in php packages ... the only operation needed to activate the extension.

As for ImageMagik, it is more complete since php imageMagik library is just the interface for magik image creation software. Using imageMagik requires both installed software and php library

+5
source

It is reasonable to expect the client to have the opportunity or understanding of how to add the library. Do you sell software or server maintenance?

If you are going to use the whole angle of ease of use, you will need to pack php with your application (and GD is already installed), of which I am not sure about the legality. (but there is probably a way to do this)

+4
source

90% GD - 10% ImageMagick

+1
source

Windows - Yes

Linux / MAC - No (but fairly easy to install)

0
source

Source: https://habr.com/ru/post/1285693/


All Articles