GD vs Imagick

Good. Those are the libraries that the language offers you “natively”, although there are plenty of third-party libraries that generally rely on one of these two, or both at the developer’s choice.

But yes, referring to GD and Imagick, the differences are basically power and availability.

GD Bookstore: This library is rather less powerful. This means that it offers less image processing quality than Imagick and also gives memory problems when processing very large images, since it depends directly on PHP’s memory. For its part, GD is usually available on a larger number of servers, so its availability is generally higher and it is also a little easier to use.

imagick: This library is much more powerful, allowing the processing of huge images, since the memory is obtained independently of PHP. Therefore, with Imagick you don’t have to worry much about the size of the images you are going to process. Imagick is also capable of processing more image formats, although generally the basic ones (Gig, Jpg, Png and others) are supported by both libraries. The problem is that many times it is not available on the servers where you are going to publish your website.

In terms of speed, both are more or less equally fast, having few differences, sometimes more and sometimes less.

In relation to which one to choose, you have to take into account where you are going to publish your website and what support they offer you on that server. Since GD is a library that uses PHP’s own memory to work, it is usually more available on shared hosting servers, since the server is not at risk of being “flooded” by very heavy requests in Imagick. In short, before programming your solution, see if it is going to be compatible with your server. Obviously, if you have a VPS facing up, you can install any of them to your liking, but if you are on a shared hosting you will not be able to do that.

See also  The NodeJS execution process

Another suggestion that may be fine is to use a higher level library, like Intervention Image, http://image.intervention.io/ which supports both one library and another. That is, you can develop with a common API and then decide which image processing library you want to use, being able to go from GD to Imagick (or vice versa) without problems. You can learn more about this library in this article /articulos/intervention-image-manipulacion-imagenes-php.html

Loading Facebook Comments ...
Loading Disqus Comments ...