[ 
https://issues.apache.org/jira/browse/TIKA-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137990#comment-18137990
 ] 

ASF GitHub Bot commented on TIKA-5033:
--------------------------------------

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
   




> PSD: emit the embedded thumbnail (image resource 1036)
> ------------------------------------------------------
>
>                 Key: TIKA-5033
>                 URL: https://issues.apache.org/jira/browse/TIKA-5033
>             Project: Tika
>          Issue Type: Improvement
>          Components: parser
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> Photoshop files carry a JPEG thumbnail in image resource 0x040C (1036). 
> PSDParser already reads the image resources for metadata; emitting this one 
> as THUMBNAIL gives PSD a preview without rendering the layers.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to