【发布时间】:2015-07-16 13:30:27
【问题描述】:
我正在编写一个 django/python 应用程序,我需要将用户上传的 PDF 文件转换为 JPEG(文件是扫描文件)
我正在尝试使用带有 ImageMagick 后端(在 OSX 上)和 我不断收到以下错误:
MissingDelegateError at /user_docs/upload/certificate/
no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/501
我目前的测试代码很简单:
with wandImage(filename='/Users/username/Pictures/telechargement.pdf') as img:
img.format = 'jpeg'
img.save(filename='/Users/username/Pictures/bzzz.jpeg')
一些信息:
- 文件存在(我通过
os.path.exists验证) - 我可以在命令行使用
convert将文件从PDF转换为JPG - 我尝试设置
DYLD_LIBRARY_PATH以包含 ImageMagick 库目录 -
identify -list configure | grep DELEGATES返回
DELEGATES bzlib fftw fontconfig freetype gs jpeg jng lcms2 lzma mpeg png tiff x11 xml zlib
有人有想法吗?
谢谢
【问题讨论】:
标签: wand