Function bmp::open [] [src]

pub fn open<P: AsRef<Path>>(path: P) -> BmpResult<Image>

Utility function to load an Image from the file specified by path. It uses the from_reader function internally to decode the Image. Returns a BmpResult, either containing an Image or a BmpError.

Example

let img = bmp::open("test/rgbw.bmp").unwrap_or_else(|e| {
   panic!("Failed to open: {}", e);
});