Skip to content

TIKA-4776: Add regression test for Apple maker note LONG8 tags - #2981

Merged
THausherr merged 3 commits into
apache:mainfrom
dschmidt:heic-long8-regression
Jul 31, 2026
Merged

TIKA-4776: Add regression test for Apple maker note LONG8 tags#2981
THausherr merged 3 commits into
apache:mainfrom
dschmidt:heic-long8-regression

Conversation

@dschmidt

Copy link
Copy Markdown
Contributor

With metadata-extractor 2.21.0 on main the Apple maker note tags written as LONG8 (TIFF format code 16) come through, so this adds the regression test discussed in the ticket. The fixture is the still half of a real Apple Live Photo (iPhone 15 Pro, iOS 18.5) from the MIT licensed osxphotos test suite; the test asserts the content identifier and the Live Photo ID (maker note tag 0x0017, value 5283876), which metadata-extractor 2.20.0 silently dropped. With this in place TIKA-4776 can be resolved.

metadata-extractor 2.21.0 (already bumped on main) decodes the LONG8
and SLONG8 TIFF format codes, so the Apple maker note tags written as
LONG8 reach Tika now. The fixture is the still half of a real Apple
Live Photo (iPhone 15 Pro, iOS 18.5) from the MIT licensed osxphotos
test suite; the test pins the content identifier and the Live Photo ID
(maker note tag 0x0017), which was dropped with metadata-extractor
2.20.0.
@THausherr

THausherr commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Would it be possible to create a smaller file? Yours has a 1 MB size.

Replace the full 1379953 byte iPhone photo with a 3203 byte HEIC that
repackages the unmodified EXIF item (including the Apple maker note
with the LONG8 tag 0x0017) into a minimal container. The picture item
data is replaced by filler bytes; the asserted values still come from
the original EXIF bytes.
@dschmidt

Copy link
Copy Markdown
Contributor Author

Good point. The fixture is now 3.2 KB instead of 1.4 MB: the real EXIF payload (including the Apple maker note with the LONG8 tag, byte for byte from the original photo) repackaged into a minimal HEIC container, so the regression still exercises the real-world bytes without shipping the full image.

@dschmidt
dschmidt force-pushed the heic-long8-regression branch from 63fbb9c to 926a073 Compare July 30, 2026 19:12
@dschmidt

Copy link
Copy Markdown
Contributor Author

The CI failure is unrelated to the change: both jobs died within a minute while Maven resolved the nisse build extension from Central (transient repository hiccup, nothing was compiled yet). Could someone with the permissions restart the failed jobs?

@tballison

tballison commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Mea culpa. I broke main. Merge conflict without warning. Fixing now.

#2985

@dschmidt

Copy link
Copy Markdown
Contributor Author

Thanks :)

@tballison

Copy link
Copy Markdown
Contributor

Main should be working again. Please merge and see what happens.

@dschmidt

Copy link
Copy Markdown
Contributor Author

done :)

@dschmidt

Copy link
Copy Markdown
Contributor Author

CI is green :)

@THausherr
THausherr merged commit 5c2039e into apache:main Jul 31, 2026
6 checks passed
asf-gitbox-commits pushed a commit that referenced this pull request Jul 31, 2026
* [TIKA-4776] Add regression test for Apple maker note LONG8 tags

metadata-extractor 2.21.0 (already bumped on main) decodes the LONG8
and SLONG8 TIFF format codes, so the Apple maker note tags written as
LONG8 reach Tika now. The fixture is the still half of a real Apple
Live Photo (iPhone 15 Pro, iOS 18.5) from the MIT licensed osxphotos
test suite; the test pins the content identifier and the Live Photo ID
(maker note tag 0x0017), which was dropped with metadata-extractor
2.20.0.

* [TIKA-4776] Shrink the fixture to the real EXIF payload

Replace the full 1379953 byte iPhone photo with a 3203 byte HEIC that
repackages the unmodified EXIF item (including the Apple maker note
with the LONG8 tag 0x0017) into a minimal container. The picture item
data is replaced by filler bytes; the asserted values still come from
the original EXIF bytes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants