Image resampling library in pure Rust.
```rust use resize::Pixel::RGB8; use resize::Type::Lanczos3;
// Downscale by 2x.
let (w1, h1) = (640, 480);
let (w2, h2) = (320, 240);
// Don't forget to fill src
with image data (RGB8).
// This requires Vecsrc
or dst
.
resizer.resize(&src, &mut dst);
```
See API documentation for overview of all available methods. See also this example.
Read this and this great articles on image resizing technics and resampling filters. Tldr; (with built-in filters of this library) use Lanczos3
for downscaling, use Mitchell
for upscaling. You may also want to downscale in linear colorspace (but not upscale). Gamma correction routines currently not included to the library, but actually quite simple to accomplish manually, see here for some basic theory.