From 76eb532e18030c3dbd7741b51b7862d40364fde7 Mon Sep 17 00:00:00 2001 From: Jonathan Behrens Date: Thu, 3 Aug 2023 20:26:38 -0700 Subject: [PATCH] Release 0.24.7 --- CHANGES.md | 24 ++++++++++++++++++------ Cargo.toml | 4 ++-- src/imageops/sample.rs | 13 +++++++++---- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 80a5539b8f..e7f4cc94de 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,11 +1,9 @@ -# Rust Image Release Notes - -Rust image aims to be a pure-Rust implementation of various popular image formats. Accompanying reading/write support, rust image provides basic imaging processing function. See `README.md` for further details. +# Release Notes ## Known issues - - Not all Interlaced (progressive) or animated images are well supported. - - The color space information of pixels is not clearly communicated. - - Initialization via byte-based buffers and ffi is a work-in-progress. +- Many decoders will panic on malicous input. In most cases, this is caused by + not enforcing memory limits, though other panics have been seen from fuzzing. +- The color space information of pixels is not clearly communicated. ## Changes @@ -19,6 +17,20 @@ Rust image aims to be a pure-Rust implementation of various popular image format See ongoing work on [`image-canvas`](https://github.com/image-rs/canvas) if you want to participate. +### Version 0.24.7 + +New features: +- Added `{ImageBuffer, DynamicImage}::write_with_encoder` to simplify writing + images with custom settings. +- Expose ICC profiles stored in tiff and wepb files. +- Added option to set the background color of animated webp images. +- New methods for sampling and interpolation of `GenericImageView`s + +Bug fixes: +- Fix panic on empty dxt. +- Fix several panics in webp decoder. +- Allow unknown chunks at the end of webp files. + ### Version 0.24.6 - Add support for QOI. diff --git a/Cargo.toml b/Cargo.toml index 7214756960..92385808d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "image" -version = "0.24.6" +version = "0.24.7" edition = "2018" resolver = "2" @@ -8,7 +8,7 @@ resolver = "2" rust-version = "1.61.0" license = "MIT" -description = "Imaging library written in Rust. Provides basic filters and decoders for the most common image formats." +description = "Imaging library. Provides basic image processing and encoders/decoders for common image formats." authors = ["The image-rs Developers"] readme = "README.md" diff --git a/src/imageops/sample.rs b/src/imageops/sample.rs index 337bcb597e..a362f83252 100644 --- a/src/imageops/sample.rs +++ b/src/imageops/sample.rs @@ -304,7 +304,7 @@ where out } -/// Linearly sample from an image using coordinates in [0,1]. +/// Linearly sample from an image using coordinates in [0, 1]. pub fn sample_bilinear( img: &impl GenericImageView, u: f32, @@ -328,7 +328,7 @@ pub fn sample_bilinear( ) } -/// Sample from an image using coordinates in [0,1], taking the nearest coordinate. +/// Sample from an image using coordinates in [0, 1], taking the nearest coordinate. pub fn sample_nearest( img: &impl GenericImageView, u: f32, @@ -347,7 +347,12 @@ pub fn sample_nearest( interpolate_nearest(img, ui, vi) } -/// Linearly bisample from an image using coordinates in [0,w-1] and [0,h-1]. +/// Sample from an image using coordinates in [0, w-1] and [0, h-1], taking the +/// nearest pixel. +/// +/// Coordinates outside the image bounds will return `None`, however the +/// behavior for points within half a pixel of the image bounds may change in +/// the future. pub fn interpolate_nearest( img: &impl GenericImageView, x: f32, @@ -367,7 +372,7 @@ pub fn interpolate_nearest( Some(img.get_pixel(x.round() as u32, y.round() as u32)) } -/// Linearly bisample from an image using coordinates in [0,w-1] and [0,h-1]. +/// Linearly sample from an image using coordinates in [0, w-1] and [0, h-1]. pub fn interpolate_bilinear( img: &impl GenericImageView, x: f32,