The Rust Programming Language Forum
Converting a BGRA &[u8] to RGB [u8;N] (for images)?
help
quinedot
November 26, 2021, 6:46pm
9
Here's a couple approaches
using
chunks_exact
(one allocating, one not).
3 Likes
show post in topic
Related topics
Topic
Replies
Views
Activity
The fastest way to copy a buffer (BGRA to RGBA)
12
467
June 5, 2025
Image Cargo: Quick way to convert ImageBuffer<Rgba<u8>,Vec<u8>> to ImageBuffer<Rgb<u8>,Vec<u8>>
5
5529
May 18, 2021
How to convert &[i8] to &[u8]?
20
19053
July 29, 2022
Safe way to convert Vec<u8> of len n*4 to a Vec<Rgba> of len n
5
1270
March 24, 2020
Port Cpp code to Rust
help
16
836
December 14, 2020