Type Definition exr::block::lines::LineRefMut
source · pub type LineRefMut<'s> = LineSlice<&'s mut [u8]>;
Expand description
A reference to a single mutable line of pixels. May go across the whole image or just a tile section of it.
This line contains a mutable slice that all samples will be written to.
Implementations§
source§impl<'s> LineRefMut<'s>
impl<'s> LineRefMut<'s>
sourcepub fn write_samples_from_slice<T: Data>(self, slice: &[T]) -> UnitResult
pub fn write_samples_from_slice<T: Data>(self, slice: &[T]) -> UnitResult
Writes the samples (f16, f32, u32 values) into this line value reference.
Use write_samples
if there is not slice available.
sourcepub fn write_samples<T: Data>(
self,
get_sample: impl FnMut(usize) -> T
) -> UnitResult
pub fn write_samples<T: Data>( self, get_sample: impl FnMut(usize) -> T ) -> UnitResult
Iterate over all samples in this line, from left to right.
The supplied get_line
function returns the sample value
for a given sample index within the line,
which starts at zero for each individual line.
Use write_samples_from_slice
if you already have a slice of samples.