Page 1 of 1

Create Imagick object times out in Wordpress template

Posted: 2012-11-05T02:43:44-07:00
by Ferenc
Dear ImageMagick users,

I have build a simple test.php file to composite two images with Imagick. Everything works fine, but when I try to implement this in a Wordpress template file I get a time-out at the rule:

Code: Select all

$basemodel = new Imagick('images/base-model-1/shaded/base-model-1.png'); 
The exact error message is:
ImagickException: Imagick::__construct() [imagick.--construct]: Operation timed out in /Library/WebServer/Documents/sa2/wp-content/themes/twentyeleven/test.php on line 86
I've searched the internet and this forum, but haven't found a solution so far. I hope you guys can help me out :)

Thanks in advance,
Ferenc

Re: Create Imagick object times out in Wordpress template

Posted: 2012-11-05T08:32:22-07:00
by Ferenc
Ok I fixed it. In the Wordpress template I was using a remote url, while the other file used a local relative path. Because you're on the server you have to use a local path. Then you can echo the composite image with a normal img tag and a http:// url.

Re: Create Imagick object times out in Wordpress template

Posted: 2012-11-05T08:39:38-07:00
by Bonzo
Thanks for posting the answer to your problem Ferenc.