Memory Allocation Error
Posted: 2012-08-21T09:35:20-07:00
Hey everyone, question for those of you out there that are geniuses (I'm a newbie to IM). I am running ImageMagick-6.5.4.7-5.el6.x86_64 and CentOS 6.0 Final. When running a script to create thumbnails, I am getting the following errors:
testrender.php:57-66 is as follows:
When I look in to the error a little bit more, line 1035 in ImageMagick is something to do with the layers in the photo.
Examples can be gotten here (File size is 46MB compressed):
http://www.sfwdesign.com/sites/all/imag ... pd.psd.zip
Thanks for any help.
Code: Select all
exception 'ImagickException' with message 'Memory allocation failed `/tmp/magick-XXIaQCm8' @ psd.c/ReadPSDImage/1035' in /home/opmadb/html/metaprocess/testrender.php:57
Stack trace:
#0 /home/opmadb/html/metaprocess/testrender.php(57): Imagick->__construct('/home/opmasan/m...')
#1 {main}
Code: Select all
$thumb=new Imagick($local_path);
$thumb->flattenImages();
$thumb->setImageColorspace(Imagick::COLORSPACE_SRGB);
//Scale the image
$thumb->thumbnailImage(128,128,true,false);
$thumb->setImageFormat("png");
$thumb->stripImage();
//Write the new image to a file
$thumb->writeImage('/home/metathumbs/'.$image_data->thumb);
Examples can be gotten here (File size is 46MB compressed):
http://www.sfwdesign.com/sites/all/imag ... pd.psd.zip
Thanks for any help.