On Thu, 2 Jan 2025 06:49:19 GMT, Jeremy <d...@openjdk.org> wrote:

>> 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.)
>
> Jeremy has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   8160327: fixing typo so `thumbnailPos` can be zero
>   
>   The `thumbnailLength` cannot be zero, but the position can be.

Thanks; something came up this weekend and didn't get a chance to work on it. 
I'm excited this ticket suddenly got interest and will definitely look into as 
time permits.

@bplb when it comes to EXIF vs JFIF: aside from code simplicity, I initially 
didn't support *both* JFIF and EXIF thumbnails because I read that the two were 
technically incompatible. (Here's one such explanation: 
https://superuser.com/questions/1657522/what-makes-two-main-jpeg-file-formats-jfif-and-exif-incompatible
 ). You sound like the subject matter expert here: it sounds like you're 
confident there's enough real-world use cases to justify supporting both, right?

I agree it shouldn't be hard to do, but I just wanted to acknowledge the specs 
in this thread before implementing it.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2667053496

Reply via email to