Delegate installed, but imagick says "no decode delegate"

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Aracon
Posts: 3
Joined: 2014-03-24T06:42:49-07:00
Authentication code: 6789

Delegate installed, but imagick says "no decode delegate"

Post 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' 
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 »

what was your exact command? are you trying to read or write djvu? it is only readable in IM, not writeable.
Aracon
Posts: 3
Joined: 2014-03-24T06:42:49-07:00
Authentication code: 6789

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

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

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

Post 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>"; 
?>  
Aracon
Posts: 3
Joined: 2014-03-24T06:42:49-07:00
Authentication code: 6789

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

Post 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.
Post Reply