| 1 |
## 0.18.0 |
| 2 |
|
| 3 |
### API Breaking Changes |
| 4 |
|
| 5 |
* Removed deprecated `Info::encode` and `Encoder::set_srgb` methods. |
| 6 |
* Improved the compression settings API for encoding. |
| 7 |
* `Decoder` now requires a reader that implements `Seek` and `BufRead` traits. |
| 8 |
* Bump bitflags dependency to 2.0. |
| 9 |
* `StreamingDecoder::update` now takes a structured `UnfilterBuf` argument |
| 10 |
instead of a direct reference to a vector. This allows in-place |
| 11 |
decompression. There is a public constructor for `UnfilterBuf`. |
| 12 |
* The methods `Decoder::output_buffer_size` and `output_line_size` now return |
| 13 |
`Option<usize>` to reflect that these calculations no longer overflow on some |
| 14 |
targets where the required buffers can not be represented in the address |
| 15 |
space. They return the mathematically correct size where possible. |
| 16 |
* The `Decoded` enum returned from `StreamingDecoder::update` was simplified to |
| 17 |
no longer contains any chunk payload data. Instead, it now contains only |
| 18 |
chunk events where every chunk that was started will eventually be ended by |
| 19 |
`ChunkComplete`, `BadAncillaryChunk` or `SkippedAncillaryChunk`. |
| 20 |
* Ancillary chunks, i.e. those not critical to decoder interpretation of the |
| 21 |
file, which fail to parse are now terminated with a `BadAncillaryChunk` event |
| 22 |
but no longer returned a `DecodingError`. This includes text chunks as well |
| 23 |
as many metadata chunks (except for `fcTL` that we deem crucial to the |
| 24 |
parser's understanding of the image sequence in an APNG despite being |
| 25 |
technically ancillary). |
| 26 |
|
| 27 |
### Additions |
| 28 |
|
| 29 |
* Added `Reader::read_row` method. |
| 30 |
* Add support for parsing eXIf chunk. |
| 31 |
* Treat most auxiliary chunk errors as benign. |
| 32 |
* Added `splat_interlaced_row`, which implements an alternative method for |
| 33 |
merging Adam7 interlaced lines into the output buffer that is more suitable |
| 34 |
for the presentation of progressive states of the buffer. |
| 35 |
* Added `Adam7Variant` documenting the various methods for applying interlaced |
| 36 |
rows and to prepare an API to progressively read frames through `Decoder`. |
| 37 |
|
| 38 |
### Changes |
| 39 |
|
| 40 |
* The decoding of Adam7 interlaced data is now much faster. |
| 41 |
* The `acTL` chunk is now ignored when it is invalid, instead of producing |
| 42 |
errors while reading or decoding the following APNG chunks. |
| 43 |
* The requirement of the `fcTL` chunk for the default image to match the IHDR's |
| 44 |
indicate image size is now enforced. |
| 45 |
* More minor format errors in auxiliary chunks are now ignored by the decoder, |
| 46 |
instead disregarding the malformed chunk. |
| 47 |
* Adam7 Interlacing on 32-bit targets now handles some cases correctly that |
| 48 |
previously wrote some bytes to the wrong pixel indices due to overflows. |
| 49 |
|
| 50 |
## 0.17.16 |
| 51 |
|
| 52 |
* Make gAMA and cHRM fallback optional for sRGB ([#547]) |
| 53 |
* Pass through nightly feature to crc32fast crate to get SIMD crc32 on Aarch64 ([#545]) |
| 54 |
* Fix bug in iCCP chunk encoding ([#458]) |
| 55 |
* Deprecate Info::encode ([#550]) |
| 56 |
|
| 57 |
[#545]: https://github.com/image-rs/image-png/pull/545 |
| 58 |
[#458]: https://github.com/image-rs/image-png/pull/548 |
| 59 |
[#550]: https://github.com/image-rs/image-png/pull/550 |
| 60 |
[#547]: https://github.com/image-rs/image-png/pull/547 |
| 61 |
|
| 62 |
## 0.17.15 |
| 63 |
|
| 64 |
### Added |
| 65 |
|
| 66 |
* Add a public API to advance to the next frame in APNG decoder ([#518]) |
| 67 |
* Add APIs to write ICC and EXIF chunks ([#526]) |
| 68 |
* Add support for parsing the sBIT chunk ([#524]) |
| 69 |
* Add support for parsing the bKGD chunk ([#538]) |
| 70 |
* Add support for parsing the cICP chunk ([#529]) |
| 71 |
* Add support for parsing mDCV and cLLI chunks ([#528], ([#543])) |
| 72 |
|
| 73 |
### Changed |
| 74 |
|
| 75 |
* Improve performance of Paeth filter during decoding ([#512], [#539]) |
| 76 |
|
| 77 |
### Fixed |
| 78 |
|
| 79 |
* Avoid an infinite loop when retrying after a fatal error using `StreamingDecoder` ([#520]) |
| 80 |
* Fixed chunk order in encoded files ([#526]) |
| 81 |
|
| 82 |
[#495]: https://github.com/image-rs/image-png/pull/495 |
| 83 |
[#496]: https://github.com/image-rs/image-png/pull/496 |
| 84 |
[#512]: https://github.com/image-rs/image-png/pull/512 |
| 85 |
[#518]: https://github.com/image-rs/image-png/pull/518 |
| 86 |
[#520]: https://github.com/image-rs/image-png/pull/520 |
| 87 |
[#524]: https://github.com/image-rs/image-png/pull/524 |
| 88 |
[#526]: https://github.com/image-rs/image-png/pull/526 |
| 89 |
[#528]: https://github.com/image-rs/image-png/pull/528 |
| 90 |
[#529]: https://github.com/image-rs/image-png/pull/529 |
| 91 |
[#538]: https://github.com/image-rs/image-png/pull/538 |
| 92 |
[#539]: https://github.com/image-rs/image-png/pull/539 |
| 93 |
[#543]: https://github.com/image-rs/image-png/pull/543 |
| 94 |
|
| 95 |
## 0.17.14 |
| 96 |
|
| 97 |
* Updated to miniz_oxide 0.8.0. |
| 98 |
* Added public API to consume interlaced rows one by one ([#495]) |
| 99 |
* Improved support for resuming decoding after an `UnexpectedEof`, which lets you start parsing a file before it's fully received over the network ([#496]) |
| 100 |
* Fixed some broken links in documentation, improved some documentation comments |
| 101 |
|
| 102 |
[#495]: https://github.com/image-rs/image-png/pull/495 |
| 103 |
[#496]: https://github.com/image-rs/image-png/pull/496 |
| 104 |
|
| 105 |
|
| 106 |
## 0.17.13 |
| 107 |
|
| 108 |
* Fix `Send` bound on `Reader`. |
| 109 |
|
| 110 |
## 0.17.12 |
| 111 |
|
| 112 |
* Reject zero-sized frames. |
| 113 |
* Optimized decoding of paletted images. |
| 114 |
* Removed remaining uses of miniz_oxide for decoding. |
| 115 |
* Correct lifetime used for `Info` struct. |
| 116 |
* Fix build issue with `-Z minimal-versions`. |
| 117 |
|
| 118 |
## 0.17.11 |
| 119 |
|
| 120 |
* Ignore subsequent iCCP chunks to match libpng behavior. |
| 121 |
* Added an option to ignore ancillary chunks with invalid CRC. |
| 122 |
* Added `new_with_info` constructor for encoder. |
| 123 |
* Removed hard-coded memory limits. |
| 124 |
* No longer allow zero sized images. |
| 125 |
* Added `Reader::finish` to read all the auxiliary chunks that comes after the |
| 126 |
image. |
| 127 |
|
| 128 |
## 0.17.10 |
| 129 |
|
| 130 |
* Added Transformations::ALPHA |
| 131 |
* Enable encoding pixel dimensions |
| 132 |
|
| 133 |
## 0.17.9 |
| 134 |
|
| 135 |
* Fixed a bug in ICC profile decompression. |
| 136 |
* Improved unfilter performance. |
| 137 |
|
| 138 |
## 0.17.8 |
| 139 |
|
| 140 |
* Increased MSRV to 1.57.0. |
| 141 |
* Substantially optimized encoding and decoding: |
| 142 |
- Autovectorize filtering and unfiltering. |
| 143 |
- Make the "fast" compression preset use fdeflate. |
| 144 |
- Switch decompression to always use fdeflate. |
| 145 |
- Updated to miniz_oxide 0.7. |
| 146 |
- Added an option to ignore checksums. |
| 147 |
* Added corpus-bench example which measures the compression ratio and time to |
| 148 |
re-encode and subsequently decode a corpus of images. |
| 149 |
* More fuzz testing. |
| 150 |
|
| 151 |
## 0.17.7 |
| 152 |
|
| 153 |
* Fixed handling broken tRNS chunk. |
| 154 |
* Updated to miniz_oxide 0.6. |
| 155 |
|
| 156 |
## 0.17.6 |
| 157 |
|
| 158 |
* Added `Decoder::read_header_info` to query the information contained in the |
| 159 |
PNG header. |
| 160 |
* Switched to using the flate2 crate for encoding. |
| 161 |
|
| 162 |
## 0.17.5 |
| 163 |
|
| 164 |
* Fixed a regression, introduced by chunk validation, that made the decoder |
| 165 |
sensitive to the order of `gAMA`, `cHRM`, and `sRGB` chunks. |
| 166 |
|
| 167 |
## 0.17.4 |
| 168 |
|
| 169 |
* Added `{Decoder,StreamDecoder}::set_ignore_text_chunk` to disable decoding of |
| 170 |
ancillary text chunks during the decoding process (chunks decoded by default). |
| 171 |
* Added duplicate chunk checks. The decoder now enforces that standard chunks |
| 172 |
such as palette, gamma, … occur at most once as specified. |
| 173 |
* Added `#[forbid(unsafe_code)]` again. This may come at a minor performance |
| 174 |
cost when decoding ASCII text for now. |
| 175 |
* Fixed a bug where decoding of large chunks (>32kB) failed to produce the |
| 176 |
correct result, or fail the image decoding. As new chunk types are decoded |
| 177 |
this introduced regressions relative to previous versions. |
| 178 |
|
| 179 |
## 0.17.3 |
| 180 |
|
| 181 |
* Fixed a bug where `Writer::finish` would not drop the underlying writer. This |
| 182 |
would fail to flush and leak memory when using a buffered file writers. |
| 183 |
* Calling `Writer::finish` will now eagerly flush the underlying writer, |
| 184 |
returning any error that this operation may result in. |
| 185 |
* Errors in inflate are now diagnosed with more details. |
| 186 |
* The color and depth combination is now checked in stream decoder. |
| 187 |
|
| 188 |
## 0.17.2 |
| 189 |
|
| 190 |
* Added support for encoding and decoding tEXt/zTXt/iTXt chunks. |
| 191 |
* Added `Encoder::validate_sequence` to enable validation of the written frame |
| 192 |
sequence, that is, if the number of written images is consistent with the |
| 193 |
animation state. |
| 194 |
* Validation is now off by default. The basis of the new validation had been |
| 195 |
introduced in 0.17 but this fixes some cases where this validation was too |
| 196 |
aggressive compared to previous versions. |
| 197 |
* Added `Writer::finish` to fully check the write of the end of an image |
| 198 |
instead of silently ignoring potential errors in `Drop`. |
| 199 |
* The `Writer::write_chunk` method now validates that the computed chunk length |
| 200 |
does not overflow the limit set by PNG. |
| 201 |
* Fix an issue where the library would panic or even abort the process when |
| 202 |
`flush` or `write` of an underlying writer panicked, or in some other uses of |
| 203 |
`StreamWriter`. |
| 204 |
|
| 205 |
## 0.17.1 |
| 206 |
|
| 207 |
* Fix panic in adaptive filter method `sum_buffer` |
| 208 |
|
| 209 |
## 0.17.0 |
| 210 |
|
| 211 |
* Increased MSRV to 1.46.0 |
| 212 |
* Rework output info usage |
| 213 |
* Implement APNG encoding |
| 214 |
* Improve ergonomics of encoder set_palette and set_trns methods |
| 215 |
* Make Info struct non-exhaustive |
| 216 |
* Make encoder a core feature |
| 217 |
* Default Transformations to Identity |
| 218 |
* Add Adaptive filtering method for encoding |
| 219 |
* Fix SCREAM_CASE on ColorType variants |
| 220 |
* Forbid unsafe code |
| 221 |
|
| 222 |
## 0.16.7 |
| 223 |
|
| 224 |
* Added `Encoder::set_trns` to register a transparency table to be written. |
| 225 |
|
| 226 |
## 0.16.6 |
| 227 |
|
| 228 |
* Fixed silent integer overflows in buffer size calculation, resulting in |
| 229 |
panics from assertions and out-of-bounds accesses when actually decoding. |
| 230 |
This improves the stability of 32-bit and 16-bit targets and make decoding |
| 231 |
run as stable as on 64-bit. |
| 232 |
* Reject invalid color/depth combinations. Some would lead to mismatched output |
| 233 |
buffer size and panics during decoding. |
| 234 |
* Add `Clone` impl for `Info` struct. |
| 235 |
|
| 236 |
## 0.16.5 |
| 237 |
|
| 238 |
* Decoding of APNG subframes is now officially supported and specified. Note |
| 239 |
that dispose ops and positioning in the image need to be done by the caller. |
| 240 |
* Added encoding of indexed data. |
| 241 |
* Switched to `miniz_oxide` for decompressing image data, with 30%-50% speedup |
| 242 |
in common cases and up to 200% in special ones. |
| 243 |
* Fix accepting images only with consecutive IDAT chunks, rules out data loss. |
| 244 |
|
| 245 |
## 0.16.4 |
| 246 |
|
| 247 |
* The fdAT frames are no longer inspected when the main image is read. This |
| 248 |
would previously be the case for non-interlaced images. This would lead to |
| 249 |
incorrect failure and, e.g. an error of the form `"invalid filter method"`. |
| 250 |
* Fix always validating the last IDAT-chunks checksum, was sometimes ignored. |
| 251 |
* Prevent encoding color/bit-depth combinations forbidden by the specification. |
| 252 |
* The fixes for APNG/fdAT enable further implementation. The _next_ release is |
| 253 |
expected to officially support APNG. |
| 254 |
|
| 255 |
## 0.16.3 |
| 256 |
|
| 257 |
* Fix encoding with filtering methods Up, Avg, Paeth |
| 258 |
* Optimize decoding throughput by up to +30% |
| 259 |
|
| 260 |
## 0.16.2 |
| 261 |
|
| 262 |
* Added method constructing an owned stream encoder. |
| 263 |
|
| 264 |
## 0.16.1 |
| 265 |
|
| 266 |
* Addressed files bloating the packed crate |
| 267 |
|
| 268 |
## 0.16.0 |
| 269 |
|
| 270 |
* Fix a bug compressing images with deflate |
| 271 |
* Address use of deprecated error interfaces |
| 272 |
|
| 273 |
## 0.15.3 |
| 274 |
|
| 275 |
* Fix panic while trying to encode empty images. Such images are no longer |
| 276 |
accepted and error when calling `write_header` before any data has been |
| 277 |
written. The specification does not permit empty images. |
| 278 |
|
| 279 |
## 0.15.2 |
| 280 |
|
| 281 |
* Fix `EXPAND` transformation to leave bit depths above 8 unchanged |
| 282 |
|
| 283 |
## 0.15.1 |
| 284 |
|
| 285 |
* Fix encoding writing invalid chunks. Images written can be corrected: see |
| 286 |
https://github.com/image-rs/image/issues/1074 for a recovery. |
| 287 |
* Fix a panic in bit unpacking with checked arithmetic (e.g. in debug builds) |
| 288 |
* Added better fuzzer integration |
| 289 |
* Update `term`, `rand` dev-dependency |
| 290 |
* Note: The `show` example program requires a newer compiler than 1.34.2 on |
| 291 |
some targets due to depending on `glium`. This is not considered a breaking |
| 292 |
bug. |
| 293 |
|
| 294 |
## 0.15 |
| 295 |
|
| 296 |
Begin of changelog |