dschmidt opened a new pull request, #3528:
URL: https://github.com/apache/tika/pull/3528

   Photoshop stores a JPEG thumbnail in image resource 0x040C. PSDParser 
already had the resource id as a constant but never read it, so 
`/unpack/preset/thumbnail` had nothing to serve for a PSD.
   
   The parser now captures that resource and, when its header says JPEG (format 
1), the compressed size fits the resource and the data starts with a JPEG SOI, 
emits the JPEG behind the 28-byte header as the `THUMBNAIL` embedded document. 
Anything else is ignored. A thumbnail resource over `maxDataLengthBytes` is 
skipped instead of failing the parse, so a file that parses today keeps 
parsing. The raw BGR thumbnail of Photoshop 4.0 (0x0409) is left out.
   
   Tests: `testPSD2.psd` and `testPSD_xmp.psd` (both carry 0x040C) emit one 
JPEG `THUMBNAIL`, `testPSD.psd` (none) emits nothing. CHANGES entry added.
   
   https://issues.apache.org/jira/browse/TIKA-5033
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to