pub fn from_path<P: AsRef<Path> + std::fmt::Debug + Clone>(path: P) -> Result<Self, String> {
        let img = image::open(path.clone());

        if let Ok(img) = img {
            return Self::from_rgba_image(img.to_rgba8());
        }

        Err(format!("Could not load image width path: {:?}", path))
    }
/// Load an image from file path. Supports BMP and PNG
Load an image from file path. Supports BMP and PNG
Load an image from file path . Supports BMP and PNG
pub fn from_path<P: AsRef<Path> + std::fmt::Debug + Clone>(path: P) -> Result<Self, String> {
        let img = image::open(path.clone());
        if let Ok(img) = img {
            return Self::from_rgba_image(img.to_rgba8());
        }
        Err(format!("Could not load image width path: {:?}", path))
    }
pub fn from_path < P : AsRef < Path > + std :: fmt :: Debug + Clone > ( path : P ) -> Result < Self , String > { let img = image :: open ( path . clone ( ) ) ; if let Ok ( img ) = img { return Self :: from_rgba_image ( img . to_rgba8 ( ) ) ; } Err ( format ! ( " " path ) ) }
Load an image from file path.
Load an image from file path .
path
P