RFR: 8160327: Support for thumbnails present in APP1 marker for JPEG
Jeremy
duke at openjdk.org
Wed Jan 1 21:43:27 UTC 2025
This adds support for parsing thumbnails in an APP1 Exif marker.
This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)
-------------
Commit messages:
- 8160327: removed unused field
- 8160327: fixing typo in comment
- 8160327: if thumbnailLength == 0, we don't have a thumbnail
- 8160327: avoid ArrayIndexOutOfBoundsE for unknown data format
- 8160327: support malformed IFD
- 8160327: wrap LocaleDateTime.parse in try/catch
- 8160327: clarifying comment
- 8160327: adding a new test case where the timestamp is "0000:00..."
- 8160327: adding a new test case where `compression` = 0x60000
- 8160327: updating test to include "ImageCreationTime"
- ... and 7 more: https://git.openjdk.org/jdk/compare/f7f2b42e...05ee149c
Changes: https://git.openjdk.org/jdk/pull/22898/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22898&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8160327
Stats: 658 lines in 11 files changed: 654 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/22898.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22898/head:pull/22898
PR: https://git.openjdk.org/jdk/pull/22898
More information about the client-libs-dev
mailing list