pub fn bgra_to_rgba_in_place(buf: &mut [u8])Expand description
Swaps R and B channels in-place (BGRA to RGBA).
A trailing slice shorter than four bytes is left unchanged.
ยงExamples
use ailloli_ui_render_wgpu::capture::bgra_to_rgba_in_place;
let mut bytes = [10, 20, 30, 255, 9];
bgra_to_rgba_in_place(&mut bytes);
assert_eq!(bytes, [30, 20, 10, 255, 9]);