fix(tiff): keep test directory alive while checking borrowed ICC bytes

This commit is contained in:
Dylan M. Taylor
2026-11-14 23:25:19 +00:00
parent db05483915
commit 1e1100a9ed
+2 -1
View File
@@ -126,7 +126,8 @@ fn resolution_tags_and_the_profile() {
for model in ColorModel::ALL {
let src = if model == ColorModel::Cmyk { vec![0; 64] } else { px.clone() };
let file = t::encode_samples(&src, 4, 4, 72.0, &TiffOptions { embed_icc: true, ..opts(model) }).unwrap();
let icc = ifd0(&file).bytes(tags::ICC_PROFILE).unwrap();
let ifd = ifd0(&file);
let icc = ifd.bytes(tags::ICC_PROFILE).unwrap();
assert_eq!(&icc[36..40], b"acsp", "{model:?}: an ICC profile");
let space: &[u8; 4] = match model {
ColorModel::Rgb => b"RGB ",