@@ -6,13 +6,13 @@ Image transformation, compression, and decompression codecs
6
6
7
7
Imagecodecs is a Python library that provides block-oriented, in-memory buffer
8
8
transformation, compression, and decompression functions for use in Tifffile,
9
- Czifile, Zarr, kerchunk, and other scientific image input/output packages.
9
+ Czifile, Zarr 2 , kerchunk, and other scientific image input/output packages.
10
10
11
11
Decode and/or encode functions are implemented for Zlib (DEFLATE), GZIP, LZMA,
12
12
ZStandard (ZSTD), Blosc, Brotli, Snappy, BZ2, LZ4, LZ4F, LZ4HC, LZ4H5, LZW,
13
13
LZO, LZF, LZFSE, LZHAM, PGLZ (PostgreSQL LZ), RCOMP (Rice), ZFP, SZ3, Pcodec,
14
14
SPERR, AEC, SZIP, LERC, EER, NPY, BCn, DDS, BMP, PNG, APNG, GIF, TIFF, WebP,
15
- JPEG 8 and 12 -bit, Lossless JPEG (LJPEG, LJ92, JPEGLL), JPEG 2000 (JP2, J2K),
15
+ JPEG (2 to 16 -bit) , Lossless JPEG (LJPEG, LJ92, JPEGLL), JPEG 2000 (JP2, J2K),
16
16
JPEG LS, JPEG XL, JPEG XS, JPEG XR (WDP, HD Photo), Ultra HDR (JPEG_R),
17
17
MOZJPEG, AVIF, HEIF, QOI, RGBE (HDR), Jetraw, DICOMRLE, PackBits,
18
18
Packed Integers, Delta, XOR Delta, Floating Point Predictor, Bitorder reversal,
@@ -24,7 +24,7 @@ Jenkins lookup3.
24
24
25
25
:Author: `Christoph Gohlke <https://www.cgohlke.com >`_
26
26
:License: BSD 3-Clause
27
- :Version: 2024.9.22
27
+ :Version: 2024.12.30
28
28
:DOI: `10.5281/zenodo.6915978 <https://doi.org/10.5281/zenodo.6915978 >`_
29
29
30
30
Quickstart
@@ -53,10 +53,10 @@ Requirements
53
53
This revision was tested with the following requirements and dependencies
54
54
(other versions may work):
55
55
56
- - `CPython <https://www.python.org >`_ 3.10.11, 3.11.9, 3.12.6 , 3.13.0rc2 64-bit
57
- - `Numpy <https://pypi.org/project/numpy >`_ 2.1.1
58
- - `numcodecs <https://pypi.org/project/numcodecs/ >`_ 0.13.0
59
- (optional, for Zarr compatible codecs)
56
+ - `CPython <https://www.python.org >`_ 3.10.11, 3.11.9, 3.12.8 , 3.13.1 64-bit
57
+ - `Numpy <https://pypi.org/project/numpy >`_ 2.1.3
58
+ - `numcodecs <https://pypi.org/project/numcodecs/ >`_ 0.14.1
59
+ (optional, for Zarr 2 compatible codecs)
60
60
61
61
Build requirements:
62
62
@@ -65,7 +65,7 @@ Build requirements:
65
65
- `brunsli <https://github.com/google/brunsli >`_ 0.1
66
66
- `bzip2 <https://gitlab.com/bzip2/bzip2 >`_ 1.0.8
67
67
- `c-blosc <https://github.com/Blosc/c-blosc >`_ 1.21.6
68
- - `c-blosc2 <https://github.com/Blosc/c-blosc2 >`_ 2.15.1
68
+ - `c-blosc2 <https://github.com/Blosc/c-blosc2 >`_ 2.15.2
69
69
- `charls <https://github.com/team-charls/charls >`_ 2.4.2
70
70
- `giflib <https://sourceforge.net/projects/giflib/ >`_ 5.2.2
71
71
- `jetraw <https://github.com/Jetraw/Jetraw >`_ 23.03.16.4
@@ -74,34 +74,34 @@ Build requirements:
74
74
- `lerc <https://github.com/Esri/lerc >`_ 4.0.4
75
75
- `libaec <https://gitlab.dkrz.de/k202009/libaec >`_ 1.1.3
76
76
- `libavif <https://github.com/AOMediaCodec/libavif >`_ 1.1.1
77
- (`aom <https://aomedia.googlesource.com/aom >`_ 3.10 .0,
78
- `dav1d <https://github.com/videolan/dav1d >`_ 1.4.3 ,
77
+ (`aom <https://aomedia.googlesource.com/aom >`_ 3.11 .0,
78
+ `dav1d <https://github.com/videolan/dav1d >`_ 1.5.0 ,
79
79
`rav1e <https://github.com/xiph/rav1e >`_ 0.7.1,
80
- `svt-av1 <https://gitlab.com/AOMediaCodec/SVT-AV1 >`_ 2.2.1
80
+ `svt-av1 <https://gitlab.com/AOMediaCodec/SVT-AV1 >`_ 2.3.0
81
81
`libyuv <https://chromium.googlesource.com/libyuv/libyuv >`_ main)
82
- - `libdeflate <https://github.com/ebiggers/libdeflate >`_ 1.21
83
- - `libheif <https://github.com/strukturag/libheif >`_ 1.18.2
82
+ - `libdeflate <https://github.com/ebiggers/libdeflate >`_ 1.23
83
+ - `libheif <https://github.com/strukturag/libheif >`_ 1.19.5
84
84
(`libde265 <https://github.com/strukturag/libde265 >`_ 1.0.15,
85
85
`x265 <https://bitbucket.org/multicoreware/x265_git/src/master/ >`_ 3.6)
86
- - `libjpeg-turbo <https://github.com/libjpeg-turbo/libjpeg-turbo >`_ 3.0.4
87
- - `libjxl <https://github.com/libjxl/libjxl >`_ 0.11.0
86
+ - `libjpeg-turbo <https://github.com/libjpeg-turbo/libjpeg-turbo >`_ 3.1.0
87
+ - `libjxl <https://github.com/libjxl/libjxl >`_ 0.11.1
88
88
- `libjxs <https://jpeg.org/jpegxs/software.html >`_ 2.0.2
89
- - `liblzma <https://github.com/tukaani-project/xz >`_ 5.6.2
89
+ - `liblzma <https://github.com/tukaani-project/xz >`_ 5.6.3
90
90
- `libpng <https://github.com/glennrp/libpng >`_ 1.6.44
91
91
- `libpng-apng <https://sourceforge.net/projects/libpng-apng/ >`_ 1.6.44
92
92
- `libtiff <https://gitlab.com/libtiff/libtiff >`_ 4.7.0
93
- - `libultrahdr <https://github.com/google/libultrahdr >`_ 1.2 .0
94
- - `libwebp <https://github.com/webmproject/libwebp >`_ 1.4 .0
93
+ - `libultrahdr <https://github.com/google/libultrahdr >`_ 1.3 .0
94
+ - `libwebp <https://github.com/webmproject/libwebp >`_ 1.5 .0
95
95
- `lz4 <https://github.com/lz4/lz4 >`_ 1.10.0
96
96
- `lzfse <https://github.com/lzfse/lzfse/ >`_ 1.0
97
97
- `lzham_codec <https://github.com/richgel999/lzham_codec/ >`_ 1.0
98
98
- `lzokay <https://github.com/AxioDL/lzokay >`_ db2df1f
99
99
- `mozjpeg <https://github.com/mozilla/mozjpeg >`_ 4.1.5
100
- - `openjpeg <https://github.com/uclouvain/openjpeg >`_ 2.5.2
101
- - `pcodec <https://github.com/mwlon/pcodec >`_ 0.3.1
100
+ - `openjpeg <https://github.com/uclouvain/openjpeg >`_ 2.5.3
101
+ - `pcodec <https://github.com/mwlon/pcodec >`_ 0.3.1 (0.4.0 crashes)
102
102
- `snappy <https://github.com/google/snappy >`_ 1.2.1
103
103
- `sperr <https://github.com/NCAR/SPERR >`_ 0.8.2
104
- - `sz3 <https://github.com/szcompressor/SZ3 >`_ 3.1.8 (3.2.0 crashes)
104
+ - `sz3 <https://github.com/szcompressor/SZ3 >`_ 3.1.8 (3.2.x crashes)
105
105
- `zfp <https://github.com/LLNL/zfp >`_ 1.0.1
106
106
- `zlib <https://github.com/madler/zlib >`_ 1.3.1
107
107
- `zlib-ng <https://github.com/zlib-ng/zlib-ng >`_ 2.2.2
@@ -110,8 +110,8 @@ Build requirements:
110
110
111
111
Vendored requirements:
112
112
113
- - `bcdec.h <https://github.com/iOrange/bcdec >`_ 3b29f8f
114
- - `bitshuffle <https://github.com/kiyo-masui/bitshuffle >`_ 0.5.1
113
+ - `bcdec.h <https://github.com/iOrange/bcdec >`_ 963c5e5
114
+ - `bitshuffle <https://github.com/kiyo-masui/bitshuffle >`_ 0.5.2
115
115
- `cfitsio ricecomp.c <https://heasarc.gsfc.nasa.gov/fitsio/ >`_ modified
116
116
- `h5checksum.c <https://github.com/HDFGroup/hdf5/ >`_ modified
117
117
- `jpg_0XC3.cpp
@@ -129,9 +129,9 @@ Vendored requirements:
129
129
130
130
Test requirements:
131
131
132
- - `tifffile <https://pypi.org/project /tifffile >`_ 2024.9.20
133
- - `czifile <https://pypi.org/project /czifile >`_ 2019.7.2
134
- - `zarr <https://github.com/zarr-developers/zarr-python >`_ 2.18.2
132
+ - `tifffile <https://github.com/cgohlke /tifffile >`_ 2024.12.12
133
+ - `czifile <https://github.com/cgohlke /czifile >`_ 2019.7.2
134
+ - `zarr <https://github.com/zarr-developers/zarr-python >`_ 2.18.4
135
135
- `python-blosc <https://github.com/Blosc/python-blosc >`_ 1.11.2
136
136
- `python-blosc2 <https://github.com/Blosc/python-blosc2 >`_ 2.7.1
137
137
- `python-brotli <https://github.com/google/brotli/tree/master/python >`_ 1.0.9
@@ -145,9 +145,18 @@ Test requirements:
145
145
Revisions
146
146
---------
147
147
148
+ 2024.12.30
149
+
150
+ - Pass 7655 tests.
151
+ - Fix out parameter array not zeroed in some cases.
152
+ - Fix ultrahdr_encode with linear rgbaf16 input (#108).
153
+ - Fix jpegls_encode with level greater than 9 (#119).
154
+ - Fix jpeg8_encode with bitspersample and lossless=False (#116).
155
+ - Fix excessive buffer allocation in lz4h5_encode (#112).
156
+ - Fix build error with libjpeg (#111).
157
+
148
158
2024.9.22
149
159
150
- - Pass 7644 tests.
151
160
- Use libjpeg-turbo for all Lossless JPEG bit-depths if possible (#105).
152
161
- Fix PackBits encoder fails to skip short replication blocks (#107).
153
162
- Fix JPEG2K encoder leaving trailing random bytes (#104).
@@ -181,41 +190,6 @@ Revisions
181
190
182
191
2023.9.18
183
192
184
- - Rebuild with updated dependencies fixes CVE-2024-4863.
185
-
186
- 2023.9.4
187
-
188
- - Map avif_encode level parameter to quality (breaking).
189
- - Support monochrome images in avif_encode.
190
- - Add numthreads parameter to avif_decode (fix imread of AVIF).
191
- - Add quantize filter (BitGroom, BitRound, GBR) via nc4var.c.
192
- - Add LZ4H5 codec.
193
- - Support more BCn compressed DDS fourcc types.
194
- - Require libavif 1.0.
195
-
196
- 2023.8.12
197
-
198
- - Add EER (Electron Event Representation) decoder.
199
- - Add option to pass initial value to crc32 and adler32 checksum functions.
200
- - Add fletcher32 and lookup3 checksum functions via HDF5's h5checksum.c.
201
- - Add Checksum codec for numcodecs.
202
-
203
- 2023.7.10
204
-
205
- - Rebuild with optimized compile flags.
206
-
207
- 2023.7.4
208
-
209
- - Add BCn and DDS decoder via bcdec library.
210
- - Add functions to transcode JPEG XL to/from JPEG (#78).
211
- - Add option to decode select frames from animated WebP.
212
- - Use legacy JPEG8 codec when building without libjpeg-turbo 3 (#65).
213
- - Change blosc2_encode defaults to match blosc2-python (breaking).
214
- - Fix segfault writing JPEG2K with more than 4 samples.
215
- - Fix some codecs returning bytearray by default.
216
- - Fully vendor cfitsio's ricecomp.c.
217
- - Drop support for Python 3.8 and numpy < 1.21 (NEP29).
218
-
219
193
- …
220
194
221
195
Refer to the CHANGES file for older revisions.
@@ -353,11 +327,11 @@ Other projects providing imaging or compression codecs:
353
327
<https://wr.informatik.uni-hamburg.de/research/projects/icomex/mafisc> `_,
354
328
`B3D <https://github.com/balintbalazs/B3D >`_,
355
329
`fo-dicom.Codecs <https://github.com/Efferent-Health/fo-dicom.Codecs >`_,
356
- `jpegli <https://github.com/google/jpegli >`_.
330
+ `jpegli <https://github.com/google/jpegli >`_,
331
+ `hdf5plugin <https://github.com/silx-kit/hdf5plugin >`_.
357
332
358
333
Examples
359
334
--------
360
-
361
335
Import the JPEG2K codec:
362
336
363
337
.. code-block :: python
@@ -382,7 +356,7 @@ Print the version of the JPEG2K codec's underlying OpenJPEG library:
382
356
.. code-block :: python
383
357
384
358
>> > jpeg2k_version()
385
- ' openjpeg 2.5.2 '
359
+ ' openjpeg 2.5.3 '
386
360
387
361
Encode a numpy array in lossless JP2 format:
388
362
@@ -442,7 +416,7 @@ Read the image from the JP2 file as numpy array:
442
416
>> > numpy.array_equal(image, array)
443
417
True
444
418
445
- Create a JPEG 2000 compressed Zarr array:
419
+ Create a JPEG 2000 compressed Zarr 2 array:
446
420
447
421
.. code-block :: python
448
422
@@ -476,7 +450,7 @@ dask.array:
476
450
...
477
451
dask.array< from - zarr, shape= (1 , 256 , 256 , 3 )... chunksize= (1 , 256 , 256 , 3 )...
478
452
479
- Write the Zarr store to a fsspec ReferenceFileSystem in JSON format
453
+ Write the Zarr 2 store to a fsspec ReferenceFileSystem in JSON format
480
454
and open it as a Zarr array:
481
455
482
456
.. code-block :: python
0 commit comments