Hi,
I’m using zenphoto on my site(goodfreephotos.com) and right now its running on the GD Library. But since I have rather large images(5143x3446), it causes PHP memory problems at times so I decided to switch to Imagemagik implementation for Zenphoto. However, on my index page, I have about 30 small thumbnails and some albums have 150-200 thumbnails. Will that cause the CPU load to increase using Imagemagik?
Note that these thumbnails are not being generating on the fly, they are just jpg files stored in another folder and using the basic HTML “<img src” command to display images.
As your images are not being resized on the fly Imagemagick will have no effect.
In some cases GD is faster at processing than Imagemagick and in others Imagemagick is faster. There is also Imagick which is a php API and we do not know what zenphoto is using.
Anyway in answer to your question why not try it as it is only changing one setting in the CMS?
I do not use the extension as I prefer exec(). There are more options on how to use memory etc. with Imagemagck and exec() but not all of them may be available within Imagick.
There is the setResourceLimit function but that seems to relate more to memory.
In tests I did a few years ago I also came across the problem with GD and memory.
// Set image save name
$output = 'output.png';
/* Create the gradiant */
$gradiant = new Imagick();
$gradiant->newPseudoImage( 300, 256, "gradient:red-orange" );
$gradiant->setImageFormat( 'png' );
$mask = new Imagick('leotard.png');
$gradiant->setImageMatte(1);
$gradiant->compositeImage($mask, Imagick::COMPOSITE_DSTIN, 0, 0);
// Save the image
$gradiant->writeImage($output);
You need to ask a more specific question, I think. Are you having problems using the library in your configuration, and if so, have you checked the documentation and bug lists to see if they’re known issues?
I did not reply as I do not use Imagick on my PC as it is to much of a pain to setup. Also I prefer the command line with exec() as I find it easier to use, more compact code and has more options.
If you are going to be needing to install extensions it is worth looking into vagrant and more specifically puphpet.com. To install most php extensions it just takes adding a single line to a configuration file.I run a vagrant box on a surface pro 3 with windows 3. Works a treat.Not just for php but just about anything ruby, node js, etc. Most larger projects have several dependencies that are difficult to set-up on a host Windows machine even running xamp. It is worth getting familiar with virtualization technology so you don’t appear helpless in the future. I can have a puphpet.com box up running your project in under an hour how long have you spent trying to get this working. It just doesn’t make any sense unless you start running into problems with standing-up the vm itself.