#data #array #multi-dimensional #row-major

fast_transpose

Fast image and matrix transpose

5 releases

0.2.3 Jan 27, 2025
0.2.2 Jan 16, 2025
0.2.1 Jan 13, 2025
0.2.0 Jan 12, 2025
0.1.0 Nov 17, 2024

#430 in Images

Download history 42/week @ 2024-11-19 13/week @ 2024-11-26 9/week @ 2024-12-03 51/week @ 2024-12-10 2/week @ 2024-12-17 173/week @ 2025-01-07 576/week @ 2025-01-14 570/week @ 2025-01-21 1084/week @ 2025-01-28 339/week @ 2025-02-04 158/week @ 2025-02-11 91/week @ 2025-02-18 100/week @ 2025-02-25 89/week @ 2025-03-04

457 downloads per month
Used in 3 crates (2 directly)

BSD-3-Clause OR Apache-2.0

320KB
6K SLoC

Fast image transpose

Fast and simple image rotating in Rust with flipping and flopping in-place and rotating by 180.

Supports:

  • Flipping ( Horizontal Mirror )
  • Flopping ( Vertical Mirror )
  • Transposing ( Rotate by 90 )
  • Rotate by 180
  • Rotate by 270

Adding to project

cargo add fast_transpose

Transpose RGB image

transpose_rgb(
    &img,
    &mut transposed,
    dimensions.0 as usize,
    dimensions.1 as usize,
    FlipMode::NoFlip,
    FlopMode::NoFlop,
)
.unwrap();

Features

Turning off unsafe feature will activate forbid unsafe mode.

This project is licensed under either of

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

at your option.

Dependencies

~145KB