[
https://issues.apache.org/jira/browse/PDFBOX-5738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17797216#comment-17797216
]
Harald Kuhr commented on PDFBOX-5738:
-------------------------------------
Hi,
Quick summary from TwelveMonkeys/issues/878 (where the sample file is the
"gre_research..." one):
This sample file has an APP14/Adobe marker specifying YCCK, however the "Adobe"
string is followed by a {{0x01}} "Start of Header" character instead of the
normal NULL-termination {{{}0x00{}}}... So we don't really see it as an Adobe
marker but an "Adobe\0x01" custom marker that we ignore...
We could probably change the identifier parsing to stop at the first ASCII
control character (<= 0x20) instead of the NULL only. But I'm not sure the
sample file is strictly correct...
For the other file ("Rechnung...jpg", only attached here) there's really only
the component ids to work from (no other markers to say anything about the
color space)... Unless there's something in the container PDF stream that says
anything, we just have to guess. TwelveMonkeys recognize this (component ids 1,
2, 3, 4) in standalone JPEG files as YCbCrA/RGBA for backwards compatibility,
other applications might think it is CMYK. Neither of these seems to match what
is rendered in the PDF on MacOS.
> Wrong colors in PDF since PDFBOX-5488
> -------------------------------------
>
> Key: PDFBOX-5738
> URL: https://issues.apache.org/jira/browse/PDFBOX-5738
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Reporter: Oliver Schmidtmer
> Priority: Major
> Attachments: Rechnung 983312924 (Carbafas)_page1.jpg, Rechnung
> 983312924 (Carbagas).pdf, gre_research_validiity_data_page1.jpg
>
>
> Since the workaround for PDFBOX-5488, the attached PDF has wrong colors.
> The base issue from PDFBOX-5488 might be a difference between the reported
> color space from the metadata-tree for the user and the raw pixel data when
> readRaster is used, at least if I understand this correctly:
> [https://github.com/haraldk/TwelveMonkeys/issues/571]
> For the default JPEG Image Reader this is not a problem, as
> reader.getImageMetadata throws an Exception "javax.imageio.IIOException: JFIF
> APP0 must be first marker after SOI" and "getAdobeTransformByBruteForce" is
> used instead of "getAdobeTransform".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]