github cgohlke/imagecodecs v2026.8.16

4 hours ago

Image transformation, compression, and decompression codecs

Imagecodecs is a Python library that provides block-oriented, in-memory buffer transformation, compression, and decompression functions for use in tifffile, liffile, czifile, zarr, and other scientific image input/output packages.

Decode and/or encode functions are implemented for Byte compressors: AEC, Blosc, Blosc2, Brotli, BZ2, CZI ZSTD1 and CHUNKED (with hilo filter), DEFLATE (zlib, isa-l, libdeflate, zlib-ng), GZIP, LZ4, LZ4F, LZ4H5, LZF, LZFSE, LZHAM, LZMA, LZO, LZW, OpenZL, PackBits, PGLZ (PostgreSQL LZ), Snappy, Szip, Zopfli, and ZStandard (ZSTD); Image formats: APNG, AVIF, BCn, BMP, DDS, EXR, GIF, HEIF, High-throughput JPEG 2000 (HTJ2K, JPH), JPEG (2 to 16-bit), JPEG 2000 (JP2, J2K), JPEG LS, JPEG XR, JPEG XS, Lossless JPEG (LJPEG, LJ92, JPEGLL), MOZJPEG, PCX, PNG, QOI, RGBE (HDR), TGA (TARGA), TIFF, Ultra HDR (JPEG_R), WebP, and WIC (Windows Imaging Component); Image compressors: CCITT (RLE, T.4 and T.6), DICOM RLE, and PixarLog; Scientific compressors: B2ND, EER, HCOMP, Jetraw, LERC, NPZ, Pcodec, PLIO, RCOMP (Rice), SPERR, SZ3, and ZFP; Filters: Bitorder reversal, CMS (color space transformations), Delta, Quantize (Scale, BitGroom, BitRound, GranularBR), and XOR Delta; Shufflers: Bitshuffle, Byteshuffle, Floating Point Predictor, Meshopt, Packed Integers (TIFF, MONO p and packed), and WavPack, Type conversions: Bfloat16 (brain floating point), and Float24 (24-bit floating point); and Checksums: CRC-32, Adler-32, Fletcher-32, and Jenkins lookup3.

Changes

  • Add CHUNKED codec for experimental chunked compression in CZI files.
  • Change zarr Byteshuffle, Bitshuffle, Floatpred to ArrayByteCodec (breaking).
  • Remove axis parameter from Packbits zarr codecs (breaking).
  • Remove height and width parameters from Ccitt zarr codecs (breaking).
  • Fix codecs failing on empty or small input (#146, #147).
  • Fix zarr codecs squeezing planar dimension (#145).
  • Fix sperr_encode fails with non-contiguous input.
  • Fix lzw_decode writes to truncated output.
  • Fix tiff_decode fails to read 12-bit JPEG compressed TIFF files.
  • Fix jpegxl_encode fails to set distance=0 required by libjxl 0.12.
  • Add option to specify primaries and transferfunction in (a)png_encode (#142).
  • Map htj2k_encode level >= 1.0 to qfactor (breaking; require OpenJPH 0.31).
  • Accept float32 input in htj2k_encode (experimental).
  • Return HTJ2K images with nonlinear transform as float32 (breaking).
  • Improve EXR error handling.
  • Update JPEGXS codec to libjxs 3.0.2-ED3.
  • Add experimental support for Pyodide (core codecs only).

Don't miss a new imagecodecs release

NewReleases is sending notifications on new releases.