Repository navigation
Commit bcd208e
add jpeg codec and testcases (#81)
* add jpeg codec and testcases
* adjusted jpeg implementation
* fix JpegCodec constructor subsampling type
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* make jpeg codec configuration match the spec
quality, subsampling and the configuration itself are now required instead
of being silently defaulted (a missing quality used to become 0). The
written zarr.json always contains every required parameter, and grayscale
data accepts the spec-mandated subsampling [[1, 1]].
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* align jpeg codec with latest zarr-extensions spec
encoded_color_space is now always required (including "grayscale") and
fixes the component count, so configurations are fully validated at
parse time. Adds the optional decoded_color_space (incl. the ycbcr ->
ycbcr passthrough), only written when it differs from the default.
Default quality is 95 as recommended by the spec.
The "rgb" encoding no longer writes a JFIF marker next to the Adobe
marker: libjpeg (and thus Pillow) treats any 3-component JFIF stream as
YCbCr, so zarr-ext-jpeg decoded these chunks with wrong colors. The
decoder now follows libjpeg's marker precedence as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* jpeg: make subsampling optional for rgb/grayscale and restrict quality to 1-100
Follows the final zarr-extensions jpeg spec (zarr-developers/zarr-extensions#66):
subsampling is only required for encoded_color_space ycbcr, defaults to no
subsampling otherwise and is omitted from the metadata in that case; quality
must be between 1 and 100.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Trigger CI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Norman Rzepka <code@normanrz.com>1 parent c0a5168 commit bcd208e
4 files changed
Lines changed: 1181 additions & 0 deletions
File tree
- src
- main/java/dev/zarr/zarrjava/v3/codec
- core
- test/java/dev/zarr/zarrjava/codec
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
142 | 184 | | |
143 | 185 | | |
144 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments