Reputation: 4710
I am using following environment:
Ubunut : 11.0 (virtual machine) Imagemagick : ImageMagick-6.9.3-7
I have execut following command:
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
ls
cd ImageMagick<version number here>/
./configure
make clean
make
sudo make install
ldconfig /usr/local/lib
After executing below command:
make check
40 test case 39 pass only 1 is fail (FAIL: tests/wandtest.tap 1)
Now i want to convert pdf file to jpg via command:
convert test.pdf test.jpg
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/501.
convert: no images defined
test.jpg' @ error/convert.c/ConvertImageCommand/3252
convert test.pdf test.png
convert: no decode delegate for this image format PNG' @ error/constitute.c/ReadImage/501.
convert: no images defined
test.png' @ error/convert.c/ConvertImageCommand/3252.
anyone can suggest me how can i do ?
Upvotes: 1
Views: 3957
Reputation: 662
It may be that the issue is not with the writing but with the reading of the PDF itself. Check the ImageMagick policy.xml.
sudo nano /etc/ImageMagick-6/policy.xml
Find the PDF and change to this:
<policy domain="coder" rights="read|write" pattern="PDF" />
This solved for me.
Upvotes: 2
Reputation: 5438
ImageMagick uses assorted external libraries to do its dirty work as far as input and output handling goes for various formats. In your case:
For reading PDFs, you need to have Ghostscript installed. Also it needs to be in your path as gs
in order to work, so don't use that for some other shell alias. For more details see: https://superuser.com/q/819277/33767
For writing PNGs you'll need libpng
.
Once those things are on your system (and in the case you compiled IM yourself, on your system at the time of compile) you should be golden.
Upvotes: 2