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 image input/output modules.
Decode and/or encode functions are implemented for Zlib (DEFLATE), ZStandard (ZSTD), Blosc, Brotli, Snappy, LZMA, BZ2, LZ4, LZW, LZF, ZFP, AEC, LERC, NPY, PNG, GIF, TIFF, WebP, JPEG 8-bit, JPEG 12-bit, JPEG SOF3 (LJPEG), JPEG 2000, JPEG LS, JPEG XR, JPEG XL, PackBits, Packed Integers, Delta, XOR Delta, Floating Point Predictor, Bitorder reversal, and Bitshuffle.
- Author:
- Organization:
Laboratory for Fluorescence Dynamics. University of California, Irvine
- License:
BSD 3-Clause
- Version:
2020.5.30
Requirements
This release has been tested with the following requirements and dependencies (other versions may work):
libjpeg-turbo 2.0.4 (8 and 12-bit)
Required Python packages for testing (other versions may work):
Notes
The API is not stable yet and might change between revisions.
Works on little-endian platforms only.
Python 32-bit versions are deprecated. Python 2.7 and 3.5 are no longer supported.
The latest Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 is 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.
Build instructions and wheels for manylinux and macOS courtesy of Grzegorz Bokota.
Update pip and setuptools to the latest version before installing imagecodecs:
python -m pip install --upgrade pip setuptools
Install imagecodecs using precompiled wheels:
python -m pip install --upgrade imagecodecs
Install the requirements for building imagecodecs from source code on latest Ubuntu Linux distributions:
sudo apt-get install build-essential python3-dev cython3 python3-setuptools python3-pip python3-wheel python3-numpy python3-pytest python3-blosc python3-brotli python3-snappy python3-lz4 libz-dev libblosc-dev liblzma-dev liblz4-dev libzstd-dev libpng-dev libwebp-dev libbz2-dev libopenjp2-7-dev libjpeg-dev libjxr-dev liblcms2-dev libcharls-dev libaec-dev libbrotli-dev libsnappy-dev libzopfli-dev libgif-dev libtiff-dev
Use the --lite build option to only build extensions without 3rd-party dependencies. Use the --skip-extension build options to skip building specific extensions, e.g.:
python -m pip install imagecodecs --global-option="build_ext" --global-option="--skip-bitshuffle"
The jpeg12, jpegls, jpegxl, zfp, and lerc extensions are disabled by default when building from source.
To modify other build settings such as library names and compiler arguments, provide a imagecodecs_distributor_setup.customize_build function, which will be imported and executed during setup. See setup.py for examples.
Other Python packages and C libraries providing imaging or compression codecs:
Revisions
- 2020.5.30
Pass 4563 tests. Add LERC codec via ESRI’s lerc library. Enable building JPEG extensions with libjpeg >= 8. Enable distributors to modify build settings.
- 2020.2.18
Fix segfault when decoding corrupted LZW segments. Work around Cython raises AttributeError when using incompatible numpy. Raise ValueError if in-place decoding is not possible (except floatpred).
- 2020.1.31
Add GIF codec via giflib. Add TIFF decoder via libtiff (WIP). Add codec_check functions (WIP). Fix formatting libjpeg error messages. Use xfail in tests. Load extensions on demand on Python >= 3.7. Add build options to skip building specific extensions. Split imagecodecs extension into individual extensions. Move shared code into shared extension. Rename imagecodecs_lite extension and imagecodecs C library to ‘imcd’. Remove support for Python 2.7 and 3.5.
- 2019.12.31
Fix decoding of indexed PNG with transparency. Last version to support Python 2.7 and 3.5.
- 2019.12.16
Add Zopfli codec. Add Snappy codec. Rename j2k codec to jpeg2k. Rename jxr codec to jpegxr. Use Debian’s jxrlib. Support pathlib and binary streams in imread and imwrite. Move external C declarations to pxd files. Move shared code to pxi file. Update copyright notices.
- 2019.12.10
Add version functions. Add Brotli codec (WIP). Add optional JPEG XL codec via Brunsli repacker (WIP).
- 2019.12.3
Sync with imagecodecs-lite.
- 2019.11.28
Add AEC codec via libaec (WIP). Do not require scikit-image for testing. Require CharLS 2.1.
- 2019.11.18
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 optional ZFP codec via zfp library (WIP). Add numpy NPY and NPZ codecs. Fix some static codechecker errors.
- 2019.1.1
…
Refer to the CHANGES file for older revisions.
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-2020.5.30-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68077c9ae5d3f06c8aa37b1ebdc007dc0bea3f47c627950c235f4e0b0a871118 |
|
MD5 | 710f9368f3221a9f6fee09c4603bc3d0 |
|
BLAKE2b-256 | b7f4edbf49741877b2cb208afce57d66a479c87de85c0871b46c9311cf871dfb |
Hashes for imagecodecs-2020.5.30-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36bee5410f8ed9c9e3a69a3d08b314a6d15b82b4f3a65a278a3b6dfa9ce013fe |
|
MD5 | 703a378b8792857e017951bf46a72f87 |
|
BLAKE2b-256 | e20af0824ffde4381829a4361a8f88d6c2a2aa2312c89b96914f3301117c77a3 |
Hashes for imagecodecs-2020.5.30-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4297c42b7627f519162e089a0178f9eb516dbe4fecf79dd7eea7a5807090737b |
|
MD5 | b22d40cfdf8fc431a5513111337cf893 |
|
BLAKE2b-256 | 052e42e1da6f42d06e0ef32da9da3879fa5b08fa0fbbe514c72307b8f6aaaf7c |
Hashes for imagecodecs-2020.5.30-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c898cefeaf10b0b411811a0ea325640a6a705c420a6fa9d80892bbfbff2e900 |
|
MD5 | 261aed06242b1df7d69da39d1194e7cd |
|
BLAKE2b-256 | f32d144dcbc1c9b568ca72723550ee01c7ae7aa7f3da5e3f47dd599ccb3cded9 |
Hashes for imagecodecs-2020.5.30-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb05807c2fc3edce03ae84a50839f2ccaf4d59abd26af4cc8cd1ec174674b84e |
|
MD5 | badf4a94bd7b29514339d278ecab34ee |
|
BLAKE2b-256 | c3feae8de7cb5d7248376278f0bdda44d5f878432d55c6705904fa85e9aa3298 |
Hashes for imagecodecs-2020.5.30-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 004c617554bec7943d72281c6aaefb65467120ab6594bc42778d1613696295c0 |
|
MD5 | 2b7755dcb76ae089aa5d74896f2ba2ac |
|
BLAKE2b-256 | 0c4313953202528843afccc655c3d509981d149404fd96e34ba4db99b895e1ea |
Hashes for imagecodecs-2020.5.30-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ded82573f1d670878df2272771d2ba8b23f069afec14d53c5492b8506d5fc2ed |
|
MD5 | fc9a72cacf4621da6f0aaad87b877f72 |
|
BLAKE2b-256 | fc1884ef825a9cca8b1674476153cae5eee6d1abcba76502c83f08d61c95a7fb |
Hashes for imagecodecs-2020.5.30-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a00d7405066b85bab92300c2e4bd51b3a1a75aa8bca449acf1079ae3b30d381f |
|
MD5 | d087b11d48057891dd83357483d91cfa |
|
BLAKE2b-256 | c31fa2f7880b421e3fcfc56133ab406c7a63c6e84f16580db0203645c420a825 |
Hashes for imagecodecs-2020.5.30-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c98b48fa4c28bb7a142f2df034bd50b2b9fb893090297bb7f158073f23c1c02 |
|
MD5 | 2ffd5bbb43fd63e2f0c7475603f7f0ad |
|
BLAKE2b-256 | 67f64d932072cffc2be02d191e9a669cb7ead3f045641154b28189e91efed614 |
Hashes for imagecodecs-2020.5.30-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f2f011a482925d20f3e777fb6533f9784b4cf55f14292fe29405098cfb63ab3 |
|
MD5 | 315ac9642a5aba0605d5043b348553d6 |
|
BLAKE2b-256 | 50d963a7e051be19e52166e1eab4dad21a64db5b873f566e4d6f6c1fd6488d7a |
Hashes for imagecodecs-2020.5.30-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0332d45a3f4d469df14a59eee1e9aa1c35d078b7fcfefd12b542b033cc80b1ae |
|
MD5 | 1bbeba4544021ce64ccbb3a864bb2ac1 |
|
BLAKE2b-256 | 0626869afd7c120fa18e1df1f56401c5ac5d807f23fc85d6866107c673df0ab0 |
Hashes for imagecodecs-2020.5.30-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 594a1b53de13cbc0f26ad6a2a3742d29351edcb7de34b19bf000254ef2755e29 |
|
MD5 | 4f7cda30f140343d2bb69e099f4a1621 |
|
BLAKE2b-256 | 74d657dda4ce7e8646a713fea2c60d3ac4276d7f4830cf7ade68143d7908763d |
Hashes for imagecodecs-2020.5.30-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a6e06c7c8d8f3272da01987ad757dc0b657d87034d76081648a9b0dc3668499 |
|
MD5 | 34eac669a6b49d366ee55b5205a7e130 |
|
BLAKE2b-256 | e29c50056f3b6763ae3be4fe542dfcb67f144b624ab094ccb44964bfd2546c5b |
Hashes for imagecodecs-2020.5.30-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4d5dcfbb55058f7a186ec8a4355b4f05e71968c3d4f092e67bc75ca233a0859 |
|
MD5 | 2ade383aead1fe0747c86ed64b1d9413 |
|
BLAKE2b-256 | a8ed5c301a29e686965f6269eba813287b8774544eec5f72a6722039bf90a912 |
Hashes for imagecodecs-2020.5.30-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ba80aa03d859aa4e86e5576e5790885d4e9af23bb7109f69f77d83327b3aaa1 |
|
MD5 | 346c15702a9bc546113fb175de398618 |
|
BLAKE2b-256 | c4fec9c19277fbf181d413459e6228d1048c398711f060a29fc7368e8fa2b704 |
Hashes for imagecodecs-2020.5.30-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 779ed32c215f9d0b41172e64d80e5968a6382204cdb658404519b09972177a60 |
|
MD5 | 3c69480e0c5eadeb984b93fc8f58f037 |
|
BLAKE2b-256 | 836ab864a6f67c10b45d427f2f658ab4a842b2d2ec932d13be580e46da954ad5 |
Hashes for imagecodecs-2020.5.30-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b980b8cb082d7c4aaa22cd339648a749a4e5c5e017743dec49ffebea3eaf96ee |
|
MD5 | 45aee4905808c3b283463b48d7fde78e |
|
BLAKE2b-256 | 35b575bed4234412d64dbb19db9e332b897f3f9892c7722bd4822c04662eab62 |
Hashes for imagecodecs-2020.5.30-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fb63b74511e06d8ba57332f051fc7648d10f0fc3d984b6236f5db58a0535e66 |
|
MD5 | 85b193666d8cc7aee9dc82fc501886e9 |
|
BLAKE2b-256 | 428ab38247d656fa2377aa3456a0391289b9455e8ba3a8c3390ae365955e3d3f |
Hashes for imagecodecs-2020.5.30-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db8f8f7742d29455cb6f537a15b8703afb74ba3b97ad465cd876460aaf8d5393 |
|
MD5 | a3d1bc22a542504f2e79d613feaba2b6 |
|
BLAKE2b-256 | 072e101fecbfb518f88c38c549fca0cf21fdf2e227811032a7198bf693e0d56a |
Hashes for imagecodecs-2020.5.30-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d881e607322da66cd3d86f242fef6b2da484a413f98fef017032e6e86975ec5 |
|
MD5 | cabecc7fcfba4526174df779b4d113df |
|
BLAKE2b-256 | c5423f8decf3a82a60acc0c7e3a0fe1f5ce561414195bd16599689573d2cf375 |
Hashes for imagecodecs-2020.5.30-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e60edca9a8e6e1373f5e4a7409a30fc6ba4b698829825d178479a474e8b11ce |
|
MD5 | c30ab63a5f289761f68f160b2eb79f26 |
|
BLAKE2b-256 | 3c1d4fbfb8f15d640bba255f6b2382abf4016e52c1961a852e8fd1b9d344d303 |
Hashes for imagecodecs-2020.5.30-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d291527b4870095b45c457e1afafca812b6b9e6953c7802a37acd9bc8979bd66 |
|
MD5 | 183bff9450f50f28fcf0c7ff5195ebda |
|
BLAKE2b-256 | 95d009edd29531c81bb95919a687c14eafaf9867fdefabfdafc27b139434a394 |
Hashes for imagecodecs-2020.5.30-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e649942e921ada0a16da0aabd4b731be879e620bfe9b1db0ed7dac008e4eaa2b |
|
MD5 | 121aaa98b219cacf4b4afbaeaa61d1f2 |
|
BLAKE2b-256 | 4818941afe75e5bdd158b92412e4305ffecfde1f69d99e95880491a921575d9d |
Hashes for imagecodecs-2020.5.30-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 916862eb43e69dfeb27205d6f0cc05a39cadad1df98a29f8162326d9c986dc49 |
|
MD5 | 4e81a21cde5bedadaf98dbe0bcd471e3 |
|
BLAKE2b-256 | cc1536a021f48755a3f2efaa1dd52d0bc09f9fdece1863803f9a0c64d077c7f3 |
Hashes for imagecodecs-2020.5.30-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110318270910b3b62941da60fed009dd669434d6344675c48d25df5207cdafa1 |
|
MD5 | d52b1222e905e75409975f97c8fd87db |
|
BLAKE2b-256 | f7d1a45dd4896056b29df681caa2a2db0da9b7175b6d34cd3ec23293462b9c47 |