Function nokhwa::utils::buf_mjpeg_to_rgb
source · pub fn buf_mjpeg_to_rgb(
data: &[u8],
dest: &mut [u8],
rgba: bool
) -> Result<(), NokhwaError>
Available on crate feature
mjpeg
only.Expand description
Equivalent to mjpeg_to_rgb
except with a destination buffer.
Errors
If the decoding fails (e.g. invalid MJPEG stream), the buffer is not large enough, or you are doing this on WebAssembly
, this will error.