fix: resolve comments

This commit is contained in:
陈启 committed 2026-07-03 17:19:48 +08:00
1 parent c7a1176381
commit 1c6001ea5d
5 files changed
+18 -251

No files matched your search

+3 -2
View File
@@ -16,8 +16,9 @@ macro_rules! test_image_sum {
fn $name(file: &str, expected_type: ColorType, expected_sum: $sum_ty) {
let path = PathBuf::from(TEST_IMAGE_DIR).join(file);
let img_file = File::open(path).expect("Cannot find test image!");
let mut decoder =
Decoder::open_with_options(img_file, true).expect("Cannot create decoder");
let mut decoder = Decoder::open(img_file)
.expect("Cannot create decoder")
.with_lenient(true);
decoder.next_image().expect("Cannot read image IFD");
assert_eq!(decoder.colortype().unwrap(), expected_type);