Preserve legacy WebP EXIF orientation

This commit is contained in:
Dylan M. Taylor committed 2026-11-15 17:14:48 +00:00
1 parent be2587a7fb
commit e3712dd643
1 file changed
+1 -1
+1 -1
View File
@@ -26,7 +26,7 @@ pub fn header(bytes: &[u8]) -> Result<(u32, u32, u16), CodecError> {
return Err(err("no image data"));
}
let (w, h) = crate::probe_size(bytes)?;
let orientation = exif.map_or(1, crate::exif_orientation);
let orientation = exif.map_or(1, craft_metadata::compat_orientation::orientation);
let (w, h) = if (5..=8).contains(&orientation) { (h, w) } else { (w, h) };
Ok((w, h, orientation))
}