forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'simplify/b13' into simplify/w1a

Browse files at this commit

b0606029c542082b7676d10f23dcf8d7855b6d39Ahmet Kaan GümüşParent: 4b2a8448f9f453
crates/ec-image/src/tiff.rsmodified+1 -2
@@ -340,8 +340,7 @@ pub fn info(data: &[u8]) -> Result<Info> {
340 format: ImageFormat::Tiff,340 format: ImageFormat::Tiff,
341 width: layout.width,341 width: layout.width,
342 height: layout.height,342 height: layout.height,
343- // Not read: TIFF orientation lives in the first directory, which `layout` does not keep.343+ orientation: layout.orientation.unwrap_or(1),
344- orientation: 1,
345 })344 })
346 }345 }
347 346
crates/ec-image/tests/it/gaps.rsmodified+10 -0
@@ -414,3 +414,13 @@ fn probing_arbitrary_mutations_never_panics() {
414 }414 }
415 }415 }
416 }416 }
417+
418+#[test]
419+fn tiff_info_reports_the_ifd0_orientation() {
420+ for o in 1..=8u16 {
421+ assert_eq!(
422+ ec_image::info(&tiff(o, false)).unwrap().orientation,
423+ o as u8
424+ );
425+ }
426+}