Fast and safe image scaling (forked from awxkee/pic-scale-safe)
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Radzivon Bartoshyk f668dec42e
Some checks failed
Build / Build (push) Has been cancelled
Mirror to GitLab and Codeberg / mirror (push) Has been cancelled
Merge pull request #16 from awxkee/dev4_26
Improvements
2026-04-14 21:54:12 +01:00
.cargo Rework for x86 2024-10-16 22:53:26 +01:00
.github CI update 2026-04-04 16:32:32 +01:00
app Improvements 2026-04-14 21:20:32 +01:00
assets Initial commit 2024-10-16 17:49:56 +01:00
src Improvements 2026-04-14 21:20:32 +01:00
.gitignore Remove redundant code 2026-02-28 12:20:48 +00:00
Cargo.lock Remove superfluous code 2026-02-28 14:24:24 +00:00
Cargo.toml Remove superfluous code 2026-02-28 14:24:24 +00:00
command.ps1 Bench updates for x86 2024-10-26 14:45:59 +01:00
LICENSE-APACHE.md Initial commit 2024-10-16 17:49:56 +01:00
LICENSE.md Initial commit 2024-10-16 17:49:56 +01:00
README.md Remove outdated benchmarks 2025-11-19 12:11:51 +00:00

Fast and safe image scaling in Rust

This crate provides zero unsafe fast rescaling.

Example

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

  • BSD-3-Clause License (see LICENSE)
  • Apache License, Version 2.0 (see LICENSE)

at your option.