Crates.io | avir-rs |
lib.rs | avir-rs |
version | 0.1.1 |
source | src |
created_at | 2023-07-15 03:31:47.068327 |
updated_at | 2024-06-14 02:05:47.165392 |
description | Rust bindings for avir, a SIMD image resizing / scaling library |
homepage | https://github.com/riidefi/RiiStudio/tree/master/source/avir-rs |
repository | https://github.com/riidefi/RiiStudio |
max_upload_size | |
id | 916952 |
size | 240,719 |
avir-rs: Rust bindings for avir, a SIMD image resizing / scaling library.
The following snippet demonstrates how to downscale an image using a fast Lanczos algorithm:
let mut dst = vec![0; dst_len];
let src = vec![0; src_len];
librii::clancir_resize(&mut dst, width / 2, height / 2, &src, width, height);
The library provides C bindings, making it useful in both Rust and C/C++ based projects.
#include "avir_rs.h"
unsigned char dst[dst_len];
unsigned char src[src_len];
clancir_resize(dst, sizeof(dst), width / 2, height / 2, src, sizeof(src), width, height);
The relevant header is available in include/avir_rs.h
.
This library is published under MIT.
Uses avir.