@@ -8,16 +8,16 @@ Czifile, Zarr, kerchunk, and other scientific image input/output packages.
8
8
Decode and/or encode functions are implemented for Zlib (DEFLATE), GZIP,
9
9
ZStandard (ZSTD), Blosc, Brotli, Snappy, LZMA, BZ2, LZ4, LZ4F, LZ4HC, LZW,
10
10
LZF, LZFSE, LZHAM, PGLZ (PostgreSQL LZ), RCOMP (Rice), ZFP, AEC, SZIP, LERC,
11
- NPY, PNG, APNG, GIF, TIFF, WebP, QOI, JPEG 8-bit, JPEG 12-bit, Lossless JPEG
12
- (LJPEG, LJ92, JPEGLL), JPEG 2000 (JP2, J2K), JPEG LS, JPEG XL,
11
+ NPY, BCn, DDS, PNG, APNG, GIF, TIFF, WebP, QOI, JPEG 8-bit, JPEG 12-bit,
12
+ Lossless JPEG (LJPEG, LJ92, JPEGLL), JPEG 2000 (JP2, J2K), JPEG LS, JPEG XL,
13
13
JPEG XR (WDP, HD Photo), MOZJPEG, AVIF, HEIF, RGBE (HDR), Jetraw, PackBits,
14
14
Packed Integers, Delta, XOR Delta, Floating Point Predictor, Bitorder reversal,
15
15
Byteshuffle, Bitshuffle, CMS (color space transformations), and Float24
16
16
(24-bit floating point).
17
17
18
18
:Author: `Christoph Gohlke <https://www.cgohlke.com >`_
19
19
:License: BSD 3-Clause
20
- :Version: 2023.3.16
20
+ :Version: 2023.7.4
21
21
:DOI: `10.5281/zenodo.6915978 <https://doi.org/10.5281/zenodo.6915978 >`_
22
22
23
23
Quickstart
@@ -46,91 +46,103 @@ Requirements
46
46
This revision was tested with the following requirements and dependencies
47
47
(other versions may work):
48
48
49
- - `CPython <https://www.python.org >`_ 3.8.10, 3.9.13, 3.10.10, 3.11.2, 64-bit
50
- - `Numpy <https://pypi.org/project/numpy >`_ 1.23.5
49
+ - `CPython <https://www.python.org >`_ 3.9.13, 3.10.11, 3.11.4, 3.12.0b3, 64-bit
50
+ - `Numpy <https://pypi.org/project/numpy >`_ 1.25.0
51
+ - `numcodecs <https://pypi.org/project/numcodecs/ >`_ 0.11.0
52
+ (optional, for Zarr compatible codecs)
51
53
52
54
Build requirements:
53
55
54
- - `Cython <https://github.com/cython/cython >`_ 0.29.33
56
+ - `Cython <https://github.com/cython/cython >`_ 0.29.36
55
57
- `brotli <https://github.com/google/brotli >`_ 1.0.9
56
58
- `brunsli <https://github.com/google/brunsli >`_ 0.1
57
59
- `bzip2 <https://gitlab.com/bzip2/bzip2 >`_ 1.0.8
58
- - `c-blosc <https://github.com/Blosc/c-blosc >`_ 1.21.3
59
- - `c-blosc2 <https://github.com/Blosc/c-blosc2 >`_ 2.7.1
60
- - `cfitsio <https://heasarc.gsfc.nasa.gov/fitsio/ >`_ 3.49
61
- - `charls <https://github.com/team-charls/charls >`_ 2.4.1
60
+ - `c-blosc <https://github.com/Blosc/c-blosc >`_ 1.21.4
61
+ - `c-blosc2 <https://github.com/Blosc/c-blosc2 >`_ 2.10.0
62
+ - `charls <https://github.com/team-charls/charls >`_ 2.4.2
62
63
- `giflib <https://sourceforge.net/projects/giflib/ >`_ 5.2.1
63
64
- `jetraw <https://github.com/Jetraw/Jetraw >`_ 22.02.16.1
64
- - `jxrlib <https://salsa.debian.org/debian-phototools-team /jxrlib >`_ 1.1
65
+ - `jxrlib <https://github.com/cgohlke /jxrlib >`_ 1.2
65
66
- `lcms <https://github.com/mm2/Little-CMS >`_ 2.15
66
67
- `lerc <https://github.com/Esri/lerc >`_ 4.0.0
67
68
- `libaec <https://gitlab.dkrz.de/k202009/libaec >`_ 1.0.6
68
69
- `libavif <https://github.com/AOMediaCodec/libavif >`_ 0.11.1
69
- (`aom <https://aomedia.googlesource.com/aom >`_ 3.6.0 ,
70
- `dav1d <https://github.com/videolan/dav1d >`_ 1.1.0 ,
71
- `rav1e <https://github.com/xiph/rav1e >`_ 0.6.3 ,
72
- `svt-av1 <https://gitlab.com/AOMediaCodec/SVT-AV1 >`_ 1.4.1 )
73
- - `libdeflate <https://github.com/ebiggers/libdeflate >`_ 1.17
74
- - `libheif <https://github.com/strukturag/libheif >`_ 1.15.1
75
- (`libde265 <https://github.com/strukturag/libde265 >`_ 1.0.11 ,
70
+ (`aom <https://aomedia.googlesource.com/aom >`_ 3.6.1 ,
71
+ `dav1d <https://github.com/videolan/dav1d >`_ 1.2.1 ,
72
+ `rav1e <https://github.com/xiph/rav1e >`_ 0.6.6 ,
73
+ `svt-av1 <https://gitlab.com/AOMediaCodec/SVT-AV1 >`_ 1.6.0 )
74
+ - `libdeflate <https://github.com/ebiggers/libdeflate >`_ 1.18
75
+ - `libheif <https://github.com/strukturag/libheif >`_ 1.16.2
76
+ (`libde265 <https://github.com/strukturag/libde265 >`_ 1.0.12 ,
76
77
`x265 <https://bitbucket.org/multicoreware/x265_git/src/master/ >`_ 3.5)
77
- - `libjpeg-turbo <https://github.com/libjpeg-turbo/libjpeg-turbo >`_ 2.1.91
78
- - `libjxl <https://github.com/libjxl/libjxl >`_ 0.8.1
78
+ - `libjpeg-turbo <https://github.com/libjpeg-turbo/libjpeg-turbo >`_ 3.0.0
79
+ - `libjxl <https://github.com/libjxl/libjxl >`_ 0.8.2
80
+ - `liblzma <https://git.tukaani.org/?p=xz.git >`_ 5.4.3
79
81
- `libpng <https://github.com/glennrp/libpng >`_ 1.6.39
80
82
- `libpng-apng <https://sourceforge.net/projects/libpng-apng/ >`_ 1.6.39
81
- - `libtiff <https://gitlab.com/libtiff/libtiff >`_ 4.5.0
82
- - `libwebp <https://github.com/webmproject/libwebp >`_ 1.3.0
83
+ - `libtiff <https://gitlab.com/libtiff/libtiff >`_ 4.5.1
84
+ - `libwebp <https://github.com/webmproject/libwebp >`_ 1.3.1
83
85
- `lz4 <https://github.com/lz4/lz4 >`_ 1.9.4
84
86
- `lzfse <https://github.com/lzfse/lzfse/ >`_ 1.0
85
87
- `lzham_codec <https://github.com/richgel999/lzham_codec/ >`_ 1.0
86
88
- `mozjpeg <https://github.com/mozilla/mozjpeg >`_ 4.1.1
87
89
- `openjpeg <https://github.com/uclouvain/openjpeg >`_ 2.5.0
88
90
- `snappy <https://github.com/google/snappy >`_ 1.1.10
89
- - `xz <https://git.tukaani.org/?p=xz.git >`_ 5.4.1
90
91
- `zfp <https://github.com/LLNL/zfp >`_ 1.0.0
91
92
- `zlib <https://github.com/madler/zlib >`_ 1.2.13
92
- - `zlib-ng <https://github.com/zlib-ng/zlib-ng >`_ 2.0.6
93
+ - `zlib-ng <https://github.com/zlib-ng/zlib-ng >`_ 2.1.3
93
94
- `zopfli <https://github.com/google/zopfli >`_ 1.0.3
94
- - `zstd <https://github.com/facebook/zstd >`_ 1.5.4
95
+ - `zstd <https://github.com/facebook/zstd >`_ 1.5.5
95
96
96
97
Vendored requirements:
97
98
99
+ - `bcdec.h <https://github.com/iOrange/bcdec >`_ 026acf9
98
100
- `bitshuffle <https://github.com/kiyo-masui/bitshuffle >`_ 0.5.1
101
+ - `cfitsio ricecomp.c <https://heasarc.gsfc.nasa.gov/fitsio/ >`_ modified
99
102
- `jpg_0XC3.cpp
100
103
<https://github.com/rordenlab/dcm2niix/blob/master/console/jpg_0XC3.cpp> `_
101
104
modified
102
105
- `liblj92
103
106
<https://bitbucket.org/baldand/mlrawviewer/src/master/liblj92/> `_ modified
104
107
- `liblzf <http://oldhome.schmorp.de/marc/liblzf.html >`_ 3.6
105
- - `libspng <https://github.com/randy408/libspng >`_ 0.7.3
106
- - `pg_lzcompress.c <https://github.com/postgres/postgres/tree/
107
- master/src/common/pg_lzcompress.c> `_ modified
108
- - `qoi.h <https://github.com/phoboslab/qoi/ >`_ c3dcfe7
108
+ - `libspng <https://github.com/randy408/libspng >`_ 0.7.4
109
+ - `pg_lzcompress.c <https://github.com/postgres/postgres >`_ modified
110
+ - `qoi.h <https://github.com/phoboslab/qoi/ >`_ 36190eb
109
111
- `rgbe.c <https://www.graphics.cornell.edu/~bjw/rgbe/rgbe.c >`_ modified
110
112
111
113
Test requirements:
112
114
113
- - `tifffile <https://pypi.org/project/tifffile >`_ 2023.3.15
115
+ - `tifffile <https://pypi.org/project/tifffile >`_ 2023.7.4
114
116
- `czifile <https://pypi.org/project/czifile >`_ 2019.7.2
115
- - `zarr <https://github.com/zarr-developers/zarr-python >`_ 2.14.2
116
- - `numcodecs <https://github.com/zarr-developers/numcodecs >`_ 0.11.0
117
- - `bitshuffle <https://github.com/kiyo-masui/bitshuffle >`_ 0.5.1
117
+ - `zarr <https://github.com/zarr-developers/zarr-python >`_ 2.15.0
118
118
- `python-blosc <https://github.com/Blosc/python-blosc >`_ 1.11.1
119
- - `python-blosc2 <https://github.com/Blosc/python-blosc2 >`_ 2.1.1
119
+ - `python-blosc2 <https://github.com/Blosc/python-blosc2 >`_ 2.2.5
120
120
- `python-brotli <https://github.com/google/brotli/tree/master/python >`_ 1.0.9
121
121
- `python-lz4 <https://github.com/python-lz4/python-lz4 >`_ 4.3.2
122
122
- `python-lzf <https://github.com/teepark/python-lzf >`_ 0.2.4
123
123
- `python-snappy <https://github.com/andrix/python-snappy >`_ 0.6.1
124
- - `python-zstd <https://github.com/sergey-dryabzhinsky/python-zstd >`_ 1.5.4.0
124
+ - `python-zstd <https://github.com/sergey-dryabzhinsky/python-zstd >`_ 1.5.5.1
125
125
- `pyliblzfse <https://github.com/ydkhatri/pyliblzfse >`_ 0.4.1
126
126
- `zopflipy <https://github.com/hattya/zopflipy >`_ 1.8
127
127
128
128
Revisions
129
129
---------
130
130
131
+ 2023.7.4
132
+
133
+ - Pass 6900 tests.
134
+ - Add BCn and DDS decoder via bcdec library.
135
+ - Add functions to transcode JPEG XL to/from JPEG (#78).
136
+ - Add option to decode select frames from animated WebP.
137
+ - Use legacy JPEG8 codec when building without libjpeg-turbo 3 (#65).
138
+ - Change blosc2_encode defaults to match blosc2-python (breaking).
139
+ - Fix segfault writing JPEG2K with more than 4 samples.
140
+ - Fix some codecs returning bytearray by default.
141
+ - Fully vendor cfitsio's ricecomp.c.
142
+ - Drop support for Python 3.8 and numpy < 1.21 (NEP29).
143
+
131
144
2023.3.16
132
145
133
- - Pass 6884 tests.
134
146
- Require libjpeg-turbo 2.1.91 (3.0 beta) and c-blosc2 2.7.1.
135
147
- Add experimental type hints.
136
148
- Add SZIP codec via libaec library.
@@ -211,7 +223,7 @@ Revisions
211
223
212
224
2022.2.22
213
225
214
- - ...
226
+ - …
215
227
216
228
Refer to the CHANGES file for older revisions.
217
229
@@ -249,13 +261,14 @@ This library is largely a work in progress.
249
261
250
262
The API is not stable yet and might change between revisions.
251
263
252
- Python <= 3.7 is no longer supported. 32-bit versions are deprecated.
264
+ Python <= 3.8 is no longer supported. 32-bit versions are deprecated.
253
265
254
266
Works on little-endian platforms only.
255
267
256
268
Only ``win_amd64 `` wheels include all features.
257
269
258
- The ``tiff ``, ``packints ``, and ``jpegsof3 `` codecs are currently decode-only.
270
+ The ``tiff ``, ``bcn ``, ``dds ``, ``packints ``, and ``jpegsof3 `` codecs
271
+ are currently decode-only.
259
272
260
273
The ``heif `` and ``jetraw `` codecs are distributed as source code only due to
261
274
license and possible patent usage issues.
@@ -287,11 +300,11 @@ latest Ubuntu Linux distributions:
287
300
libwebp-dev libbz2-dev libopenjp2-7-dev libjpeg-dev libjxr-dev
288
301
liblcms2-dev libcharls-dev libaec-dev libbrotli-dev libsnappy-dev
289
302
libzopfli-dev libgif-dev libtiff-dev libdeflate-dev libavif-dev
290
- libheif-dev libcfitsio-dev ``
303
+ libheif-dev ``
291
304
292
305
Use the ``--lite `` build option to only build extensions without 3rd-party
293
306
dependencies. Use the ``--skip-extension `` build options to skip building
294
- specific extensions, e.g. :
307
+ specific extensions, for example :
295
308
296
309
``python -m pip install imagecodecs --global-option="build_ext"
297
310
--global-option="--skip-bitshuffle" ``
@@ -312,6 +325,8 @@ Other Python packages and C libraries providing imaging or compression codecs:
312
325
`python-lzo <https://bitbucket.org/james_taylor/python-lzo-static >`_,
313
326
`python-lzw <https://github.com/joeatwork/python-lzw >`_,
314
327
`python-lerc <https://pypi.org/project/lerc/ >`_,
328
+ `wavpack-numcodecs
329
+ <https://github.com/AllenNeuralDynamics/wavpack-numcodecs> `_,
315
330
`packbits <https://github.com/psd-tools/packbits >`_,
316
331
`isa-l.igzip <https://github.com/intel/isa-l >`_,
317
332
`fpzip <https://github.com/seung-lab/fpzip >`_,
@@ -344,6 +359,8 @@ Other Python packages and C libraries providing imaging or compression codecs:
344
359
`Compressonator <https://github.com/GPUOpen-Tools/Compressonator >`_,
345
360
`Wuffs <https://github.com/google/wuffs >`_,
346
361
`TinyDNG <https://github.com/syoyo/tinydng >`_,
362
+ `OpenJPH <https://github.com/aous72/OpenJPH >`_,
363
+ `SPERR <https://github.com/NCAR/SPERR >`_ (GPL),
347
364
`MAFISC
348
365
<https://wr.informatik.uni-hamburg.de/research/projects/icomex/mafisc> `_.
349
366
@@ -438,6 +455,19 @@ dask.array:
438
455
... dask.array.from_zarr(store)
439
456
dask.array<from-zarr, shape=(1, 256, 256, 3)...chunksize=(1, 256, 256, 3)...
440
457
458
+ Write the Zarr store to a fsspec ReferenceFileSystem in JSON format
459
+ and open it as a Zarr array:
460
+
461
+ >>> store.write_fsspec(
462
+ ... ' temp.json' , url= ' file://' , codec_id= ' imagecodecs_jpeg2k'
463
+ ... )
464
+ >>> import fsspec
465
+ >>> mapper = fsspec.get_mapper(
466
+ ... ' reference://' , fo= ' temp.json' , target_protocol= ' file'
467
+ ... )
468
+ >>> zarr.open(mapper, mode = ' r' )
469
+ <zarr.core.Array (1, 256, 256, 3) uint8 read-only>
470
+
441
471
View the image in the JP2 file from the command line::
442
472
443
473
$ python -m imagecodecs _test.jp2
0 commit comments