| 1 | # Version 0.11.3 |
| 2 | |
| 3 | Additions: |
| 4 | - Added support for `webp` compression (as per GDAL) under the `webp` feature flag (default: off). |
| 5 | - Added `Decoder::image_ifd`, creating an `IfdDecoder` of the current IFD. |
| 6 | - Added `IfdDecoder::directory`, returning the `Directory` underlying it. |
| 7 | - Added `LowerHex` and `UpwerHex` implementations for `IfdPointer`. |
| 8 | |
| 9 | Notes: |
| 10 | - A new example `tiff-ls` demonstrates use of the new features. |
| 11 | |
| 12 | # Version 0.11.2 |
| 13 | |
| 14 | Changes: |
| 15 | - Planar files can now be read with `Decoder::read_image_to_buffer` if the |
| 16 | limits allow for such a large buffer size. Previously only the first plane |
| 17 | was read and the decoder will attempt a fallback to this behavior if the |
| 18 | limits do not allow all planes to be allocated. |
| 19 | |
| 20 | Fixes: |
| 21 | - An off-by-one error in a `debug_assert` of `ValueBuffer` caused its use in |
| 22 | `IfdDecoder::find_tag_buf` to panic outside release mode when the buffer |
| 23 | exactly matched the required size. |
| 24 | |
| 25 | Additions: |
| 26 | - The methods `ColorType::{num_samples, bit_depth}` are now public. This |
| 27 | promises that we only have homogeneous color depths in this major version. |
| 28 | |
| 29 | # Version 0.11.1 |
| 30 | |
| 31 | Fixes: |
| 32 | - The enumeration types in `tags` are now all marked with a representation of |
| 33 | their underlying TIFF type (e.g. `repr(u16)`) and variants are explicitly |
| 34 | assigned their corresponding values. That is you may _read_ the raw |
| 35 | discriminant and interpret that as the value—except for `Unknown` variants. |
| 36 | - The variants `RationalBig` and `SRationalBig` of `decoder::ifd::Value` are |
| 37 | deprecated as they have no corresponding TIFF type and were not constructed |
| 38 | during decoding. |
| 39 | |
| 40 | Additions: |
| 41 | - Types in `tags` now generally implement `TiffValue` and can be handed to the |
| 42 | `DirectoryEncoder::write_tag` method. Unlike primitive types they do _not_ |
| 43 | always implement the trait for slices of themselves. |
| 44 | - Added `tags::ValueBuffer`, a byte-based buffer for tags with a runtime value |
| 45 | type and count. |
| 46 | - Added `IfdDecoder::find_tag_{buf,bytes}` to read tag values into a |
| 47 | `ValueBuffer` or byte slice respectively without interpreting them |
| 48 | immediately within the Rust type system. |
| 49 | - Added `DirectoryEncoder::write_{data,tag}_buf` that takes a `ValueBuffer` |
| 50 | instead of a statically typed argument. |
| 51 | - Added `DirectoryEncoder::write_entry{,_buf,_bytes}` that encode their |
| 52 | argument into the file and return an `Entry` for later use, without |
| 53 | immediately adding a tag-entry pair to the directory. |
| 54 | - The `TiffValue` trait is now implemented for several builtin `tags::*` types |
| 55 | or slices of them as appropriate for their use as values of their intended |
| 56 | TIFF tag. |
| 57 | - The `TiffValue` trait is now implemented for `[T; N]` for all types that |
| 58 | implement it for slices. |
| 59 | |
| 60 | # Version 0.11.0 |
| 61 | |
| 62 | - `Directory` now implements `FromIterator<(Tag, Value)>`. |
| 63 | |
| 64 | Changes: |
| 65 | - The decoder now interprets the `ExtraSamples` tag. The sample count must now |
| 66 | more strict match the expected value with alpha channels only allowing for |
| 67 | explicitly denoted unassociated or associated alpha. This effects the |
| 68 | indicated color type when decoding images with additional samples indicated |
| 69 | as unspecified relation. Previously, these may have been interpreted as |
| 70 | alpha by the total sample count (e.g. RgbA if 4 samples under a photometric |
| 71 | interpretation of RGB). |
| 72 | - The decoder handles planar data, current limited to non-subsampled channels. |
| 73 | The `Decoder::read_image` method return planes one-after-another depending on |
| 74 | the size of the buffer that was passed. |
| 75 | - `Decoder::read_image_to_buffer` now takes `&mut DecodingResult` and resizes |
| 76 | it according to the required layout. Previously, a borrowed `DecodingBuffer` |
| 77 | was passed which can be replaced by calling `as_bytes_mut` and |
| 78 | `read_image_bytes`. |
| 79 | - Several methods of tags are now `const`. Note that does not guarantee any |
| 80 | particular value when calling these methods. |
| 81 | |
| 82 | Fixes: |
| 83 | - Fix a bug in the uncompressed encoder that could lead to short writes, i.e. |
| 84 | data silently dropped when the underlying writer did not accept all data in a |
| 85 | single write call. |
| 86 | - Encoding YCbCr data now writes the `ChromaSubsampling` tag as `(1, 1)` to |
| 87 | indicate no subsampling, instead of leaving it at its default of `(2, 2)`. |
| 88 | - The decoder will reject subsampled YCbCr data as there is no upsampling |
| 89 | routine, except for JPEG compressed images where the JPEG decoders handles |
| 90 | this. Since the buffer in that case indicates a full-sized plane for all |
| 91 | color samples any future support for the tag will upsample all planes (at |
| 92 | least within this major version). |
| 93 | |
| 94 | Additions: |
| 95 | - Added support for the `CieLab` color type. |
| 96 | - Added `DecodingResult::resize_to` to create a buffer with a matching sample |
| 97 | type and dimensions. |
| 98 | - Added `ByteOrder::native` to access the platform's native endianness. |
| 99 | - Added `ByteOrder::convert` to change the byte-order of values in a byte |
| 100 | buffer, depending on their `Type` as described at runtime. |
| 101 | - Added `DirectoryOffset::new` to encode a directory whose offset is known to |
| 102 | the caller but that has not been written through the encoder itself. |
| 103 | - Added `Encoder::extra_samples` to encode images with more samples than their |
| 104 | color's trait implementation would otherwise suggest. |
| 105 | - Added `DirectoryEncoder::extend_from` to encode multiple tag entries from a |
| 106 | directory whose values were written to the file by means outside the |
| 107 | encoder's control. |
| 108 | - Added `Decoder::read_coding_unit_bytes` to retrieve data of corresponding |
| 109 | coordinates from potentially planar data, which is encoded in multiple chunks |
| 110 | of the file. |
| 111 | |
| 112 | # Version 0.10.3 |
| 113 | |
| 114 | New features: |
| 115 | - Group 4 `fax` is now recognized as a compression type and decoded. |
| 116 | - A crate feature `fax` controls related dependencies, on by default. |
| 117 | |
| 118 | Changes: |
| 119 | - The presence of PhotometricInterpretation::WhiteIsZero now returns an error |
| 120 | if the color type can not be inverted by the library where they were |
| 121 | previously silently ignored. Please report any missing color types. |
| 122 | |
| 123 | Fixes: |
| 124 | - The PhotometricInterpretation::WhiteIsZero is now also applied to 1-bit |
| 125 | images, as well as 2-bit and 4-bit sample types where previously the presence |
| 126 | of this tag was ignored. |
| 127 | |
| 128 | # Version 0.10.2 |
| 129 | |
| 130 | Republished 0.10.1, fixing an accidentally removed method (`Decoder::find_tag_unsigned_vec`). |
| 131 | |
| 132 | # Version 0.10.1 |
| 133 | |
| 134 | New features: |
| 135 | - Added a dedicated `Directory` type (#277) |
| 136 | - Expose methods related to `Directory` publicly (#278) |
| 137 | - Implement writing directories (#281, #283) |
| 138 | - Add ICC (color profile) to the set of known tags (#287) |
| 139 | - Added `Decoder.inner()` to access the underlying reader (#289) |
| 140 | - Added methods for reading into a pre-allocated byte buffer (#285) |
| 141 | |
| 142 | Changes: |
| 143 | - No longer perform color conversion when decoding embedded JPEG. This fixes decoding for JPEG images with alpha channel. (#274) |
| 144 | - More lenient LZW decoding to match libtiff (#231) |
| 145 | |
| 146 | Fixes: |
| 147 | - Fixed seeking multiple times in a row (#279) |
| 148 | |
| 149 | # Version 0.10.0 |
| 150 | |
| 151 | New features: |
| 152 | - Added `ColorType::Multiband` and `ColorType::CMYKA`. |
| 153 | - Added `Value::Byte` and `Value::SignedByte` to represent `u8` and `i8` tags. |
| 154 | - Encoding can now use horizontal predictor. |
| 155 | - The `Decoder::tag_iter` method allows iterating over all tags in the image. |
| 156 | - Half precision floating point values are now supported during decoding. |
| 157 | - ZStandard compression has been added as an additional compression method |
| 158 | during decoding, but requires the `zstd` feature flag. |
| 159 | |
| 160 | Changes: |
| 161 | - Switched `u16` and `i16` values to be intepreted as `Value::Short` and |
| 162 | `Value::SignedShort` respectively. |
| 163 | - Changed JPEG compression to use the `zune-jpeg` crate instead of |
| 164 | `jpeg-decoder`. |
| 165 | - The `deflate`, `jpeg`, and `lzw` compression methods are now controlled by |
| 166 | (enabled by default) feature flags. |
| 167 | |
| 168 | Fixes: |
| 169 | - Fixed a bug in 1 bit-per-pixel decoding. |
| 170 | |
| 171 | # Version 0.9.1 |
| 172 | |
| 173 | New features: |
| 174 | - Basic support for planar configuration. |
| 175 | - Allow arbitrary number of samples as long as all have the same bit depth. |
| 176 | |
| 177 | Fixes: |
| 178 | - Don't panic when parsing metadata when custom compression is used. |
| 179 | |
| 180 | # Version 0.9.0 |
| 181 | |
| 182 | New features: |
| 183 | * Added support for photometric interpretation `YCbCr` and added related |
| 184 | `ColorType`. |
| 185 | |
| 186 | Fixes: |
| 187 | * Decoding tiled images calculates padding correctly when image width or height |
| 188 | is a multiple of tile size. It could previously corrupt the last tile per row |
| 189 | by skipping over data. |
| 190 | |
| 191 | # Version 0.8.1 |
| 192 | |
| 193 | Changes: |
| 194 | * The jpeg decoder gained to ability to utilize the Photometric Interpretation |
| 195 | directly instead of relying on a custom APP segment. |
| 196 | |
| 197 | Fixes: |
| 198 | * A spurious error within the PackBits decoder lead to the incorrect results |
| 199 | (wrong bits or errors), based on the maximum size of reads from the |
| 200 | underlying reader. |
| 201 | * Removed a panic path in jpeg decoding, when a feature such as photometric |
| 202 | interpretation is not supported. An error is returned instead. |
| 203 | |
| 204 | # Version 0.8.0 |
| 205 | |
| 206 | Changes: |
| 207 | * The minimum supported rust version is now indicated in `Cargo.toml`. |
| 208 | * The enums `TiffFormatError` and `TiffUnsupportedError` are now |
| 209 | marked with the `#[non_exhaustive]` attribute. |
| 210 | * Additionally, tag related enums `Value`, `Tags`, `Type`, `CompressionMethod`, |
| 211 | `PhotometricInterpretation`, `PlanarConfiguration`, `Predictor`, |
| 212 | `ResolutionUnit`, `SampleFormat` are also changed. |
| 213 | |
| 214 | Removals: |
| 215 | * Removed deprecated methods of `Decoder`: `init`, `read_jpeg`, |
| 216 | `read_strip_to_buffer`, `read_strip`, `read_tile`. The implicit chunk (row or |
| 217 | tile) index order could not be easily tracked by the caller. New separate |
| 218 | utility interfaces may be introduced at a later point, for now callers are |
| 219 | obligated to choose their own. |
| 220 | |
| 221 | Fixes: |
| 222 | * Update to `jpeg_decoder = 0.3`. |
| 223 | |
| 224 | # Version 0.7.4 |
| 225 | |
| 226 | New features: |
| 227 | * Creating an encoder for invalid, zero-sized images is now rejected. |
| 228 | |
| 229 | Fixes: |
| 230 | * Fix panic, in a case where decoding jpeg encoded images did not expect the |
| 231 | jpeg decoder to return an error. |
| 232 | * Fix panic by validating `rows_per_strip` better, fixing a division-by-zero. |
| 233 | |
| 234 | # Version 0.7.3 |
| 235 | |
| 236 | New features: |
| 237 | * Allow decoder to access specific tiles by index. |
| 238 | * Add support for floating point predictor. |
| 239 | * Tiled jpeg file support. |
| 240 | |
| 241 | Changes: |
| 242 | * Various refactoring and performance improvements. |
| 243 | |
| 244 | # Version 0.7.2 |
| 245 | |
| 246 | New features: |
| 247 | * Encoding with `ImageEncoder` now takes an optional compressor argument, |
| 248 | allowing compressed encoding. See the methods |
| 249 | `TiffEncoder::{new_image,write_image}_with_compression`. |
| 250 | * `jpeg_decoder` has been upgraded, now supports lossless JPEG. |
| 251 | |
| 252 | Changes: |
| 253 | * Decoding now more consistently reads and interprets the initial IFD, instead |
| 254 | of performing _some_ interpretation lazily. (This change prepares fully lazy |
| 255 | and backwards seeking.) |
| 256 | |
| 257 | # Version 0.7.1 |
| 258 | |
| 259 | New features: |
| 260 | * Encoding signed integer formats is now supported. |
| 261 | * Extensive fuzzing with `cargo fuzz`. |
| 262 | |
| 263 | Changes: |
| 264 | * Tile decoding should be a little faster, requires one less intermediate buffer. |
| 265 | * Images whose IFDs form a cycle due to their offsets will now raise an error |
| 266 | when the cycle would be entered (jumping back should still be supported). |
| 267 | |
| 268 | Fixes: |
| 269 | * Fixed a regression that caused conflict between strips and tile images, |
| 270 | causing errors in decoding some images. |
| 271 | * Use checked integer arithmetic in limit calculations, fixes overflows. |
| 272 | * IFD Tags are now always cleared between images. |
| 273 | * Found by fuzzing: Several memory limit overflows; JPEG now correctly |
| 274 | validates offsets and a minimum size of its table; Check upper limit of strip |
| 275 | byte size correctly; |
| 276 | |
| 277 | Notes: |
| 278 | Our CI has warned that this version no longer builds on `1.34.2` out of the |
| 279 | box. We're still committed to the MSRV on this major version yet one |
| 280 | dependency—`flate2`—has already bumped it in a SemVer compatible version of its |
| 281 | own. This is out-of-our-control (cargo's dependency resolution does not allow |
| 282 | us to address this in a reasonable manner). |
| 283 | |
| 284 | This can be address this by pinning the version of `flate2` to `1.0.21` in your |
| 285 | own files. However, you should understand that this puts you in considerable |
| 286 | maintenance debt as you will no longer receive any updates for this dependency |
| 287 | and any package that _requires_ a new version of the `1.0` series would be |
| 288 | incompatible with this requirement (cargo might yell at you very loudly). |
| 289 | |
| 290 | # Version 0.7.0 |
| 291 | |
| 292 | New features: |
| 293 | * Support for encoding BigTiff ([#122](https://github.com/image-rs/image-tiff/pull/122)) |
| 294 | * _Breaking:_ Encoder types now have a generic parameter to differentiate BigTiff and standard Tiff encoding. Defaults to standard Tiff. |
| 295 | * Basic tile decoding ([#125](https://github.com/image-rs/image-tiff/pull/125)) |
| 296 | * _Breaking:_ There is a new `TiffError::UsageError` variant. |
| 297 | * Support for datatypes `Int8` and `Int16` ([#114](https://github.com/image-rs/image-tiff/pull/114)) |
| 298 | * _Breaking:_ `DecodingResult` and `DecodingBuffer` have the two new variants `I8` and `I16`. |
| 299 | * Support for `i32` arrays ([#118](https://github.com/image-rs/image-tiff/pull/118/files)) |
| 300 | * _Breaking:_ `DecodingResult` and `DecodingBuffer` have a new `I32` variant. |
| 301 | * Support for `Ifd` and `IfdBig` tag types and `I64` data type ([#119](https://github.com/image-rs/image-tiff/pull/119)) |
| 302 | * _Breaking:_ `DecodingResult` and `DecodingBuffer` have a new `I64` variant. |
| 303 | * Add `SMinSampleValue` and `SMaxSampleValue` ([#123](https://github.com/image-rs/image-tiff/pull/123)) |
| 304 | |
| 305 | Changes: |
| 306 | * Improve deflate support ([#132](https://github.com/image-rs/image-tiff/pull/132)) |
| 307 | * Switch to streaming decompression via `flate2`. Aside from performance improvements and lower RAM consumption, this fixes a bug where `max_uncompressed_length` was precalculated for a single tile but then used as a hard limit on the whole data, failing to decompress any tiled images. |
| 308 | * Add support for new `Deflate` tag in addition to `OldDeflate`. |
| 309 | * _Breaking:_ Remove `InflateError`, which is no longer needed with `flate2` ([#134](https://github.com/image-rs/image-tiff/pull/134)) |
| 310 | * _Breaking:_ Support for `MinIsWhite` is restricted to unsigned and floating |
| 311 | point values. This is expected to be be re-added once some contradictory |
| 312 | interpretation regarding semantics for signed values is resolved. |
| 313 | |
| 314 | Fixes: |
| 315 | * Validate that ASCII tags are valid ASCII and end with a null byte ([#121](https://github.com/image-rs/image-tiff/pull/121)) |
| 316 | |
| 317 | Internal: |
| 318 | * Simplify decompression logic ([#126](https://github.com/image-rs/image-tiff/pull/126)) |
| 319 | * Simplify `expand_strip` ([#128](https://github.com/image-rs/image-tiff/pull/128)) |
| 320 | |
| 321 | # Version 0.6.1 |
| 322 | |
| 323 | New features: |
| 324 | * Support for reading `u16` and ascii string tags. |
| 325 | * Added `Limits::unlimited` for disabling all limits. |
| 326 | * Added `ImageEncoder::rows_per_strip` to overwrite the default. |
| 327 | |
| 328 | Changes: |
| 329 | * The default strip size for chunked encoding is now 1MB, up from 8KB. This |
| 330 | should lead to more efficient decoding and compression. |
| 331 | |
| 332 | Fixes: |
| 333 | * Fixed a bug where LZW compressed strips could not be decoded, instead |
| 334 | returning an error `Inconsistent sizes encountered`. |
| 335 | * Reading a tag with a complex type and a single value returns the proper Value |
| 336 | variant, instead of a vector with one entry. |
| 337 | |
| 338 | # Version 0.6.0 |
| 339 | |
| 340 | New features: |
| 341 | * Support for decoding BigTIFF with 64-bit offsets |
| 342 | * The value types byte, `f32`, `f64` are now recognized |
| 343 | * Support for Modern JPEG encoded images |
| 344 | |
| 345 | Improvements: |
| 346 | * Better support for adding auxiliary tags before encoding image data |
| 347 | * Switched to lzw decoder library `weezl` for performance |
| 348 | * The `ColorType` trait now supports `SAMPLE_ENCODING` hints |
| 349 | |
| 350 | Fixes: |
| 351 | * Fixed decoding of inline ASCII in tags |
| 352 | * Fixed handling after null terminator in ASCII data |
| 353 | * Recognize tile and sample format tags |
| 354 | |
| 355 | # Version 0.5.0 |
| 356 | |
| 357 | * Added support for 32-bit and 64-bit decoded values. |
| 358 | * Added CMYK(16|32|64) color type support. |
| 359 | * Check many internal integer conversions to increase stability. This should |
| 360 | only lead to images being reported as faulty that would previously silently |
| 361 | break platform limits. If there are any false positives, please report them. |
| 362 | * Remove an erroneous check of decoded length in lzw compressed images. |
| 363 | |
| 364 | # Version 0.4.0 |
| 365 | |
| 366 | * Several enumerations are now non_exhaustive for future extensions. |
| 367 | These are `Tag`, `Type`, `Value`, `PhotometricInterpretation`, |
| 368 | `CompressionMethod`, `Predictor`. |
| 369 | * Enums gained a dedicated method to convert to their TIFF variant value with |
| 370 | the specified type. Performing these conversions by casting the discriminant |
| 371 | with `as` is not guaranteed to be stable, except where documented explicitly. |
| 372 | * Removed the num-derive and num dependencies. |
| 373 | * Added support for decoding `deflate` compressed images. |
| 374 | * Make the decoder `Limits` customizable by exposing members. |
| 375 | * Fixed multi-page TIFF encoding writing incorrect offsets. |