Domanda

I'm trying to create a thumbnail for a large image (8200x11800 px) so GD is not an option. I was told Imagick would overcome memory limits by using disk space instead of ram memory, so I installed it and rewrote mi script as follows:

$thumb = new Imagick ($sourceFilePath);
$thumb->thumbnailImage ($width, $thumb->getImageHeight() * ($width / $thumb->getImageWidth()));
$thumb->writeImage ($targetFilePath);
$thumb->destroy ();

But I still get 500 Server Error with no message, same as used to happen with GD when memory wasn't enough, any idea? Thanks

BTW memory_limit is set to 512 MB and here you can fetch the original image file.

È stato utile?

Soluzione

If you want to limit the memory used by ImageMagick you should set one of the environment variables (e.g. MAGICK_MEMORY_LIMIT) or modify the policy.xml file. For more info visit the following page: http://www.imagemagick.org/script/resources.php

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top