[ZZ] Python 3.4 and Pillow 2.4 with JPEG2000 (Openjpeg 2) support in Ubuntu 14.04

Source: Internet
Author: User

Pillow support for JPEG2000 comes from Openjpeg 2 library. Unfortunatly, Ubuntu's LIBOPENJPEG2 package isn't version 2 of the Openjpeg library, but actually version 1.3 which wont Work with Pillow.

Installing Pillow 2.4 (pip Install-i Pillow) Simply results in"Openjpeg (JPEG2000) Support not available".

Thus, it's needed to compile the Openjpeg Library 2.0 from source. For this, first lets download the Openjpeg 2.0.1:http://downloads.sourceforge.net/project/openjpeg.mirror/2.0.1/openjpeg-2.0.1.tar.gz 

tar xzvf openjpeg-2.0.1.tar.gz 
cd openjpeg-2.0.1/ 
cmake . 
make 
sudo make install


Please note that we install version of Openjpeg 2.0, rather than newer 2.1. Pillow wont recognize openjpeg 2.1 either.

Assuming everything went fine, we can reinstall Pillow:pip install -I pillow
If Openjpeg 2.0.1 was detected successfully, we should get the following info "Openjpeg (JPEG2000) support available"Among others.

Note:to Install CMake, cmake-2.8.10.2.tar.gz

wget http://www.cmake.org/cmake/resources/software.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.