Function convert_image::convert_owned
source · pub fn convert_owned<OWNED, SRC, DEST>(
frame: OWNED
) -> Result<impl ImageStride<DEST>, Error>
Expand description
Convert input frame with pixel_format SRC
into pixel_format DEST
This is a general purpose function which should be able to convert between many types as efficiently as possible. In case no data needs to be copied, no data is copied.
For a version which converts into a pre-allocated buffer, use convert_into
(which will copy the image even if the format remains unchanged).