Fast and simple image rotating in Rust with flipping and flopping in-place and rotating by 180 degrees.
- Reflection across vertical axis (
flip_*functions) - Reflection across horizontal axis (
flop_*functions) - Rotation by 90 degrees counter-clockwise (
transpose_*functions withFlipMode::NoFlipandFlopMode::NoFlop) - Rotation by 180 degrees (
rotate180_*functions) - Rotation by 270 degrees counter-clockwise (
transpose_*functions withFlipMode::FlipandFlopMode::Flop)
cargo add fast_transposetranspose_rgb(
&img,
&mut transposed,
dimensions.0 as usize,
dimensions.1 as usize,
FlipMode::NoFlip,
FlopMode::NoFlop,
)
.unwrap();Turning off unsafe feature will activate forbid unsafe mode.
This project is licensed under either of
at your option.