| 1 | # Release Notes |
| 2 | |
| 3 | ## Known issues |
| 4 | - Many decoders will panic on malicious input. |
| 5 | - The color space information of pixels is not clearly communicated. |
| 6 | |
| 7 | ## Changes |
| 8 | |
| 9 | ### Version 0.25.10 |
| 10 | |
| 11 | Features: |
| 12 | - Added `GenericImage::copy_from_samples` that can be implemented for images |
| 13 | that can be efficiently filled from a matrix-layout of samples. Its default |
| 14 | implementation will *not* defer to `copy_from`, consider implementing this if |
| 15 | you specialized the latter. |
| 16 | - Added `GenericImageView::to_pixel_view` that can be implemented to describe |
| 17 | the buffer in terms our `FlatSamples` matrix layout, if applicable. This |
| 18 | allows algorithms over generic images to run a specialized version where they |
| 19 | can be more efficient over an raw input slice. |
| 20 | - Added `ImageBuffer::from_raw_bgr{,a}` to efficiently byte-swap images into |
| 21 | the RGBA layout of the buffer (#2596). |
| 22 | - Added `ExtendedColorType::Rgb5x1` to represent 5-bit colors as from TGA (#2609). |
| 23 | - Added `metadata::LoopCount` and `AnimationDecoder::loop_count` to query if |
| 24 | animations should repeat in a uniform manner (gif, webp, avif) (#2719, #2786). |
| 25 | - `load_from_memory` now utilizes format detection hooks if any are applicable. |
| 26 | |
| 27 | Structural changes: |
| 28 | - Various changes that reduce the compile time of `image` on codegen by |
| 29 | reducing the number of monomorphizations (#2804, #2800, #2807). |
| 30 | - `GenericImage::copy_from`'s default implementation tries `copy_from_samples` |
| 31 | first if the source can be successfully cast with `to_pixel_view`. |
| 32 | - `<ImageBuffer as GenericImage>::copy_from` is now must faster for |
| 33 | `ImageBuffer` when the source implements `GenericImageView::to_pixel_view`. |
| 34 | - `<SubImage<_> as GenericImage>::copy_from` inherits the previously mentioned |
| 35 | optimizations for pixel sources when the inner type provides them. It also |
| 36 | provides `to_pixel_view` based on the inner type. |
| 37 | - `ImageBuffer::as_flat_samples` no longer requires `AsRef<[P::Subpixel]>` for |
| 38 | the underlying container, just `Deref` (#2777). |
| 39 | |
| 40 | Bug fixes: |
| 41 | - Fixed a panic in TGA where indices have more bits than mapped colors (#2673). |
| 42 | |
| 43 | Notable decoder changes: |
| 44 | - Bump `tiff` to `0.11`, supporting planar layout images (#2743). |
| 45 | - ICC profiles can now be written for TIFF files (#2746) |
| 46 | - Update `ravif` to `0.13`, supporting EXIF (#2733). |
| 47 | - Update `jpeg-encoder` to `0.7` bringing SIMD acceleration (#2736). |
| 48 | - The `pnm` decoder decodes binary data quicker with fewer allocations (#2797). |
| 49 | - The `tga` decoder handles 5-bit data and colormaps correctly (#2608, #2609). |
| 50 | |
| 51 | Compatibility notes (new section): |
| 52 | - Bump rust-version to `1.88`. |
| 53 | - Registered hooks now normalize the file extension they are registered against |
| 54 | to ascii-lowercase. It is no longer necessary to register all such variants. |
| 55 | This may conflate two hooks that previously hooked the same format with |
| 56 | different casing. |
| 57 | |
| 58 | ### Version 0.25.9 |
| 59 | |
| 60 | Features: |
| 61 | - Support extracting XMP metadata from PNG, JPEG, GIF, WebP and TIFF files (#2567, #2634, #2644) |
| 62 | - Support reading IPTC metadata from PNG and JPG files (#2611) |
| 63 | - Support reading ICC profile from GIF files (#2644) |
| 64 | - Allow setting a specific DEFLATE compression level when writing PNG (#2583) |
| 65 | - Initial support for 16-bit CMYK TIFF files (#2588) |
| 66 | - Allow extracting the alpha channel of a `Pixel` in a generic way (#2638) |
| 67 | |
| 68 | Structural changes: |
| 69 | - EXR format decoding now only uses multi-threading via Rayon when the `rayon` feature is enabled (#2643) |
| 70 | - Upgraded zune-jpeg to 0.5.x, ravif to 0.12.x, gif to 0.14.x |
| 71 | - pnm: parse integers in PBM/PGM/PPM headers without allocations (#2620) |
| 72 | - Replace `doc_auto_cfg` with `doc_cfg` (#2637) |
| 73 | |
| 74 | Bug fixes: |
| 75 | - Do not encode empty JPEG images (#2624) |
| 76 | - tga: reject empty images (#2614) |
| 77 | - tga: fix orientation flip for color mapped images (#2607) |
| 78 | - tga: adjust colormap lookup to match tga 2.0 spec (#2608) |
| 79 | |
| 80 | ### Version 0.25.8 |
| 81 | |
| 82 | Re-release of `0.25.7` |
| 83 | |
| 84 | Fixes: |
| 85 | - Reverted a signature change to `load_from_memory` that lead to large scale |
| 86 | type inference breakage despite being technically compatible. |
| 87 | - Color conversion Luma to Rgb used incorrect coefficients instead of broadcasting. |
| 88 | |
| 89 | ### Version 0.25.7 (yanked) |
| 90 | |
| 91 | Features: |
| 92 | - Added an API for external image format implementations to register themselves as decoders for a specific format in `image` (#2372) |
| 93 | - Added [CICP](https://www.color.org/iccmax/download/CICP_tag_and_type_amendment.pdf) awarenes via [moxcms](https://crates.io/crates/moxcms) to support color spaces (#2531). The support for transforming is limited for now and will be gradually expanded. |
| 94 | - You can now embed Exif metadata when writing JPEG, PNG and WebP images (#2537, #2539) |
| 95 | - Added functions to extract orientation from Exif metadata and optionally clear it in the Exif chunk (#2484) |
| 96 | - Serde support for more types (#2445) |
| 97 | - PNM encoder now supports writing 16-bit images (#2431) |
| 98 | |
| 99 | Structural changes: |
| 100 | - Increased MSRV to 1.85.0 (from 1.78.0) |
| 101 | |
| 102 | API improvements: |
| 103 | - `save`, `save_with_format`, `write_to` and `write_with_encoder` methods on `DynamicImage` now automatically convert the pixel format when necessary instead of returning an error (#2501) |
| 104 | - Added `DynamicImage::has_alpha()` convenience method |
| 105 | - Implemented `TryFrom<ExtendedColorType>` for `ColorType` (#2444) |
| 106 | - Added `const HAS_ALPHA` to trait `Pixel` |
| 107 | - Unified the error for unsupported encoder colors (#2543) |
| 108 | - Added a `hooks` module to customize builtin behavior, `register_format_detection_hook` and `register_decoding_hook` for the determining format of a file and selecting an `ImageDecoder` implementation respectively. (#2372) |
| 109 | |
| 110 | Performance improvements: |
| 111 | - Gaussian blur (#2496) and box blur (#2515) are now faster |
| 112 | - Improve compilation times by avoiding unnecessary instantiation of generic functions (#2468, #2470) |
| 113 | |
| 114 | Bug fixes: |
| 115 | - Many improvements to image format decoding: TIFF, WebP, AVIF, PNG, GIF, BMP, TGA |
| 116 | - Fixed `GifEncoder::encode()` ignoring the speed parameter and always using the slowest speed (#2504) |
| 117 | - `.pnm` is now recognized as a file extension for the PNM format (#2559) |
| 118 | |
| 119 | |
| 120 | ### Version 0.25.6 |
| 121 | |
| 122 | Features: |
| 123 | - Improved format detection ([#2418](https://github.com/image-rs/image/pull/2418)) |
| 124 | - Implement writing ICC profiles for JPEG and PNG images ([#2389](https://github.com/image-rs/image/pull/2389)) |
| 125 | |
| 126 | Bug fixes: |
| 127 | - JPEG encoding bugfix ([#2387](https://github.com/image-rs/image/pull/2387)) |
| 128 | - Expanded ICO format detection ([#2434](https://github.com/image-rs/image/pull/2434)) |
| 129 | - Fixed EXR bug with NaNs ([#2381](https://github.com/image-rs/image/pull/2381)) |
| 130 | - Various documentation improvements |
| 131 | |
| 132 | ### Version 0.25.5 |
| 133 | |
| 134 | Features: |
| 135 | - Added support for decoding 10-bit and 12-bit AVIF |
| 136 | - Initial, opt-in serde support for an enum. This may be extended to other types in the future. |
| 137 | |
| 138 | Bug fixes: |
| 139 | - [Multiple bug fixes in AVIF decoding](https://github.com/image-rs/image/pull/2373) |
| 140 | - The `rayon` feature now correctly toggles the use of `rayon` when encoding AVIF. (Previously it would be either always on or always off depending on the version of the `ravif` crate in your dependency tree.) |
| 141 | - "jfif" file extension for JPEG images is now recognized |
| 142 | |
| 143 | ### Version 0.25.4 |
| 144 | |
| 145 | Features: |
| 146 | - Much faster decoding of lossless WebP due to a variety of optimizations. Our benchmarks show 2x to 2.5x improvement. |
| 147 | - Added support for orientation metadata, so that e.g. smartphone camera images could be displayed correctly: |
| 148 | - Added `ImageDecoder::orientation()` and implemented orientation metadata extraction for JPEG, WebP and TIFF formats |
| 149 | - Added `DynamicImage::apply_orientation()` to apply the orientation to an image |
| 150 | - Added support for extracting Exif metadata from images via `ImageDecoder::exif_metadata()`, and implemented it for JPEG and WebP formats |
| 151 | - Added `ImageEncoder::set_icc_profile()` and implemented it for WebP format. Pull requests with implementations for other formats are welcome. |
| 152 | - Added `DynamicImage::fast_blur()` for a linear-time approximation of Gaussian blur, which is much faster at larger blur radii |
| 153 | |
| 154 | Bug fixes: |
| 155 | - Fixed some APNG images being decoded incorrectly |
| 156 | - Fixed the iterator over animated WebP frames to return `None` instead of an error when the end of the animation is reached |
| 157 | |
| 158 | ### Version 0.25.3 |
| 159 | |
| 160 | Yanked! This version accidentally missed a commit that should have been |
| 161 | included with the release. The `Orientation` struct should be in the |
| 162 | appropriate module instead of the top-level. This release won't be supported. |
| 163 | |
| 164 | ### Version 0.25.2 |
| 165 | |
| 166 | Features: |
| 167 | - Added the HDR encoder to supported formats in generic write methods with the |
| 168 | `hdr` feature enabled. Supports 32-bit float RGB color only, for now. |
| 169 | - When cloning `ImageBuffer`, `DynamicImage` and `Frame` the existing buffer |
| 170 | will now be reused if possible. |
| 171 | - Added `image::ImageReader` as an alias. |
| 172 | - Implement `ImageEncoder` for `HdrEncoder`. |
| 173 | |
| 174 | Structural changes |
| 175 | - Switch from `byteorder` to `byteorder-lite`, consolidating some casting |
| 176 | unsafety to `bytemuck`. |
| 177 | - Many methods on `DynamicImage` and buffers gained `#[must_use]` indications. |
| 178 | |
| 179 | Bug fixes: |
| 180 | - Removed test data included in the crate archive. |
| 181 | - The WebP animation decoder stops when reaching the indicate frame count. |
| 182 | - Fixed bugs in the `bmp` decoder. |
| 183 | - Format support gated on the `exr` feature now compiles in isolation. |
| 184 | |
| 185 | ### Version 0.25.1 |
| 186 | |
| 187 | Bug fixes: |
| 188 | - Fixed corrupt JPEG output when attempting to encode images containing an alpha |
| 189 | channel. |
| 190 | - Only accept ".ff" file extension for farbfeld images. |
| 191 | - Correct farbfeld feature flag for `ImageFormat::{reading_enabled, writing_enabled}`. |
| 192 | - Disable strict mode for JPEG decoder. |
| 193 | - Add nasm feature to optionally enable faster AVIF encoding. |
| 194 | |
| 195 | |
| 196 | ### Version 0.25.0 |
| 197 | |
| 198 | Breaking changes: |
| 199 | - Added `BufRead` + `Seek` bound on many decoders. |
| 200 | - Use `ExtendedColorType` instead of `ColorType` when encoding. |
| 201 | - Removed `ImageOutputFormat`, `GenericImageView::bounds`, and several other |
| 202 | deprecated items. |
| 203 | - Removed incremental decoding support and changed `ImageDecoder` so the trait |
| 204 | is object safe. |
| 205 | - Pixel types are now `repr(transparent)` rather than `repr(C)`. |
| 206 | - Made color_quant dependency optional. |
| 207 | - Renamed some feature flags. |
| 208 | |
| 209 | Structural changes: |
| 210 | - Increased MSRV to 1.67.1 |
| 211 | |
| 212 | Codec changes: |
| 213 | - Switched to image-webp for WebP encoding. |
| 214 | - Switched to zune-jpeg for JPEG decoding. |
| 215 | - Made the HDR decoder produce f32 images. |
| 216 | - Removed DXT encoding and decoding support. |
| 217 | |
| 218 | ### Version 0.24.9 |
| 219 | |
| 220 | Structural changes: |
| 221 | - Relicense to MIT OR Apache-2.0 |
| 222 | - Increase MSRV 1.63.0 |
| 223 | |
| 224 | New features: |
| 225 | - Support limits in PNG animation decoding. |
| 226 | - Added offsets to SubImage to compensate for the now-deprecated bounds call |
| 227 | from GenericImageView. |
| 228 | |
| 229 | Bug fixes: |
| 230 | - Correct limit tests for TIFF. |
| 231 | - Avoid overflow in gif::Decoder::buffer_size. |
| 232 | - Return error instead of using assertions for Avif decoder unsupported or |
| 233 | invalid bit depth. |
| 234 | |
| 235 | ### Version 0.24.8 |
| 236 | |
| 237 | New features: |
| 238 | - Added pure-Rust lossless WebP encoding. |
| 239 | - Added `DynamicImage::new` method. |
| 240 | - Added `PngDecoder::gamma_value` method. |
| 241 | - Added `ImageFormat::{reading_enabled, writing_enabled, all}`. |
| 242 | - TGA encoder now supports RLE encoding. |
| 243 | - Add rayon parallel iterators behind an optional `rayon` feature. |
| 244 | - Support CMYK TIFF images. |
| 245 | - Implement `From<DynamicImage>` for all image types. |
| 246 | |
| 247 | Bug fixes: |
| 248 | - Fix decoding pngs with invalid text chunks. |
| 249 | - Handle non-fatal error dav1d::Error::Again. |
| 250 | - Do not round floats in interpolate. |
| 251 | - PNM decoder now scales samples according to specified maximum. |
| 252 | - Fix wrong implementation of unsharpen filter. |
| 253 | - Fix `GifDecoder::with_limits` to raise an error when limits are exceeded. |
| 254 | |
| 255 | ### Version 0.24.7 |
| 256 | |
| 257 | New features: |
| 258 | - Added `{ImageBuffer, DynamicImage}::write_with_encoder` to simplify writing |
| 259 | images with custom settings. |
| 260 | - Expose ICC profiles stored in tiff and webp files. |
| 261 | - Added option to set the background color of animated webp images. |
| 262 | - New methods for sampling and interpolation of `GenericImageView`s |
| 263 | |
| 264 | Bug fixes: |
| 265 | - Fix panic on empty dxt. |
| 266 | - Fix several panics in webp decoder. |
| 267 | - Allow unknown chunks at the end of webp files. |
| 268 | |
| 269 | ### Version 0.24.6 |
| 270 | |
| 271 | - Add support for QOI. |
| 272 | - ImageDecoders now expose ICC profiles on supported formats. |
| 273 | - Add support for BMPs without a file header. |
| 274 | - Improved AVIF encoder. |
| 275 | - WebP decoding fixes. |
| 276 | |
| 277 | ### Version 0.24.5 |
| 278 | |
| 279 | Structural changes: |
| 280 | - Increased the minimum supported Rust version (MSRV) to 1.61. |
| 281 | - Increased the version requirement for the `tiff` crate to 0.8.0. |
| 282 | - Increased the version requirement for the `jpeg` crate to 0.3.0. |
| 283 | |
| 284 | Bug fixes: |
| 285 | - The `as_rgb32f` function of `DynamicImage` is now correctly documented. |
| 286 | - Fixed a crash when decoding ICO images. Added a regression test. |
| 287 | - Fixed a panic when transforming webp images. Added a regression test. |
| 288 | - Added a check to prevent integer overflow when calculating file size for BMP |
| 289 | images. The missing check could panic in debug mode or else set an incorrect |
| 290 | file size in release mode. |
| 291 | - Upgraded the PNG image encoder to use the newer `PngEncoder::write_image` |
| 292 | instead of the deprecated `PngEncoder::encode` which did not account for byte |
| 293 | order and could result in images with incorrect colors. |
| 294 | - Fixed `InsufficientMemory` error when trying to decode a PNG image. |
| 295 | - Fix warnings and CI issues. |
| 296 | - Typos and links in the documentation have been corrected. |
| 297 | |
| 298 | Performance: |
| 299 | - Added check for dynamic image dimensions before resizing. This improves |
| 300 | performance in cases where the image does not need to be resized or has |
| 301 | already been resized. |
| 302 | |
| 303 | ### Version 0.24.4 |
| 304 | |
| 305 | New Features: |
| 306 | - Encoding for `webp` is now available with the native library. This needs to |
| 307 | be activate explicitly with the `web-encoder` feature. |
| 308 | - `exr` decoding has gained basic limit support. |
| 309 | |
| 310 | Bug fixes: |
| 311 | - The `Iterator::size_hint` implementation of pixel iterators has been fixed to |
| 312 | return the current length indicated by its `ExactSizeIterator` hint. |
| 313 | - Typos and bad references in the documentation have been removed. |
| 314 | |
| 315 | Performance: |
| 316 | - `ImageBuffer::get_pixel{,_mut}` is now marked inline. |
| 317 | - `resize` now short-circuits when image dimensions are unchanged. |
| 318 | |
| 319 | ### Version 0.24.3 |
| 320 | |
| 321 | New Features: |
| 322 | - `TiffDecoder` now supports setting resource limits. |
| 323 | |
| 324 | Bug fixes: |
| 325 | - Fix compile issues on little endian systems. |
| 326 | - Various panics discovered by fuzzing. |
| 327 | |
| 328 | ### Version 0.24.2 |
| 329 | |
| 330 | Structural changes: |
| 331 | - CI now runs `cargo-deny`, checking dependent crates to an OSS license list |
| 332 | and against RUSTSEC advisories. |
| 333 | |
| 334 | New Features: |
| 335 | - The WebP decoder recognizes and decodes images with `VP8X` header. |
| 336 | - The DDS decoder recognizes and decodes images with `DX10` headers. |
| 337 | |
| 338 | Bug fixes: |
| 339 | - Calling `DynamicImage`/`ImageBuffer`'s methods `write_to` and `save` will now |
| 340 | work properly even if the backing container is larger than the image layout |
| 341 | requires. Only the relevant slice of pixel data is passed to the encoder. |
| 342 | - Fixed a OOM-panic caused by malformed images in the `gif` decoder. |
| 343 | |
| 344 | ### Version 0.24.1 |
| 345 | |
| 346 | Bug Fixes: |
| 347 | - ImageBuffer::get_pixel_checked would sometimes return the incorrect pixel. |
| 348 | - PNG encoding would sometimes not recognize unsupported color. |
| 349 | |
| 350 | ### Version 0.24.0 |
| 351 | |
| 352 | Breaking changes |
| 353 | |
| 354 | Structural changes: |
| 355 | - Minimum Rust version is now `1.56` and may change in minor versions until |
| 356 | further notice. It is now tracked in the library's `Cargo.toml`, instead, by |
| 357 | the standard `[package.rust-version]` field. Note: this applies _to the |
| 358 | library itself_. You may need different version resolutions for dependencies |
| 359 | when using a non-stable version of Rust. |
| 360 | - The `math::utils::{nq, utils}` modules have been removed. These are better |
| 361 | served through the `color_quant` crate and the standard library respectively. |
| 362 | - All codecs are now available through `image::codecs`, no longer top-level. |
| 363 | - `ExtendedColorType` and `DynamicImage` have been made `#[non_exhaustive]`, |
| 364 | providing more methods instead of exhaustive matching. |
| 365 | - Reading images through the generic `io::Reader`, as well as generic |
| 366 | convenience interfaces, now requires the underlying reader to be `BufRead + |
| 367 | Seek`. This allows more efficient support more formats. Similarly, writing |
| 368 | now requires writers to be `Write + Seek`. |
| 369 | - The `Bgra*` variants of buffers, which were only half-supported, have been |
| 370 | removed. The owning buffer types `ImageBuffer` and `DynamicImage` |
| 371 | fundamentally already make a choice in supported pixel representations. This |
| 372 | allows for more consistent internal behavior. Callers are expected to convert |
| 373 | formats when using those buffers, which they are required to do in any case |
| 374 | already, and which is routinely performed by decoders. |
| 375 | |
| 376 | Trait reworks: |
| 377 | - The `Pixel` trait is no longer implemented quite as liberally for structs |
| 378 | defined in the crate. Instead, it is now restricted to a set of known channel |
| 379 | which ensures accuracy in computations involving those channels. |
| 380 | - The `ImageDecoderExt` trait has been renamed to `ImageDecoderRect`, according |
| 381 | to its actual functionality. |
| 382 | - The `Pixel` trait and its `Subpixel` field no longer require (or provide) a |
| 383 | `'static` lifetime bound. |
| 384 | - The `Pixel` trait no longer requires specifying an associated, constant |
| 385 | `ColorType`. This was of little relevance to computation but made it much |
| 386 | harder to implement and extend correctly. Instead, the _private_ |
| 387 | `PixelWithColorType` extension is added for interfaces that require a |
| 388 | properly known variant. |
| 389 | - Reworked how `SubImage` interacts with the `GenericImage` trait. It is now a |
| 390 | default implementation. Note that `SubImage` now has _inherent_ methods that |
| 391 | avoid double-indirection, the trait's method will no longer avoid this. |
| 392 | - The `Primitive` trait now requires implementations to provide a minimum and |
| 393 | maximum logical bound for the purpose of converting to other primitive |
| 394 | representations. |
| 395 | |
| 396 | Additions |
| 397 | |
| 398 | Image formats: |
| 399 | - Reading lossless WebP is now supported. |
| 400 | - The OpenEXR format is now supported. |
| 401 | - The `jpeg` decoder has been upgraded to Lossless JPEG. |
| 402 | - The `AvifEncoder` now correctly handles alpha-less images. Some additional |
| 403 | color formats are converted to RGBA as well. |
| 404 | - The `Bmp` codec now decodes more valid images. It can decode a raw image |
| 405 | without performing the palette mapping. It provides a method to access the |
| 406 | palette. The encoder provides the inverse capabilities. |
| 407 | - `Tiff` is now an output format. |
| 408 | |
| 409 | Buffers and Operations: |
| 410 | - The channel / primitive type `f32` is now supported. Currently only the |
| 411 | OpenEXR codec makes full use of it but this is expected to change. |
| 412 | - `ImageBuffer::{get_pixel_checked, get_pixel_mut_checked}` provide panic-free |
| 413 | access to pixels and channels by returning `Option<&P>` and `Option<&mut P>`. |
| 414 | - `ImageBuffer::write_to` has been added, encoding the buffer to a writer. This |
| 415 | method already existed on `DynamicImage`. |
| 416 | - `DynamicImage` now implements `From<_>` for all supported buffer types. |
| 417 | - `DynamicImage` now implements `Default`, an empty `Rgba8` image. |
| 418 | - `imageops::overlay` now takes coordinates as `i64`. |
| 419 | |
| 420 | Limits: |
| 421 | - Added `Limits` and `LimitSupport`, utilized in `io::Reader`. These can be |
| 422 | configured for rudimentary protection against resource exhaustion (images |
| 423 | pretending to require a very large buffer). These types are not yet |
| 424 | exhaustive by design, and more and stricter limits may be added in the |
| 425 | future. |
| 426 | - Encoders that do provide inherent support for limits, or reserve a |
| 427 | significant amount of internal memory, are urged to implement the |
| 428 | `set_limits` extension to `ImageDecoder`. Some strict limit are opt-in, which |
| 429 | may cause decoding to fail if not supported. |
| 430 | |
| 431 | Miscellaneous: |
| 432 | - `PNMSubtype` has been renamed to `PnmSubtype`, by Rust's naming scheme. |
| 433 | - Several incorrectly capitalized `PNM*` aliases have been removed. |
| 434 | - Several `enum` types that had previously used a hidden variant now use the |
| 435 | official `#[non_exhaustive]` attribute instead. |
| 436 | |
| 437 | ### Version 0.23.14 |
| 438 | |
| 439 | - Unified gif blending in different decode methods, fixing out-of-bounds checks |
| 440 | in a number of weirdly positioned frames. |
| 441 | - Hardened TGA decoder against a number of malicious inputs. |
| 442 | - Fix forward incompatible usage of the panic macro. |
| 443 | - Fix load_rect for gif reaching `unreachable!()` code. |
| 444 | |
| 445 | - Added `ExtendedColorType::A8`. |
| 446 | - Allow TGA to load alpha-only images. |
| 447 | - Optimized load_rect to avoid unnecessary seeks. |
| 448 | |
| 449 | ### Version 0.23.13 |
| 450 | |
| 451 | - Fix an inconsistency in supported formats of different methods for encoding |
| 452 | an image. |
| 453 | - Fix `thumbnail` choosing an empty image. It now always prefer non-empty image |
| 454 | dimensions. |
| 455 | - Fix integer overflow in calculating requires bytes for decoded image buffers |
| 456 | for farbfeld, hdr, and pnm decoders. These will now error early. |
| 457 | - Fix a panic decoding certain `jpeg` image without frames or meta data. |
| 458 | - Optimized the `jpeg` encoder. |
| 459 | - Optimized `GenericImage::copy_from` default impl in various cases. |
| 460 | |
| 461 | - Add `avif` decoders. You must enable it explicitly and it is not covered by |
| 462 | our usual MSRV policy of Rust 1.34. Instead, only latest stable is supported. |
| 463 | - Add `ImageFormat::{can_read, can_write}` |
| 464 | - Add `Frame::buffer_mut` |
| 465 | - Add speed and quality options on `avif` encoder. |
| 466 | - Add speed parameter to `gif` encoder. |
| 467 | - Expose control over sequence repeat to the `gif` encoder. |
| 468 | - Add `{contrast,brighten,huerotate}_in_place` functions in imageproc. |
| 469 | |
| 470 | - Relax `Default` impl of `ImageBuffer`, removing the bound on the color type. |
| 471 | - Derive Debug, Hash, PartialEq, Eq for DynamicImage |
| 472 | |
| 473 | ### Version 0.23.12 |
| 474 | |
| 475 | - Fix a soundness issue affecting the impls of `Pixel::from_slice_mut`. This |
| 476 | would previously reborrow the mutable input reference as a shared one but |
| 477 | then proceed to construct the mutable result reference from it. While UB |
| 478 | according to Rust's memory model, we're fairly certain that no miscompilation |
| 479 | can happen with the LLVM codegen in practice. |
| 480 | See 5cbe1e6767d11aff3f14c7ad69a06b04e8d583c7 for more details. |
| 481 | - Fix `imageops::blur` panicking when `sigma = 0.0`. It now defaults to `1.0` |
| 482 | as all negative values. |
| 483 | - Fix re-exporting `png::{CompressionType, FilterType}` to maintain SemVer |
| 484 | compatibility with the `0.23` releases. |
| 485 | |
| 486 | - Add `ImageFormat::from_extension` |
| 487 | - Add copyless DynamicImage to byte slice/vec conversion. |
| 488 | - Add bit-depth specific `into_` and `to_` DynamicImage conversion methods. |
| 489 | |
| 490 | |
| 491 | ### Version 0.23.11 |
| 492 | |
| 493 | - The `NeuQuant` implementation is now supplied by `color_quant`. Use of the |
| 494 | type defined by this library is discouraged. |
| 495 | - The `jpeg` decoder can now downscale images that are decoded by 1,2,4,8. |
| 496 | - Optimized the jpeg encoding ~5-15%. |
| 497 | - Deprecated the `clamp` function. Use `num-traits` instead. |
| 498 | - The ICO decoder now accepts an empty mask. |
| 499 | - Fixed an overflow in ICO mask decoding potentially leading to panic. |
| 500 | - Added `ImageOutputFormat` for `AVIF` |
| 501 | - Updated `tiff` to `0.6` with lzw performance improvements. |
| 502 | |
| 503 | ### Version 0.23.10 |
| 504 | |
| 505 | - Added AVIF encoding capabilities using the `ravif` crate. Please note that |
| 506 | the feature targets the latest stable compiler and is not enabled by default. |
| 507 | - Added `ImageBuffer::as_raw` to inspect the underlying container. |
| 508 | - Updated `gif` to `0.11` with large performance improvements. |
| 509 | |
| 510 | ### Version 0.23.9 |
| 511 | |
| 512 | - Introduced correctly capitalized aliases for some scream case types |
| 513 | - Introduced `imageops::{vertical_gradient, horizontal_gradient}` for writing |
| 514 | simple color gradients into an image. |
| 515 | - Sped up methods iterating over `Pixels`, `PixelsMut`, etc. by using exact |
| 516 | chunks internally. This should auto-vectorize `ImageBuffer::from_pixel`. |
| 517 | - Adjusted `Clone` impls of iterators to not require a bound on the pixel. |
| 518 | - Add `Debug` impls for iterators where the pixel's channel implements it. |
| 519 | - Add comparison impls for `FilterType` |
| 520 | |
| 521 | ### Version 0.23.8 |
| 522 | |
| 523 | - `flat::Error` now implements the standard `Error` trait |
| 524 | - The type parameter of `Map` has been relaxed to `?Sized` |
| 525 | - Added the `imageops::tile` function that repeats one image across another |
| 526 | |
| 527 | ### Version 0.23.7 |
| 528 | |
| 529 | - Iterators over immutable pixels of `ImageBuffer` can now be cloned |
| 530 | - Added a `tga` encoder |
| 531 | - Added `ColorMap::lookup`, an optional reversal of the map |
| 532 | - The `EncodableLayout` trait is now exported |
| 533 | |
| 534 | ### Version 0.23.6 |
| 535 | |
| 536 | - Added `png::ApngDecoder`, an adapter decoding the animation in an APNG. |
| 537 | - Fixed a bug in `jpeg` encoding that would darken output colors. |
| 538 | - Added a utility constructor `FlatSamples::with_monocolor`. |
| 539 | - Added `ImageBuffer::as_flat_samples_mut` which is a mutable variant of the |
| 540 | existing ffi-helper `ImageBuffer::as_flat_samples`. |
| 541 | |
| 542 | ### Version 0.23.5 |
| 543 | |
| 544 | - The `png` encoder now allows configuring compression and filter type. The |
| 545 | output is not part of stability guarantees, see its documentation. |
| 546 | - The `jpeg` encoder now accepts any implementor of `GenericImageView`. This |
| 547 | allows images that are only partially present in memory to be encoded. |
| 548 | - `ImageBuffer` now derives `Hash`, `PartialEq`, `Eq`. |
| 549 | - The `Pixels`/`PixelsMut` iterator no longer yields out-of-bounds pixels when |
| 550 | the underlying buffer is larger than required. |
| 551 | - The `pbm` decoder correctly decodes ascii data again, fixing a regression |
| 552 | where it would use the sample value `1` as white instead of `255`. |
| 553 | - Fix encoding of RGBA data in `gif` frames. |
| 554 | - Constructing a `Rows`/`RowsMut` iterator no longer panics when the image has |
| 555 | a width or height of `0`. |
| 556 | |
| 557 | ### Version 0.23.4 |
| 558 | |
| 559 | - Improved the performance of decoding animated gifs |
| 560 | - Added `crop_imm` which functions like `crop` but on a shared reference |
| 561 | - The gif `DisposalMethod::Any` is treated as `Keep`, consistent with browsers |
| 562 | - Most errors no longer allocate a string, instead implement Display. |
| 563 | - Add some implementations of `Error::source` |
| 564 | |
| 565 | ### Version 0.23.3 |
| 566 | |
| 567 | - Added `ColorType::has_alpha` to facilitate lossless conversion |
| 568 | - Recognize extended WebP formats for decoding |
| 569 | - Added decoding and encoding for the `farbfeld` format |
| 570 | - Export named iterator types created from various `ImageBuffer` methods |
| 571 | - Error in jpeg encoder for images larger than 65536 pixels, fixes panic |
| 572 | |
| 573 | ### Version 0.23.2 |
| 574 | |
| 575 | - The dependency on `jpeg-decoder` now reflects minimum requirements. |
| 576 | |
| 577 | ### Version 0.23.1 |
| 578 | |
| 579 | - Fix cmyk_to_rgb (jpeg) causing off by one rounding errors. |
| 580 | - A number of performance improvements for jpeg (encode and decode), bmp, vp8 |
| 581 | - Added more details to errors for many formats |
| 582 | |
| 583 | ### Version 0.23.0 |
| 584 | |
| 585 | This major release intends to improve the interface with regards to handling of |
| 586 | color format data and errors for both decoding and encoding. This necessitated |
| 587 | many breaking changes anyways so it was used to improve the compliance to the |
| 588 | interface guidelines such as outstanding renaming. |
| 589 | |
| 590 | It is not yet perfect with regards to color spaces but it was designed mainly |
| 591 | as an improvement over the current interface with regards to in-memory color |
| 592 | formats, first. We'll get to color spaces in a later major version. |
| 593 | |
| 594 | - Heavily reworked `ColorType`: |
| 595 | - This type is now used for denoting formats for which we support operations |
| 596 | on buffers in these memory representations. Particularly, all channels in |
| 597 | pixel types are assumed to be an integer number of bytes (In terms of the |
| 598 | Rust type system, these are `Sized` and one can crate slices of channel |
| 599 | values). |
| 600 | - An `ExtendedColorType` is used to express more generic color formats for |
| 601 | which the library has limited support but can be converted/scaled/mapped |
| 602 | into a `ColorType` buffer. This operation might be fallible but, for |
| 603 | example, includes sources with 1/2/4-bit components. |
| 604 | - Both types are non-exhaustive to add more formats in a minor release. |
| 605 | - A work-in-progress (#1085) will further separate the color model from the |
| 606 | specific channel instantiation, e.g. both `8-bit RGB` and `16-bit BGR` |
| 607 | are instantiations of `RGB` color model. |
| 608 | - Heavily rework `ImageError`: |
| 609 | - The top-level enum type now serves to differentiate cause with multiple |
| 610 | opaque representations for the actual error. These are no longer simple |
| 611 | Strings but contains useful types. Third-party decoders that have no |
| 612 | variant in `ImageFormat` have also been considered. |
| 613 | - Support for `Error::source` that can be downcast to an error from a |
| 614 | matching version of the underlying decoders. Note that the version is not |
| 615 | part of the stable interface guarantees, this should not be relied upon |
| 616 | for correctness and only be used as an optimization. |
| 617 | - Added image format indications to errors. |
| 618 | - The error values produced by decoder will be upgraded incrementally. See |
| 619 | something that still produces plain old String messages? Feel free to |
| 620 | send a PR. |
| 621 | - Reworked the `ImageDecoder` trait: |
| 622 | - `read_image` takes an output buffer argument instead of allocating all |
| 623 | memory on its own. |
| 624 | - The return type of `dimensions` now aligns with `GenericImage` sizes. |
| 625 | - The `colortype` method was renamed to `color_type` for conformity. |
| 626 | - The enums `ColorType`, `DynamicImage`, `imageops::FilterType`, `ImageFormat` |
| 627 | no longer re-export all of their variants in the top-level of the crate. This |
| 628 | removes the growing pollution in the documentation and usage. You can still |
| 629 | insert the equivalent statement on your own: |
| 630 | `use image::ImageFormat::{self, *};` |
| 631 | - The result of `encode` operations is now uniformly an `ImageResult<()>`. |
| 632 | - Removed public converters from some `tiff`, `png`, `gif`, `jpeg` types, |
| 633 | mainly such as error conversion. This allows upgrading the dependency across |
| 634 | major versions without a major release in `image` itself. |
| 635 | - On that note, the public interface of `gif` encoder no longer takes a |
| 636 | `gif::Frame` but rather deals with `image::Frame` only. If you require to |
| 637 | specify the disposal method, transparency, etc. then you may want to wait |
| 638 | with upgrading but (see next change). |
| 639 | - The `gif` encoder now errors on invalid dimensions or unsupported color |
| 640 | formats. It would previously silently reinterpret bytes as RGB/RGBA. |
| 641 | - The capitalization of `ImageFormat` and other enum variants has been |
| 642 | adjusted to adhere to the API guidelines. These variants are now spelled |
| 643 | `Gif`, `Png`, etc. The same change has been made to the name of types such as |
| 644 | `HDRDecoder`. |
| 645 | - The `Progress` type has finally received public accessor method. Strange that |
| 646 | no one reported them missing. |
| 647 | - Introduced `PixelDensity` and `PixelDensityUnit` to store DPI information in |
| 648 | formats that support encoding this form of meta data (e.g. in `jpeg`). |
| 649 | |
| 650 | ### Version 0.22.5 |
| 651 | |
| 652 | - Added `GenericImage::copy_within`, specialized for `ImageBuffer` |
| 653 | - Fixed decoding of interlaced `gif` files |
| 654 | - Prepare for future compatibility of array `IntoIterator` in example code |
| 655 | |
| 656 | ### Version 0.22.4 |
| 657 | |
| 658 | - Added in-place variants for flip and rotate operations. |
| 659 | - The bmp encoder now checks if dimensions are valid for the format. It would |
| 660 | previously write a subset or panic. |
| 661 | - Removed deprecated implementations of `Error::description` |
| 662 | - Added `DynamicImage::into_*` which convert without an additional allocation. |
| 663 | - The PNG encoder errors on unsupported color types where it had previously |
| 664 | silently swapped color channels. |
| 665 | - Enabled saving images as `gif` with `save_buffer`. |
| 666 | |
| 667 | ### Version 0.22.3 |
| 668 | |
| 669 | - Added a new module `io` containing a configurable `Reader`. It can replace |
| 670 | the bunch of free functions: `image::{load_*, open, image_dimensions}` while |
| 671 | enabling new combinations such as `open` but with format deduced from content |
| 672 | instead of file path. |
| 673 | - Fixed `const_err` lint in the macro expanded implementations of `Pixel`. This |
| 674 | can only affect your crate if `image` is used as a path dependency. |
| 675 | |
| 676 | ### Version 0.22.2 |
| 677 | |
| 678 | - Undeprecate `unsafe` trait accessors. Further evaluation showed that their |
| 679 | deprecation should be delayed until trait `impl` specialization is available. |
| 680 | - Fixed magic bytes used to detect `tiff` images. |
| 681 | - Added `DynamicImage::from_decoder`. |
| 682 | - Fixed a bug in the `PNGReader` that caused an infinite loop. |
| 683 | - Added `ColorType::{bits_per_pixel, num_components}`. |
| 684 | - Added `ImageFormat::from_path`, same format deduction as the `open` method. |
| 685 | - Fixed a panic in the gif decoder. |
| 686 | - Aligned background color handling of `gif` to web browser implementations. |
| 687 | - Fixed handling of partial frames in animated `gif`. |
| 688 | - Removed unused direct `lzw` dependency, an indirect dependency in `tiff`. |
| 689 | |
| 690 | ### Version 0.22.1 |
| 691 | |
| 692 | - Fixed build without no features enabled |
| 693 | |
| 694 | ### Version 0.22 |
| 695 | |
| 696 | - The required Rust version is now `1.34.2`. |
| 697 | - Note the website and blog: [image-rs.org][1] and [blog.image-rs.org][2] |
| 698 | - `PixelMut` now only on `ImageBuffer` and removed from `GenericImage` |
| 699 | interface. Prefer iterating manually in the generic case. |
| 700 | - Replaced an unsafe interface in the hdr decoder with a safe variant. |
| 701 | - Support loading 2-bit BMP images |
| 702 | - Add method to save an `ImageBuffer`/`DynamicImage` with specified format |
| 703 | - Update tiff to `0.3` with a writer |
| 704 | - Update png to `0.15`, fixes reading of interlaced sub-byte pixels |
| 705 | - Always use custom struct for `ImageDecoder::Reader` |
| 706 | - Added `apply_without_alpha` and `map_without_alpha` to `Pixel` trait |
| 707 | - Pixel information now with associated constants instead of static methods |
| 708 | - Changed color structs to tuple types with single component. Improves |
| 709 | ergonomics of destructuring assignment and construction. |
| 710 | - Add lifetime parameter on `ImageDecoder` trait. |
| 711 | - Remove unnecessary `'static` bounds on affine operations |
| 712 | - Add function to retrieve image dimensions without loading full image |
| 713 | - Allow different image types in overlay and replace |
| 714 | - Iterators over rows of `ImageBuffer`, mutable variants |
| 715 | |
| 716 | [1]: https://www.image-rs.org |
| 717 | [2]: https://blog.image-rs.org |
| 718 | |
| 719 | ### Version 0.21.2 |
| 720 | |
| 721 | - Fixed a variety of crashes and opaque errors in webp |
| 722 | - Updated the png limits to be less restrictive |
| 723 | - Reworked even more `unsafe` operations into safe alternatives |
| 724 | - Derived Debug on FilterType and Deref on Pixel |
| 725 | - Removed a restriction on DXT to always require power of two dimensions |
| 726 | - Change the encoding of RGBA in bmp using bitfields |
| 727 | - Corrected various urls |
| 728 | |
| 729 | ### Version 0.21.1 |
| 730 | |
| 731 | - A fairly important bugfix backport |
| 732 | - Fixed a potentially memory safety issue in the hdr and tiff decoders, see #885 |
| 733 | - See [the full advisory](docs/2019-04-23-memory-unsafety.md) for an analysis |
| 734 | - Fixes `ImageBuffer` index calculation for very, very large images |
| 735 | - Fix some crashes while parsing specific incomplete pnm images |
| 736 | - Added comprehensive fuzzing for the pam image types |
| 737 | |
| 738 | ### Version 0.21 |
| 739 | |
| 740 | - Updated README to use `GenericImageView` |
| 741 | - Removed outdated version number from CHANGES |
| 742 | - Compiles now with wasm-unknown-emscripten target |
| 743 | - Restructured `ImageDecoder` trait |
| 744 | - Updated README with a more colorful example for the Julia fractal |
| 745 | - Use Rust 1.24.1 as minimum supported version |
| 746 | - Support for loading GIF frames one at a time with `animation::Frames` |
| 747 | - The TGA decoder now recognizes 32 bpp as RGBA(8) |
| 748 | - Fixed `to_bgra` document comment |
| 749 | - Added release test script |
| 750 | - Removed unsafe code blocks several places |
| 751 | - Fixed overlay overflow bug issues with documented proofs |
| 752 | |
| 753 | ### Version 0.20 |
| 754 | |
| 755 | - Clippy lint pass |
| 756 | - Updated num-rational dependency |
| 757 | - Added BGRA and BGR color types |
| 758 | - Improved performance of image resizing |
| 759 | - Improved PBM decoding |
| 760 | - PNM P4 decoding now returns bits instead of bytes |
| 761 | - Fixed move of overlapping buffers in BMP decoder |
| 762 | - Fixed some document comments |
| 763 | - `GenericImage` and `GenericImageView` is now object-safe |
| 764 | - Moved TIFF code to its own library |
| 765 | - Fixed README examples |
| 766 | - Fixed ordering of interpolated parameters in TIFF decode error string |
| 767 | - Thumbnail now handles upscaling |
| 768 | - GIF encoding for multiple frames |
| 769 | - Improved subimages API |
| 770 | - Cargo fmt fixes |
| 771 | |
| 772 | ### Version 0.19 |
| 773 | |
| 774 | - Fixed panic when blending with alpha zero. |
| 775 | - Made `save` consistent. |
| 776 | - Consistent size calculation. |
| 777 | - Fixed bug in `apply_with_alpha`. |
| 778 | - Implemented `TGADecoder::read_scanline`. |
| 779 | - Use deprecated attribute for `pixels_mut`. |
| 780 | - Fixed bug in JPEG grayscale encoding. |
| 781 | - Fixed multi image TIFF. |
| 782 | - PNM encoder. |
| 783 | - Added `#[derive(Hash)]` for `ColorType`. |
| 784 | - Use `num-derive` for `#[derive(FromPrimitive)]`. |
| 785 | - Added `into_frames` implementation for GIF. |
| 786 | - Made rayon an optional dependency. |
| 787 | - Fixed issue where resizing image did not give exact width/height. |
| 788 | - Improved downscale. |
| 789 | - Added a way to expose options when saving files. |
| 790 | - Fixed some compiler warnings. |
| 791 | - Switched to lzw crate instead of using built-in version. |
| 792 | - Added `ExactSizeIterator` implementations to buffer structs. |
| 793 | - Added `resize_to_fill` method. |
| 794 | - DXT encoding support. |
| 795 | - Applied clippy suggestions. |
| 796 | |
| 797 | ### Version 0.4 |
| 798 | - Various improvements. |
| 799 | - Additional supported image formats (BMP and ICO). |
| 800 | - GIF and PNG codec moved into separate crates. |
| 801 | |
| 802 | ### Version 0.3 |
| 803 | - Replace `std::old_io` with `std::io`. |
| 804 | |
| 805 | ### Version 0.2 |
| 806 | - Support for interlaced PNG images. |
| 807 | - Writing support for GIF images (full color and paletted). |
| 808 | - Color quantizer that converts 32bit images to paletted including the alpha channel. |
| 809 | - Initial support for reading TGA images. |
| 810 | - Reading support for TIFF images (packbits and FAX compression not supported). |
| 811 | - Various bug fixes and improvements. |
| 812 | |
| 813 | ### Version 0.1 |
| 814 | - Initial release |
| 815 | - Basic reading support for png, jpeg, gif, ppm and webp. |
| 816 | - Basic writing support for png and jpeg. |
| 817 | - A collection of basic imaging processing function like `blur` or `invert` |