[−][src]Function rawloader::decode
pub fn decode(reader: &mut dyn Read) -> Result<RawImage, RawLoaderError>
Take a readable source and return a decoded image or an error
Example
ⓘThis example is not tested
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 ... };