cosmic::iced_winit::graphics::image::image_rs

Function open

source
pub fn open<P>(path: P) -> Result<DynamicImage, ImageError>
where P: AsRef<Path>,
Expand description

Open the image located at the path specified. The image’s format is determined from the path’s file extension.

Try io::Reader for more advanced uses, including guessing the format based on the file’s content before its path.