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

fast_transpose

Fast image and matrix transpose

6 releases

new 0.2.4 May 26, 2025
0.2.3 Jan 27, 2025
0.1.0 Nov 17, 2024

#343 in Images

Download history 555/week @ 2025-02-03 146/week @ 2025-02-10 114/week @ 2025-02-17 96/week @ 2025-02-24 81/week @ 2025-03-03 102/week @ 2025-03-10 23/week @ 2025-03-17 53/week @ 2025-03-24 18/week @ 2025-03-31 25/week @ 2025-04-07 64/week @ 2025-04-14 87/week @ 2025-04-21 49/week @ 2025-04-28 125/week @ 2025-05-05 342/week @ 2025-05-12 93/week @ 2025-05-19

614 downloads per month
Used in 4 crates (3 directly)

BSD-3-Clause OR Apache-2.0

365KB
7K 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

~140KB