Skip to main content

save_to_disk

Function save_to_disk 

Source
pub fn save_to_disk(
    path: impl AsRef<Path>,
) -> impl FnMut(On<'_, '_, ScreenshotCaptured>)
Expand description

Saves the captured screenshot to disk at the provided path.

A screenshot of an 8-bit render target saves to any format image supports. A screenshot of an Rgba16Float or Rgba32Float render target, for example an Hdr camera rendering to an Image, holds values outside 0..=1. Those are kept in .exr and .hdr. Any other format clips to 0..=1 and converts to 8-bit sRGB, with a warning. .exr needs the exr cargo feature.