pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-1819) Rendering problem with JPX image
Date Tue, 02 Oct 2018 18:06:00 GMT

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

Tilman Hausherr commented on PDFBOX-1819:

This bug can be fixed by applying this commit by Mike Bremford of bfo.com
into this project
and then build. The result has the version number 1.3.1-SNAPSHOT. See also similar comment
about different change near the end of PDFBOX-1752.

> Rendering problem with JPX image
> --------------------------------
>                 Key: PDFBOX-1819
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1819
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>         Environment: W7
>            Reporter: Tilman Hausherr
>            Priority: Major
>              Labels: JPEG2000, JPG2000, JPXFilter
>             Fix For: 2.0.0
>         Attachments: 635312-image2.jp2, 635312.pdf, 635312.pdf-1-lessbad.png, 635312.pdf-1-verybad.png
> The first page of the file 635312.pdf (of PDFBOX-1812) isn't rendered correctly. It is
made of three JPX images where the colorspace is in the PDF. (My understanding of the PDF
spec is that the values mentioned in the PDF have a higher priority) The first problem is
that BITS_PER_COMPONENT is currently set in JPXFilter based on the image colorspace (that
we don't want), and it results in a wrong bpc calculation of 8 / 3 = 2. This results in an
array difference for System.arraycopy() in PDPixelmap.
> So the solution is to move that part into the "if" branch, i.e. calculate bpc only if
the colorspace isn't already set. (Alternatively, calculate it only if bpc isn't already set)
> The images are now rendered correctly re: the shapes, but not re: the colors, which is
the second problem (and where I give up for now). Only the black pixels seem to be correct,
but not most of the grey ones except the ones in top of the sky.

This message was sent by Atlassian JIRA

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

View raw message