fn write_bgra_as_png(
path: &Path,
bgra: &[u8],
width: u32,
height: u32,
) -> Result<(), String>Expand description
Encode + write BGRA bytes as a PNG. Splits the BGRA→RGBA byte swap from the encode call so the swap itself is unit-testable.