Create Imagick object times out in Wordpress template

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Ferenc
Posts: 5
Joined: 2012-11-05T02:29:50-07:00
Authentication code: 67789

Create Imagick object times out in Wordpress template

Post 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
Ferenc
Posts: 5
Joined: 2012-11-05T02:29:50-07:00
Authentication code: 67789

Re: Create Imagick object times out in Wordpress template

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Create Imagick object times out in Wordpress template

Post by Bonzo »

Thanks for posting the answer to your problem Ferenc.
Post Reply