Function exr::image::write::write_rgba_file

source ·
pub fn write_rgba_file<R, G, B, A>(
    path: impl AsRef<Path>,
    width: usize,
    height: usize,
    colors: impl Sync + Fn(usize, usize) -> (R, G, B, A),
) -> UnitResult
Expand description

An oversimplified function for “just write the damn file already” use cases. Have a look at the examples to see how you can write an image with more flexibility (it’s not that hard). Use write_rgb_file if you do not need an alpha channel.

Each of R, G, B and A can be either f16, f32, u32, or Sample.