force_pixel_format_ref

Function force_pixel_format_ref 

Source
pub fn force_pixel_format_ref<FMT1, FMT2>(
    frame: &dyn HasRowChunksExact<FMT1>,
) -> ImageRef<'_, FMT2>
where FMT2: PixelFormat,
Expand description

Force interpretation of data from frame into another pixel_format.

This makes a view of the original data and does not perform conversion of the underlying data, but rather changes only the rust type. See force_pixel_format for a function which consumes the original data and moves it into the output.

For a mutable version of this function, see [force_pixel_format_ref_mut].