Fix deprecation warnings
This commit is contained in:
parent
e7f8bc5766
commit
43853c8fda
1 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ use std::{
|
|||
};
|
||||
|
||||
use clap::Parser;
|
||||
use image::{ImageFormat, RgbaImage};
|
||||
use image::{ImageFormat, ImageReader, RgbaImage};
|
||||
use mark::{
|
||||
bw,
|
||||
dither::{
|
||||
|
|
@ -252,7 +252,7 @@ struct Args {
|
|||
fn load_image(r#in: &Option<PathBuf>) -> RgbaImage {
|
||||
if let Some(path) = r#in {
|
||||
eprintln!("Loading image from {}", path.display());
|
||||
image::io::Reader::open(path)
|
||||
ImageReader::open(path)
|
||||
.expect("failed to load image from file")
|
||||
.decode()
|
||||
.expect("failed to decode image data")
|
||||
|
|
@ -262,7 +262,7 @@ fn load_image(r#in: &Option<PathBuf>) -> RgbaImage {
|
|||
std::io::stdin()
|
||||
.read_to_end(&mut buf)
|
||||
.expect("failed to read stdin");
|
||||
image::io::Reader::new(Cursor::new(buf))
|
||||
ImageReader::new(Cursor::new(buf))
|
||||
.with_guessed_format()
|
||||
.expect("failed to guess image format")
|
||||
.decode()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue