Function load_image
pub fn load_image<P>(path: P) -> Result<ImageBuffer<Rgb<u8>, Vec<u8>>, Error>
Expand description
Loads an image from the given path. It tries to determine the image format based on the file extension. If the extension is “jpg” or “jpeg”, it uses the mozjpeg decoder. Otherwise, it uses the default image decoder.