Skip to main content

save_texture_file

Function save_texture_file 

Source
pub fn save_texture_file(
    texture: &Texture,
    path: impl AsRef<Path>,
    quality: u32,
) -> Result<()>
Expand description

Read and save one packed RGBA8 Texture using its path extension.

Supported extensions are .jpg, .jpeg, .png, .webp, .bmp, and .tga. This is an explicit blocking readback and filesystem boundary.

ยงErrors

Returns an error for unsupported paths, failed device observation, codec failure, or filesystem failure.