skip to navigation
skip to content

Not Logged In

jpeg4py 0.1.0

libjpeg-turbo cffi bindings and helper classes


Python cffi libjpeg-turbo bindings and helper classes.

The purpose of this package is to provide thread-safe and aware of GIL Python
bindings to libjpeg-turbo which work with numpy arrays on
Python 2, 3 and PyPy (when numpy is fully implemented). It was tested with
Python 2.7, Python 3.3 and PyPy on Ubuntu 13.10.

Covered TurboJPEG API:
so, currently, only decoding of jpeg files is possible, and
it is about 1.3 times faster than and
scipy.misc.imread() in a single thread and up to 9 times faster in
multithreaded mode.



1. numpy
2. libjpeg-turbo

On Ubuntu, the shared library is included in libturbojpeg package:
sudo apt-get install libturbojpeg
If you have a custom library which is TurboJPEG API compatible,
just call jpeg4py.initialize with tuple containing that library's file name.

To install the module run:
python install
or just copy src/jpeg4py to any place where python interpreter will be able
to find it.


To run the tests, execute:

for Python 2.7:
PYTHONPATH=src nosetests -w tests
for Python 3.3:
PYTHONPATH=src nosetests3 -w tests
for PyPy:
PYTHONPATH=src pypy tests/

Example usage:

import jpeg4py as jpeg
import matplotlib.pyplot as pp

if __name__ == "__main__":


Released under Simplified BSD License.
Copyright (c) 2014, Samsung Electronics Co.,Ltd.
File Type Py Version Uploaded on Size
jpeg4py-0.1.0.tar.gz (md5) Source 2014-03-20 10KB
  • Downloads (All Versions):
  • 7 downloads in the last day
  • 46 downloads in the last week
  • 167 downloads in the last month