pub fn decode(reader: &mut dyn Read) -> Result<RawImage, RawLoaderError>
Expand description

Take a readable source and return a decoded image or an error

Example

let mut file = match File::open(path).unwrap();
let image = match rawloader::decode(&mut file) {
  Ok(val) => val,
  Err(e) => ... some appropriate action when the file is unreadable ...
};