Skip to content

Commit

Permalink
Merge pull request #1 from vmarkovtsev/patch-1
Browse files Browse the repository at this point in the history
Changed README
  • Loading branch information
ajkxyz committed Mar 20, 2014
2 parents 4ef8f0d + 297e3f1 commit 7f1f8a6
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ jpeg4py

Python cffi libjpeg-turbo bindings and helper classes.

Tested with Python 2.7, Python 3.3 and PyPy on Ubuntu 13.10.

The purpose of this package is to provide thread-safe with releasing of GIL
bindings for libjpeg-turbo which will work with numpy arrays on
Python 2, 3 and PyPy (when numpy will work with it).
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:
Expand All @@ -17,53 +16,53 @@ tjDecompressHeader2
tjDecompress2
```
so, currently, only decoding of jpeg files is possible, and
it was 1.3 times faster (on tests/test2.jpg and Ubuntu 13.10)
than Image.open().tobytes() and scipy.misc.imread() in single thread
and up to 9 times faster in multithreaded mode.
it is about 1.3 times faster than Image.open().tobytes() and
scipy.misc.imread() in a single thread and up to 9 times faster in
multithreaded mode.


Requirements:
Installation
------------

1. numpy.
Requirements:

2. Python bindings use TurboJPEG API, so the shared library should include it.
1. numpy
2. libjpeg-turbo

On Ubuntu 13.10 the correct shared library is included in libturbojpeg package:
On Ubuntu, the shared library is included in libturbojpeg package:
```bash
sudo apt-get install libturbojpeg
```

If you have custom library which is TurboJPEG API compartible,
just call jpeg4py.initialize with tuple containing that library file name.

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:
```bash
python setup.py install
```
or just copy src/jpeg4py to any place where python
interpreter will be able to find it.
or just copy src/jpeg4py to any place where python interpreter will be able
to find it.

Tests
-----

To run the tests, execute:

for Python 2.7:
```bash
PYTHONPATH=src nosetests -w tests
```

for Python 3.3:
```bash
PYTHONPATH=src nosetests3 -w tests
```

for PyPy:
```bash
PYTHONPATH=src pypy tests/test_api.py
```


Example usage:
--------------

```python
import jpeg4py as jpeg
Expand All @@ -75,6 +74,8 @@ if __name__ == "__main__":
pp.show()
```

License
-------

Released under Simplified BSD License.
Copyright (c) 2014, Samsung Electronics Co.,Ltd.

0 comments on commit 7f1f8a6

Please sign in to comment.