| Crates.io | pic-scale-safe |
| lib.rs | pic-scale-safe |
| version | 0.1.6 |
| created_at | 2024-10-17 22:29:49.318137+00 |
| updated_at | 2026-01-09 15:45:05.701138+00 |
| description | Fast and safe performance image scaling |
| homepage | https://github.com/awxkee/pic-scale-safe |
| repository | https://github.com/awxkee/pic-scale-safe |
| max_upload_size | |
| id | 1413671 |
| size | 309,028 |
This crate provides zero unsafe fast rescaling.
let img = ImageReader::open("./assets/nasa-4928x3279.png")
.unwrap()
.decode()
.unwrap();
let dimensions = img.dimensions();
let transient = img.to_rgb8();
let src_size = ImageSize::new(dimensions.0 as usize, dimensions.1 as usize);
let dst_size = ImageSize::new(dimensions.0 as usize / 4, dimensions.1 as usize / 4);
let resized = resize_rgb8(&transient, src_size, dst_size,
ResamplingFunction::Lanczos3).unwrap();
This project is licensed under either of
at your option.