|
53 | 53 | # |
54 | 54 | # The two Zarr formats resolve codecs through different registries, so they get different |
55 | 55 | # tables: a name can mean one thing as a Zarr format 3 codec name and another as a Zarr |
56 | | -# format 2 codec id. `imagecodecs_*` is exactly that -- `virtual-tiff` declares 15 of those |
57 | | -# names under `zarr.codecs`, while `imagecodecs-numcodecs` declares all 81 under |
58 | | -# `numcodecs.codecs`, so the format 2 side can use a prefix and the format 3 side cannot. |
| 56 | +# format 2 codec id. For example, `imagecodecs_*` names are registered by |
| 57 | +# `imagecodecs-zarr` and `virtual-tiff` under `zarr.codecs`, and by |
| 58 | +# `imagecodecs-numcodecs` under `numcodecs.codecs`. |
59 | 59 |
|
60 | 60 | # Zarr format 3 codec names (entry point group "zarr.codecs"). |
61 | 61 | _CODEC_PACKAGES: dict[str, tuple[str, ...]] = { |
62 | 62 | "gribberish": ("gribberish",), |
63 | | - # `virtual-tiff` declares these 15 `imagecodecs_*` names, out of the 81 that exist as |
64 | | - # numcodecs ids. They are listed exactly rather than by prefix so that the other 66 get no |
65 | | - # hint instead of a hint pointing at a package that does not provide them. |
66 | | - "imagecodecs_deflate": ("virtual-tiff",), |
67 | | - "imagecodecs_delta": ("virtual-tiff",), |
68 | | - "imagecodecs_floatpred": ("virtual-tiff",), |
| 63 | + # Verified against imagecodecs-zarr 2026.8.16's published zarr.codecs entry points: |
| 64 | + # https://pypi.org/project/imagecodecs-zarr/2026.8.16/ |
| 65 | + # virtual-tiff also provides 13 of these names, plus jpeg8 and jetraw. |
| 66 | + # Keep exact names: neither package provides every possible imagecodecs_* name. |
| 67 | + "imagecodecs_aec": ("imagecodecs-zarr",), |
| 68 | + "imagecodecs_apng": ("imagecodecs-zarr",), |
| 69 | + "imagecodecs_avif": ("imagecodecs-zarr",), |
| 70 | + "imagecodecs_b2nd": ("imagecodecs-zarr",), |
| 71 | + "imagecodecs_bfloat16": ("imagecodecs-zarr",), |
| 72 | + "imagecodecs_bitorder": ("imagecodecs-zarr",), |
| 73 | + "imagecodecs_bitshuffle": ("imagecodecs-zarr",), |
| 74 | + "imagecodecs_blosc": ("imagecodecs-zarr",), |
| 75 | + "imagecodecs_blosc2": ("imagecodecs-zarr",), |
| 76 | + "imagecodecs_bmp": ("imagecodecs-zarr",), |
| 77 | + "imagecodecs_brotli": ("imagecodecs-zarr",), |
| 78 | + "imagecodecs_byteshuffle": ("imagecodecs-zarr",), |
| 79 | + "imagecodecs_bz2": ("imagecodecs-zarr",), |
| 80 | + "imagecodecs_ccittfax3": ("imagecodecs-zarr",), |
| 81 | + "imagecodecs_ccittfax4": ("imagecodecs-zarr",), |
| 82 | + "imagecodecs_ccittrle": ("imagecodecs-zarr",), |
| 83 | + "imagecodecs_checksum": ("imagecodecs-zarr",), |
| 84 | + "imagecodecs_chunked": ("imagecodecs-zarr",), |
| 85 | + "imagecodecs_cms": ("imagecodecs-zarr",), |
| 86 | + "imagecodecs_dds": ("imagecodecs-zarr",), |
| 87 | + "imagecodecs_deflate": ("imagecodecs-zarr", "virtual-tiff"), |
| 88 | + "imagecodecs_delta": ("imagecodecs-zarr", "virtual-tiff"), |
| 89 | + "imagecodecs_dicomrle": ("imagecodecs-zarr",), |
| 90 | + "imagecodecs_eer": ("imagecodecs-zarr",), |
| 91 | + "imagecodecs_exr": ("imagecodecs-zarr",), |
| 92 | + "imagecodecs_float24": ("imagecodecs-zarr",), |
| 93 | + "imagecodecs_floatpred": ("imagecodecs-zarr", "virtual-tiff"), |
| 94 | + "imagecodecs_gif": ("imagecodecs-zarr",), |
| 95 | + "imagecodecs_hcomp": ("imagecodecs-zarr",), |
| 96 | + "imagecodecs_heif": ("imagecodecs-zarr",), |
| 97 | + "imagecodecs_htj2k": ("imagecodecs-zarr",), |
| 98 | + "imagecodecs_isal": ("imagecodecs-zarr",), |
69 | 99 | "imagecodecs_jetraw": ("virtual-tiff",), |
70 | | - "imagecodecs_jpeg": ("virtual-tiff",), |
71 | | - "imagecodecs_jpeg2k": ("virtual-tiff",), |
| 100 | + "imagecodecs_jpeg": ("imagecodecs-zarr", "virtual-tiff"), |
| 101 | + "imagecodecs_jpeg2k": ("imagecodecs-zarr", "virtual-tiff"), |
72 | 102 | "imagecodecs_jpeg8": ("virtual-tiff",), |
73 | | - "imagecodecs_jpegxl": ("virtual-tiff",), |
74 | | - "imagecodecs_jpegxr": ("virtual-tiff",), |
75 | | - "imagecodecs_lerc": ("virtual-tiff",), |
76 | | - "imagecodecs_lzw": ("virtual-tiff",), |
77 | | - "imagecodecs_packbits": ("virtual-tiff",), |
78 | | - "imagecodecs_png": ("virtual-tiff",), |
79 | | - "imagecodecs_webp": ("virtual-tiff",), |
80 | | - "imagecodecs_zstd": ("virtual-tiff",), |
| 103 | + "imagecodecs_jpegls": ("imagecodecs-zarr",), |
| 104 | + "imagecodecs_jpegxl": ("imagecodecs-zarr", "virtual-tiff"), |
| 105 | + "imagecodecs_jpegxr": ("imagecodecs-zarr", "virtual-tiff"), |
| 106 | + "imagecodecs_jpegxs": ("imagecodecs-zarr",), |
| 107 | + "imagecodecs_lerc": ("imagecodecs-zarr", "virtual-tiff"), |
| 108 | + "imagecodecs_ljpeg": ("imagecodecs-zarr",), |
| 109 | + "imagecodecs_lz4": ("imagecodecs-zarr",), |
| 110 | + "imagecodecs_lz4f": ("imagecodecs-zarr",), |
| 111 | + "imagecodecs_lz4h5": ("imagecodecs-zarr",), |
| 112 | + "imagecodecs_lzf": ("imagecodecs-zarr",), |
| 113 | + "imagecodecs_lzfse": ("imagecodecs-zarr",), |
| 114 | + "imagecodecs_lzham": ("imagecodecs-zarr",), |
| 115 | + "imagecodecs_lzma": ("imagecodecs-zarr",), |
| 116 | + "imagecodecs_lzo": ("imagecodecs-zarr",), |
| 117 | + "imagecodecs_lzw": ("imagecodecs-zarr", "virtual-tiff"), |
| 118 | + "imagecodecs_meshopt": ("imagecodecs-zarr",), |
| 119 | + "imagecodecs_openzl": ("imagecodecs-zarr",), |
| 120 | + "imagecodecs_packbits": ("imagecodecs-zarr", "virtual-tiff"), |
| 121 | + "imagecodecs_packints": ("imagecodecs-zarr",), |
| 122 | + "imagecodecs_pcodec": ("imagecodecs-zarr",), |
| 123 | + "imagecodecs_pcx": ("imagecodecs-zarr",), |
| 124 | + "imagecodecs_pglz": ("imagecodecs-zarr",), |
| 125 | + "imagecodecs_pixarlog": ("imagecodecs-zarr",), |
| 126 | + "imagecodecs_plio": ("imagecodecs-zarr",), |
| 127 | + "imagecodecs_png": ("imagecodecs-zarr", "virtual-tiff"), |
| 128 | + "imagecodecs_qoi": ("imagecodecs-zarr",), |
| 129 | + "imagecodecs_quantize": ("imagecodecs-zarr",), |
| 130 | + "imagecodecs_rcomp": ("imagecodecs-zarr",), |
| 131 | + "imagecodecs_rgbe": ("imagecodecs-zarr",), |
| 132 | + "imagecodecs_snappy": ("imagecodecs-zarr",), |
| 133 | + "imagecodecs_sperr": ("imagecodecs-zarr",), |
| 134 | + "imagecodecs_spng": ("imagecodecs-zarr",), |
| 135 | + "imagecodecs_sz3": ("imagecodecs-zarr",), |
| 136 | + "imagecodecs_szip": ("imagecodecs-zarr",), |
| 137 | + "imagecodecs_tga": ("imagecodecs-zarr",), |
| 138 | + "imagecodecs_tiff": ("imagecodecs-zarr",), |
| 139 | + "imagecodecs_ultrahdr": ("imagecodecs-zarr",), |
| 140 | + "imagecodecs_wavpack": ("imagecodecs-zarr",), |
| 141 | + "imagecodecs_webp": ("imagecodecs-zarr", "virtual-tiff"), |
| 142 | + "imagecodecs_wic": ("imagecodecs-zarr",), |
| 143 | + "imagecodecs_xor": ("imagecodecs-zarr",), |
| 144 | + "imagecodecs_zfp": ("imagecodecs-zarr",), |
| 145 | + "imagecodecs_zlib": ("imagecodecs-zarr",), |
| 146 | + "imagecodecs_zlibng": ("imagecodecs-zarr",), |
| 147 | + "imagecodecs_zopfli": ("imagecodecs-zarr",), |
| 148 | + "imagecodecs_zstd": ("imagecodecs-zarr", "virtual-tiff"), |
| 149 | + "imagecodecs_zstd1": ("imagecodecs-zarr",), |
81 | 150 | "n5_default": ("zarr-n5",), |
82 | 151 | } |
83 | 152 |
|
|
0 commit comments