

Copy phpimagick.dll files located in bin and paste it in ext folder in PHP directory. My server side image processing is still there (and uses ImageMagick) but it's a last resort and rarely used in practice. Paste them in PHP root directory where you have php.exe. That way it's the uploader's resources that are being burned up and they won't even notice because they're probably sending the file over a broadband connection with slow uploads anyway. Personally, I've given up on doing image resizing in PHP and moved it client side as much as possible. We had our server admin team recently add an EasyApache 4 version of PHP 7. With hardware accelerated image processing, thumbnails can be generated basically as fast as they can be read off the disk (thousands of photos per second), CPU load will be minimal, and because it's so fast you can do the batch operation on a single thread and only ever have one image in memory at a time. If you need to generate thumbnails for a photo gallery, ImageMagick and GD will both hammer your server's CPU and flush various caches out of RAM making other things slow until the caches are re-populated, while the user waits seemingly forever as the page loads. What you really want is a tool that uses hardware accelerated image compression (most CPUs can do that these days). I personally have only ever used ImageMagick and it works well but it's dog slow. With ImageMagick it doesn't count towards the limit. With GD the memory counts towards your PHP memory limit, which can be a problem as high memory limits can cause problems elsewhere. Image operations often work with uncompressed image data, which uses quite a bit of memory - about 45MB for a typical smartphone photo, and an operation might require multiple copies of it in memory. But I'm wary about the color profile issue and that has led me to feel conflicted.
#IMAGEMAGICK PHP 7.4 INSTALL#
Right now I'm leaning towards going with GD because installing ImageMagick would require me to install a lot of other libraries that are not currently on my server, whereas GD's dependencies are minimal and mostly overlapping with the base PHP install, and lesser dependencies and less junk on my server that I don't need is always a huge plus. Is there much of a performance difference, especially with respect to server load, but also with respect to speed?ĭoes GD (2.2) have color proflie support?Īnything else to consider that I might not have thought about? Feature-wise, both GD and ImageMagick seem to have more than I need, although I want to make sure there is support for color profiles, and I don't want the color profiles stripped the way they have been in the past.Īre there any security differences between modern versions of GD and ImageMagick? I will be using PHP 7.4 and would be using ImageMagick 6.9 if I chose to go with it. My #1 concern would be security and after that, it would be efficiency, minimizing load on the server. I see isolated complaints as recently as 2015, about GD doing this, but I see no more recent complaints, nor do I see any statement that color profile support was added any time since then. So, it’s up to your hosting to get these server level things set up properly. However, I doubt that a commercial host would be running Fedora. I found a lot of stuff from 2010 saying GD didn't support color profiles back then, and would misinterpret colors in images as a result, and often save them with different-appearing colors. I have ImageMagick running happily with PHP 7.4 on Fedora 32 via the php-pecl system: php-pecl-imagick- for the current version of ImageMagick, ImageMagick 6.9.10-86 Q16 x8664. I could not find any up-to-date information on support of color profiles in GD. It's been frustrating to me how hard it is to find recent information comparing these two packages, as I know both of these packages may have changed a lot in the past 5-10 years. I found a lot of conflicting claims about security as well as speed and performance, and again, none of them were recent.

ImageMagick, and found a lot of discussions, but many of them are quite old. I searched a lot for comparisons of GD vs. However, I do want whatever tool we have to preserve color profiles. I do not need the capacity of handling animated GIF's. Currently, nothing more complex than cropping, resizing, and converting between formats.
#IMAGEMAGICK PHP 7.4 SOFTWARE#
image optimization utilities (optional), see psliwa/image-optimizerĬomposer.I need a software package for basic processing of images.
#IMAGEMAGICK PHP 7.4 FREE#
a crapload of RAM, CPU power and free disk space.This script will keep the proportions of the input image and generate only necessary tiles - no need for square input files!

A script for PHP 7.4+ to cut images (maps) into pieces (tiles).
