| Crates.io | magnify |
| lib.rs | magnify |
| version | 0.2.0 |
| created_at | 2023-07-03 12:34:40.127972+00 |
| updated_at | 2024-08-07 11:08:19.607703+00 |
| description | Simple pixel-art scaling algorithms |
| homepage | |
| repository | https://github.com/ahi6/magnify-rs |
| max_upload_size | |
| id | 906961 |
| size | 24,403 |
This is a rust library implementing some simple Pixel-art scaling algorithms.
This code scales image.bmp using the Scale3X algorithms and then saves the result into converted.bmp.
use image::ImageReader;
use magnify::Algorithm;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let img = ImageReader::open("image.bmp")?.decode()?;
let converted_img = magnify::convert(img, Algorithm::Scale3X);
converted_img.save("converted.bmp")?;
Ok(())
}