pub fn from_file<T: AsRef<Path>>(path: T) -> Result<Option<Type>>
Open file and try to determine if it is an image.
Available only with std
feature (enabled by default).
This function will return an Err(std::io::Error)
if file is inaccessible or can't be read.
let result = imghdr::from_file("./tests/images/example.jpg");
println!("{:#?}", result);