Function engiffen::load_images
[−]
[src]
pub fn load_images<P>(paths: &[P]) -> Vec<Image> where
P: AsRef<Path>,
Loads images from a list of given paths. Errors encountered while loading files are skipped.
Examples
let paths = vec!["tests/ball/ball06.bmp", "tests/ball/ball07.bmp", "tests/ball/ball08.bmp"]; let images = load_images(&paths); assert_eq!(images.len(), 2); // The last path doesn't exist. It was silently skipped.
Skips images that fail to load. If all images fail, returns an empty vector.