pub fn save_image(
filename: &str,
data: &[u8],
width: u32,
height: u32,
) -> Result<(), ScreenshotError>Expand description
Saves raw BGRA pixel data to an image file.
§Arguments
filename- Output filename (supports .png, .jpg, .jpeg)data- Raw BGRA pixel data (4 bytes per pixel, as from wgpuBgra8UnormSrgbformat)width- Image width in pixelsheight- Image height in pixels
§Errors
Returns an error if the file cannot be written or format is unsupported.