A 2x2 grayscale image:
Is incorrectly upscaled to the following 4x4 image:
[1, 0, 0, 0,
0, 2, 2, 2,
0, 2, 2, 2,
0, 2, 2, 2]
This can be reproduced with:
fn main() {
let mut resizer = resize::new(2, 2, 4, 4, resize::Pixel::Gray8, resize::Type::Point).unwrap();
let src = vec![1u8, 0u8, 0u8, 2u8];
let mut dst = vec![0u8; 4 * 4];
resizer.resize(&src, &mut dst).unwrap();
println!("{:?}", dst);
// prints: [1, 0, 0, 0, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2]
}
I only observe this behavior for the edges of the image, the center part of the image is upscaled correctly.