oa::render::save_texture_file

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.

FnRust public API

Function Documentation

pub fn save_texture_file( texture: &Texture, path: impl AsRef<Path>, quality: u32, ) -> Result<()>
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.