Join the wonderland of python, and decode all your images in a numpy compatible way
Project description
# redpil
[![pypi](https://img.shields.io/pypi/v/redpil.svg)](https://pypi.python.org/pypi/redpil)
[![Travis](https://img.shields.io/travis/hmaarrfk/redpil.svg)](https://travis-ci.org/hmaarrfk/redpil)
[![Docs](https://readthedocs.org/projects/redpil/badge/?version=latest)](https://redpil.readthedocs.io/en/latest/?badge=latest)
Join the wonderland of python, and decode all your images in a numpy compatible way.
Pillow's memory system isn't compatible with numpy. Meaning that everytime you
read or write images, they get copied to a Pillow array, then again to a numpy
array.
For large images, this is a serious bottleneck.
* Documentation: https://redpil.readthedocs.io.
## Supported file formats
* BMP: 8bit mono grayscale only. [Wikipedia](https://en.wikipedia.org/wiki/BMP_file_format)
## Future file formats
* BMP: more coverage
* JPEG, JPEG2000
* GIF
* PNG
* SVG
* TIFF
## Benchmarks
I don't have a fancy benchmarking service like scikit-image or dask has, but
here are the benchmarks results compared to a PILLOW backend. This is running
on my SSD, a Samsung Evo 960 which claims it can write at 1.8GB/s. This is
pretty close to what `redpil` achieves.
### 8 bit BMP grayscale images
Saving images:
```
================ ============ =============
-- mode
---------------- --------------------------
shape pillow redpil
================ ============ =============
(128, 128) 263±4μs 106±2μs
(1024, 1024) 1000±60μs 787±90μs
(2048, 4096) 5.15±0.2ms 4.62±0.07ms
(32768, 32768) 510±10ms 470±3ms
================ ============ =============
```
Reading image
```
================ =========== =============
-- mode
---------------- -------------------------
shape pillow redpil
================ =========== =============
(128, 128) 306±7μs 120±2μs
(1024, 1024) 990±300μs 187±7μs
(2048, 4096) 3.53±1ms 1.39±0.04ms
(32768, 32768) 242±7μs 369±4ms
================ =========== =============
```
Note, Pillow refuses to read the 1GB image because it thinks it is a fork bomb.
# History
## 0.0.1 (2018-09-22)
* First release on PyPI.
[![pypi](https://img.shields.io/pypi/v/redpil.svg)](https://pypi.python.org/pypi/redpil)
[![Travis](https://img.shields.io/travis/hmaarrfk/redpil.svg)](https://travis-ci.org/hmaarrfk/redpil)
[![Docs](https://readthedocs.org/projects/redpil/badge/?version=latest)](https://redpil.readthedocs.io/en/latest/?badge=latest)
Join the wonderland of python, and decode all your images in a numpy compatible way.
Pillow's memory system isn't compatible with numpy. Meaning that everytime you
read or write images, they get copied to a Pillow array, then again to a numpy
array.
For large images, this is a serious bottleneck.
* Documentation: https://redpil.readthedocs.io.
## Supported file formats
* BMP: 8bit mono grayscale only. [Wikipedia](https://en.wikipedia.org/wiki/BMP_file_format)
## Future file formats
* BMP: more coverage
* JPEG, JPEG2000
* GIF
* PNG
* SVG
* TIFF
## Benchmarks
I don't have a fancy benchmarking service like scikit-image or dask has, but
here are the benchmarks results compared to a PILLOW backend. This is running
on my SSD, a Samsung Evo 960 which claims it can write at 1.8GB/s. This is
pretty close to what `redpil` achieves.
### 8 bit BMP grayscale images
Saving images:
```
================ ============ =============
-- mode
---------------- --------------------------
shape pillow redpil
================ ============ =============
(128, 128) 263±4μs 106±2μs
(1024, 1024) 1000±60μs 787±90μs
(2048, 4096) 5.15±0.2ms 4.62±0.07ms
(32768, 32768) 510±10ms 470±3ms
================ ============ =============
```
Reading image
```
================ =========== =============
-- mode
---------------- -------------------------
shape pillow redpil
================ =========== =============
(128, 128) 306±7μs 120±2μs
(1024, 1024) 990±300μs 187±7μs
(2048, 4096) 3.53±1ms 1.39±0.04ms
(32768, 32768) 242±7μs 369±4ms
================ =========== =============
```
Note, Pillow refuses to read the 1GB image because it thinks it is a fork bomb.
# History
## 0.0.1 (2018-09-22)
* First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
redpil-0.0.1.tar.gz
(27.1 kB
view hashes)
Built Distribution
Close
Hashes for redpil-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e6d7ffb4cc904624166676765bc529dec4471c11a02a1d474555a5a553c6f53 |
|
MD5 | 49117c4110f184eb06364ed4c8edd04f |
|
BLAKE2b-256 | 0b708a8151c207e6fdd7ee71e9cc7866ff5a0302bef5e1a24ae8f242a1a5ccb0 |