Add Decoder::open, deprecate new

This commit is contained in:
A. Molzer committed 2026-03-06 09:31:23 +01:00
1 parent be9b3a04b9
commit bf79af8de4
16 files changed
+176 -108

No files matched your search

+3 -1
View File
@@ -15,7 +15,9 @@ fn test_big_tiff() {
for filename in filenames.iter() {
let path = PathBuf::from(TEST_IMAGE_DIR).join(filename);
let img_file = File::open(path).expect("Cannot find test image!");
let mut decoder = Decoder::new(img_file).expect("Cannot create decoder");
let mut decoder = Decoder::open(img_file).expect("Cannot create decoder");
decoder.next_image().expect("Cannot read image");
assert_eq!(
decoder.dimensions().expect("Cannot get dimensions"),
(64, 64)