[
https://issues.apache.org/jira/browse/PDFBOX-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791967#comment-16791967
]
Pete Nattress commented on PDFBOX-4484:
---------------------------------------
[~tilman] many thanks for the quick response. I just grabbed the snapshot
(pdfbox-app-2.0.15-20190313.175823-53.jar) and ran it against the test file.
The image looks almost correct now, but I notice there's still the "premature
EOF" warning in stdout and there appears to be a one pixel black line at the
very bottom of the image which isn't there when subsampling is disabled (see
new attachment). I wonder if this is related or maybe a separate issue?
> Some JBIG2 images are corrupted when subsampling is enabled
> -----------------------------------------------------------
>
> Key: PDFBOX-4484
> URL: https://issues.apache.org/jira/browse/PDFBOX-4484
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.9, 2.0.10, 2.0.11, 2.0.12, 2.0.14
> Reporter: Pete Nattress
> Assignee: Tilman Hausherr
> Priority: Major
> Labels: sideeffect
> Fix For: 2.0.15
>
> Attachments: test-jbig2.pdf, test-jbig21-fixed-subsampling.jpg,
> test-jbig21-no-subsampling.jpg, test-jbig21-subsampling.jpg
>
>
> We have observed problems when rendering some PDFs containing JBIG2 images if
> the subsampling option is enabled.
> It is possible to reproduce this with the file I have attached using the CLI:
> {code:java}
> $ java -jar pdfbox-app-2.0.14.jar PDFToImage -subsampling test-jbig2.pdf
> Mar 12, 2019 3:17:09 PM
> org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader from1Bit
> WARNING: premature EOF, image will be incomplete
> {code}
> In the output, the extracted image is distorted and has incorrect dimensions.
> This does not appear to affect all JBIG2 images, for instance the file
> "ItDoesntWorkScan.pdf" attached to PDFBOX-1067 contains a JBIG2 image and is
> rendered correctly with the above code. PDFs containing images encoded with
> algorithms other than JBIG2 also appear to be OK, although I haven't tested
> this exhaustively.
> We have worked around this problem for now by disabling the subsampling
> option.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]