枕头和JPEG2000:解码器jpeg2k不可用 [英] Pillow and JPEG2000: decoder jpeg2k not available

查看:533
本文介绍了枕头和JPEG2000:解码器jpeg2k不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Flask-IIIF设置为与jp2文件或JPEG2000一起使用.开箱即用,我从Pillow库中收到一个错误:IOError: decoder jpeg2k not available

I'm trying to set up Flask-IIIF to work with jp2-files, or JPEG2000. Right out of the box I get an error from the Pillow library: IOError: decoder jpeg2k not available

我已经尝试过搜索它,并且有一个StackOverflow帖子告诉我确保libjpeg-devlibjpeg8-dev已安装并且是最新的,但是已经安装了.确保它们在那里之后,我确实尝试重新安装没有缓存的枕头:pip install --no-cache-dir -I pillow

I've tried googling it, and one StackOverflow post told me to make sure libjpeg-dev and libjpeg8-dev are installed and up to date, but they were already installed. After making sure they were there, I did try to reinstall pillow without cache: pip install --no-cache-dir -I pillow

环境为Docker,基于 15.10 Ubuntu 映像. Python版本为 2.7.10 .点冻结的枕头版本为 4.1.1

The environment is Docker, based on a 15.10 Ubuntu image. Python version is 2.7.10. Pillow version from pip freeze is 4.1.1

edit:我还尝试了:

edit: I also tried the other suggestion of Python Image Library fails with message "decoder JPEG not available" - PIL:

sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib

sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib

推荐答案

枕头需要OpenJPEG库来解码JPEG2000文件. libjpeg仅处理常规JPEG.

Pillow needs the OpenJPEG library to decode JPEG2000 files. libjpeg only deals with regular JPEGs.

请参阅本节末尾枕头"文档中的注释: http://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html#jpeg-2000

See the note in the Pillow docs at the end of this section: http://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html#jpeg-2000

这篇关于枕头和JPEG2000:解码器jpeg2k不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆