Image transformation, compression, and decompression codecs
Project description
Imagecodecs is a Python library that provides block-oriented, in-memory buffer transformation, compression, and decompression functions for use in the tifffile, czifile, and other scientific imaging modules.
Decode and/or encode functions are currently implemented for Zlib DEFLATE, ZStandard (ZSTD), Blosc, LZMA, BZ2, LZ4, LZW, LZF, ZFP, NPY, PNG, WebP, JPEG 8-bit, JPEG 12-bit, JPEG SOF3, JPEG LS, JPEG 2000, JPEG XR, PackBits, Packed Integers, Delta, XOR Delta, Floating Point Predictor, Bitorder reversal, and Bitshuffle.
- Author:
- Organization:
Laboratory for Fluorescence Dynamics. University of California, Irvine
- License:
3-clause BSD
- Version:
2019.11.18
Requirements
This release has been tested with the following requirements and dependencies (other versions may work):
libjpeg-turbo 2.0.3 (8 and 12-bit)
Required for testing (other versions may work):
Notes
Imagecodecs is currently developed, built, and tested on Windows only.
The API is not stable yet and might change between revisions.
Works on little-endian platforms only.
Python 2.7 and 32-bit are deprecated.
The Microsoft Visual C++ Redistributable Packages are required on Windows.
Refer to the imagecodecs/licenses folder for 3rd party library licenses.
This software is based in part on the work of the Independent JPEG Group.
This software includes modified versions of dcm2niix’s jpg_0XC3.cpp and openjpeg’s color.c.
To install the requirements for building imagecodecs from source code on current Debian based Linux distributions, run:
$ sudo apt-get install build-essential python3-dev cython3 python3-setuptools python3-pip python3-wheel python3-numpy libz-dev libblosc-dev liblzma-dev liblz4-dev libzstd-dev libpng-dev libwebp-dev libbz2-dev libopenjp2-7-dev libjpeg62-turbo-dev libjxr-dev liblcms2-dev libtiff-dev
The imagecodecs package can be challenging to build from source code. Consider using the imagecodecs-lite package instead, which does not depend on external third-party C libraries and provides a subset of image codecs for the tifffile library: LZW, PackBits, Delta, XOR Delta, Packed Integers, Floating Point Predictor, and Bitorder reversal.
Other Python packages providing imaging or compression codecs:
Revisions
- 2019.11.18
Pass 2755 tests. Add bitshuffle codec. Fix formatting of unknown error numbers. Fix test failures with official python-lzf.
- 2019.11.5
Rebuild with updated dependencies.
- 2019.5.22
Add optional YCbCr chroma subsampling to JPEG encoder. Add default reversible mode to ZFP encoder. Add imread and imwrite helper functions.
- 2019.4.20
Fix setup requirements.
- 2019.2.22
Move codecs without 3rd-party C library dependencies to imagecodecs_lite.
- 2019.2.20
Rebuild with updated dependencies.
- 2019.1.20
Add more pixel formats to JPEG XR codec. Add JPEG XR encoder.
- 2019.1.14
Add ZFP codec via zfp library (WIP). Add numpy NPY and NPZ codecs. Fix some static codechecker errors.
- 2019.1.1
Update copyright year. Do not install package if Cython extension fails to build. Fix compiler warnings.
- 2018.12.16
Reallocate LZW buffer on demand. Ignore integer type output arguments for codecs returning images.
- 2018.12.12
Enable decoding of subsampled J2K images via conversion to RGB. Enable decoding of large JPEG using patched libjpeg-turbo. Switch to Cython 0.29, language_level=3.
- 2018.12.1
Add J2K encoder (WIP). Use ZStd content size 1 MB if it cannot be determined. Use logging.warning instead of warnings.warn or print.
- 2018.11.8
Decode LSB style LZW. Fix last byte not written by LZW decoder (bug fix). Permit unknown colorspaces in JPEG codecs (e.g. CFA used in TIFF).
- 2018.10.30
Add JPEG 8-bit and 12-bit encoders. Improve color space handling in JPEG codecs.
- 2018.10.28
Rename jpeg0xc3 to jpegsof3. Add JPEG LS codec via libcharls. Fix missing alpha values in jxr_decode. Fix decoding JPEG SOF3 with multiple DHTs.
- 2018.10.22
Add Blosc codec via libblosc.
- 2018.10.21
Builds on Ubuntu 18.04 WSL. Include liblzf in srcdist. Do not require CreateDecoderFromBytes patch to jxrlib.
- 2018.10.18
Improve jpeg_decode wrapper.
- 2018.10.17
Add JPEG SOF3 decoder based on jpg_0XC3.cpp.
- 2018.10.10
Add PNG codec via libpng. Add option to specify output colorspace in JPEG decoder. Fix Delta codec for floating point numbers. Fix XOR Delta codec.
- 2018.9.30
Add LZF codec via liblzf.
- 2018.9.22
Add WebP codec via libwebp.
- 2018.8.29
Add PackBits encoder.
- 2018.8.22
Add link library version information. Add option to specify size of LZW buffer. Add JPEG 2000 decoder via openjpeg. Add XOR Delta codec.
- 2018.8.16
Link to libjpeg-turbo. Support Python 2.7 and Visual Studio 2008.
- 2018.8.10
Initial alpha release. Add LZW, PackBits, PackInts and FloatPred decoders from tifffile.c module. Add JPEG and JPEG XR decoders from czifile.pyx module.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for imagecodecs-2019.11.18-pp372-pp372-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64c751a968e7181c73ee073b507a723c82d491ea17bdb672bddf75b17c31eaaf |
|
MD5 | b8f3b4bbb9b025980a0f589c2a21e9c2 |
|
BLAKE2b-256 | f4db1c9ad619d432269c9e669eaa2581fb04ec72b21b7400172d335e17dccee5 |
Hashes for imagecodecs-2019.11.18-pp272-pypy_41-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73193dbf1da987b559db439da458db735ac5a443c6138a4fa26390f0fc8e769a |
|
MD5 | 02186e119b58e40b85a7f0d23989af78 |
|
BLAKE2b-256 | b5192a1be40707c53de538146cfc3299b7d995aa88325aae3156a7138ef7b064 |
Hashes for imagecodecs-2019.11.18-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20682601b6c0000f737e4590f4a6eae149da9cb1bdb5b6629fec89e9bc9b2cd |
|
MD5 | 827a7abbcdda187be932cfa6ff4e8d2a |
|
BLAKE2b-256 | 8d97f6e2f2920da0e41ec7b7d1f519a9a0354d394a200970a1a0dba0e319f719 |
Hashes for imagecodecs-2019.11.18-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac8b0d9cfa3b3d1652ed7266646c2f4d7bb8a1fc712c97b8ebedd715c19e8975 |
|
MD5 | 4842bd8d3fae6e26b6d9a4f34ea0fe00 |
|
BLAKE2b-256 | 540eb441180ea3a0936021217b6387fa1270e1ca3c8f0c555dcbd162f9a82e43 |
Hashes for imagecodecs-2019.11.18-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6036e5e44e01203f182d757003435902aa58b6e9259c4e67a111b2026242198 |
|
MD5 | 8066c7829b3e7293aea12df56997ea16 |
|
BLAKE2b-256 | f2ab12715cb46dd9460b09c2768b7423205b94a0fba32edb16388de14b4afeff |
Hashes for imagecodecs-2019.11.18-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb190763bb660610e06ded3acd62a5d9ee7a17b2a2f40a76f07db61c15ac8c8 |
|
MD5 | 21d9468db45fc3a841b453c8a55de647 |
|
BLAKE2b-256 | 43c7caf178eca6a9976cb4b3fddd95467e71bf74be92b11033f82892872eac52 |
Hashes for imagecodecs-2019.11.18-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c0a64696ebb8ebeaaeb941cb6c07492cd00ae56e4090c38e3d1a1b86ee42080 |
|
MD5 | 27cd8814c65459946299b2a5ea423418 |
|
BLAKE2b-256 | 449ef44c0182eda2679ac5df6e0c6353980a5d95d33b5bcab394f6a13654d23d |
Hashes for imagecodecs-2019.11.18-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29a91ddef897a601fd059afc56345b6bd0dca2dea75fdf64f43d79dbabf498d1 |
|
MD5 | 9a2d14bc638d75cc12896209cb5cfb9b |
|
BLAKE2b-256 | 86369b7bd9bae4ed1e5db44994781bee20638d27310d59a0c333747b74f34269 |
Hashes for imagecodecs-2019.11.18-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52c54b58266a7da28a3146567dc1db3840ba67964de86c9cc301609c62fca4e |
|
MD5 | 11f2e4732b12c598842d706a6a2f218b |
|
BLAKE2b-256 | cc6235f7053867a9b9d6bbb9e8dc240d87c772b2e623c80da86c87de15245586 |
Hashes for imagecodecs-2019.11.18-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90ff402a732c678a570bce13f19a562c8cf4caede1c7282f743f6792a5b18dfb |
|
MD5 | 014980c22cda928740fb9523e8a47836 |
|
BLAKE2b-256 | 47747a188ef784ddd6d440496287dc8f79cb04e0b3e2362af937f6e0a8f22207 |
Hashes for imagecodecs-2019.11.18-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3cc89a9fd1c039dd6fbf1aeedc8319a5f8e746d6499ef57cb28e9abaecae028 |
|
MD5 | e9a7579b34080ea75b4d0e26ab30aa08 |
|
BLAKE2b-256 | d1de2562102e74290e588d857c92ff58f852d18f7eefcb44ce641e8a115c55ba |
Hashes for imagecodecs-2019.11.18-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31cc67dbf934c2c3b23e3eb623c6a0b17ac760ae5a7e369522bd4c7cedd84024 |
|
MD5 | ab428840bc7e23881d36446bf2eb679f |
|
BLAKE2b-256 | d958ff783abb744d614d0d30b3023c8d219af11425ec208a2b2cd302fde895ee |