Page 1 of 1

Delegate installed, but imagick says "no decode delegate"

Posted: 2014-03-24T06:54:51-07:00
by Aracon
I am trying to convert DJVU file in PHP script with imagick extension.
Djvu delegate is installed:
Image
Image
But script throws exception:

Code: Select all

PHP Fatal error:  Uncaught exception 'ImagickException' with message 'no decode delegate for this image format `/mnt/discovery/2013/07/24/1769623_\xd1\x81\xd0\xbf\xd1\x80\xd0\xb0\xd0\xb2\xd0\xba\xd0\xb0 154.djvu' 

Re: Delegate installed, but imagick says "no decode delegate

Posted: 2014-03-24T09:50:15-07:00
by fmw42
what was your exact command? are you trying to read or write djvu? it is only readable in IM, not writeable.

Re: Delegate installed, but imagick says "no decode delegate

Posted: 2014-03-25T00:50:31-07:00
by Aracon
Here is my PHP code:

Code: Select all

		$img = new Imagick();
		$img->setResolution(200,200);
		$img->readImage($filepath);
Error is throwing in last line (readImage() function). I am trying just to read DJVU (to save it in JPG files).
And the test file converts well via IM convert program.

Re: Delegate installed, but imagick says "no decode delegate

Posted: 2014-03-25T01:14:03-07:00
by Bonzo
You are using Imagick and I would first try running some code in Imagemagick with the command line to see if the problem is with Imagemagick or imagick.

Code: Select all

<?php 
$array=array(); 
echo "<pre>"; 
exec("convert input.djvu output.jpg  2>&1", $array);  
echo "<br>".print_r($array)."<br>";  
echo "</pre>"; 
?>  

Re: Delegate installed, but imagick says "no decode delegate

Posted: 2014-03-25T01:22:02-07:00
by Aracon
I wrote above that the file converts well with convert utility, so I think the problem is in imagick.
I will try your code a bit later, because I have no access to the test server at this moment.