pub fn read_image(
bytes: &[u8],
format: InputFormat,
raw: Option<RawParams>,
) -> Result<Image, CliError>Expand description
Decode bytes in the given format into an Image.
raw supplies the dimensions/layout required by InputFormat::Raw.
ยงErrors
CliError::Format if a PNG/netpbm stream is malformed, or
CliError::RawConfig if raw parameters are missing or inconsistent.