avir-rs

Crates.ioavir-rs
lib.rsavir-rs
version0.1.1
sourcesrc
created_at2023-07-15 03:31:47.068327
updated_at2024-06-14 02:05:47.165392
descriptionRust bindings for avir, a SIMD image resizing / scaling library
homepagehttps://github.com/riidefi/RiiStudio/tree/master/source/avir-rs
repositoryhttps://github.com/riidefi/RiiStudio
max_upload_size
id916952
size240,719
(riidefi)

documentation

README

avir-rs

avir-rs: Rust bindings for avir, a SIMD image resizing / scaling library.

Usage

Rust

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);

C/C++

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.

License

This library is published under MIT.

Uses avir.

Commit count: 1865

cargo fmt