Fixed error handling
This commit is contained in:
parent
804e041c20
commit
131a5cf148
@ -2,7 +2,7 @@ use image::io::Reader as ImageReader;
|
||||
|
||||
fn main() {
|
||||
println!("Converting test.webp to test.png.");
|
||||
let img_raw = ImageReader::open("test.webp").expect("Failed to load test.webp.")
|
||||
let img_raw = ImageReader::open("test.webp").expect("Failed to load test.webp.");
|
||||
let img = img_raw.decode().expect("Failed to decode the image.");
|
||||
img.save("test.png").expect("Failed to save test.png.");
|
||||
println!("Done.");
|
||||
|
Loading…
Reference in New Issue
Block a user