Skip to content

Commit

Permalink
Merge pull request #1973 from fintelia/release-0.24.7
Browse files Browse the repository at this point in the history
Release 0.24.7
  • Loading branch information
fintelia authored Aug 9, 2023
2 parents f776602 + 76eb532 commit e5580ec
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
24 changes: 18 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "image"
version = "0.24.6"
version = "0.24.7"
edition = "2018"
resolver = "2"

# note: when changed, also update test runner in `.github/workflows/rust.yml`
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"

Expand Down
13 changes: 9 additions & 4 deletions src/imageops/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<P: Pixel>(
img: &impl GenericImageView<Pixel = P>,
u: f32,
Expand All @@ -328,7 +328,7 @@ pub fn sample_bilinear<P: Pixel>(
)
}

/// 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<P: Pixel>(
img: &impl GenericImageView<Pixel = P>,
u: f32,
Expand All @@ -347,7 +347,12 @@ pub fn sample_nearest<P: Pixel>(
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<P: Pixel>(
img: &impl GenericImageView<Pixel = P>,
x: f32,
Expand All @@ -367,7 +372,7 @@ pub fn interpolate_nearest<P: Pixel>(
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<P: Pixel>(
img: &impl GenericImageView<Pixel = P>,
x: f32,
Expand Down

0 comments on commit e5580ec

Please sign in to comment.