You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/05/21 06:27:00 UTC

[jira] [Commented] (PDFBOX-5137) Wrong classification of an JPEG image leading to a blank image added to a pdf document

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

ASF subversion and git services commented on PDFBOX-5137:
---------------------------------------------------------

Commit 1890059 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1890059 ]

PDFBOX-5196, PDFBOX-5137: use numFrameComponents instead of numScanComponents to get component count, as suggested by Matej Risek and Stéphane Vallée; closes #110

> Wrong classification of an JPEG image leading to a blank image added to a pdf document
> --------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-5137
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5137
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.23
>            Reporter: Matej Risek
>            Priority: Minor
>             Fix For: 2.0.24, 3.0.0 PDFBox
>
>
> According to [https://docs.oracle.com/javase/8/docs/api/javax/imageio/metadata/doc-files/jpeg_metadata.html] the number of image components should be read from the markerSequence/sof/@numFrameComponents if you want to retrieve the number of the whole image.
> At the moment the number is being read from the first {{Start Of Scan marker segment}} (sos) xPath encounters which in our case lead to the wrong classification of an image as a Grayscale instead of RGB resulting in a blank image added to the final PDF document.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org