Function exr::image::write::write_rgb_file
source · pub fn write_rgb_file<R, G, B>(
path: impl AsRef<Path>,
width: usize,
height: usize,
colors: impl Sync + Fn(usize, usize) -> (R, G, B),
) -> 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
, and B
can be either f16
, f32
, u32
, or Sample
.