Cannot convert pdf file to jpg thumbnail
Posted: 2017-11-13T09:55:18-07:00
I am using ImageMagick 6.7.7-10 2017-07-31 Q16 on Ubuntu 14.04, through Wand 0.4.4, Python 3.4.3 and Django 1.11. I am trying to create a jpg thumbnail of a pdf file.
On the command line, I can do this with no errors:
But when I try to use wand on the same image I get this error:
I looked at the delegates.xml file for ImageMagic in /etc, and there are entries for pdf files.
Thanks for any suggestions on how to get this conversion to work.
Mark
On the command line, I can do this with no errors:
Code: Select all
convert -thumbnail x300 -background white -alpha remove Lucy.pdf[0] output_thumbnail.jpg
Code: Select all
Traceback (most recent call last):
File "/home/mark/python-projects/memorabilia-project/memorabilia/models.py", line 24, in make_thumb
pages = Image(blob = b)
File "/home/mark/.virtualenvs/memorabilia/lib/python3.4/site-packages/wand/image.py", line 2742, in __init__
self.read(blob=blob, resolution=resolution)
File "/home/mark/.virtualenvs/memorabilia/lib/python3.4/site-packages/wand/image.py", line 2822, in read
self.raise_exception()
File "/home/mark/.virtualenvs/memorabilia/lib/python3.4/site-packages/wand/resource.py", line 222, in raise_exception
raise e
wand.exceptions.MissingDelegateError: no decode delegate for this image format `' @ error/blob.c/BlobToImage/367
Thanks for any suggestions on how to get this conversion to work.
Mark