-
Notifications
You must be signed in to change notification settings - Fork 685
Open
Labels
Description
This happens when using image = "0.22.3".
Begin with a 75x70 reference image edge.png:

Resize edge.png to 45x42 with the Lanczos3 filter using ImageMagic to produce edge-im.png:

Resize edge.png to 45x42 with the Lanczos3 filter using image-rs to produce edge-imagers.png:

Expected
Images edge-im.png and edge-imagers.png should look the same.
Actual behaviour
The image produced by image-rs contains a significant artifacting around the edge. This is most easily seen in the upper half of the resulting images. I've zoomed in on the same section of both images here:
Reproduction steps
To resize the image using ImageMagick, I used the following command:
convert edge.png -resize 45x42 -filter Lanczos edge_im.png
To resize the image using image-rs, I used the following code:
extern crate image;
use image::imageops::FilterType::Lanczos3;
fn main() {
let mut image = image::open("edge.png").unwrap().to_rgba();
image = image::imageops::resize(&image, 45, 42, Lanczos3);
match image.save("edge-imagers.png") {
Ok(()) => eprintln!("image written"),
Err(e) => eprintln!("failed to write image: {}", e),
}
}
Reactions are currently unavailable

