[
https://issues.apache.org/jira/browse/PDFBOX-2594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14271092#comment-14271092
]
Daniel Bonniot de Ruisselet commented on PDFBOX-2594:
-----------------------------------------------------
Indeed. This seems relevant
(https://github.com/levigo/jbig2-imageio#how-to-deal-with-embedded-jbig2-data):
{quote}
Several formats allow to embed JBIG2-compressed data in its own structure. PDF,
for example, supports JBIG2-compressed data and adds the ability to embed
shared data segments. Therefore the JBIG2ImageReader can handle JBIG2Globals
which are stored separately and can be passed into the reader if neccessary via
setGlobals()-method.
{quote}
This seems even more important (not just logging noise), as there seems to
possibly be some data which in in the PDF stream and not in the image, so not
passing it could alter the image returned. Unfortunately I don't know anything
more about this.
> Set default params in JBIG2Filter
> ---------------------------------
>
> Key: PDFBOX-2594
> URL: https://issues.apache.org/jira/browse/PDFBOX-2594
> Project: PDFBox
> Issue Type: Improvement
> Components: Rendering
> Affects Versions: 1.8.8, 1.8.9, 2.0.0
> Reporter: Daniel Bonniot de Ruisselet
> Assignee: Tilman Hausherr
> Labels: JBIG2
> Fix For: 1.8.9, 2.0.0
>
>
> Currently JBIG2Filter does not set read params. This causes noise because
> jbig2-imageio logs this before using default params (e.g. see this
> [comment|https://issues.apache.org/jira/browse/PDFBOX-2112?focusedCommentId=14018039&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14018039]).
> This patch explicitly uses the default params, which would solve that:
> {noformat}
> Index: pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java
> ===================================================================
> --- pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java
> (revision 1650041)
> +++ pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java
> (working copy)
> @@ -85,7 +85,7 @@
> BufferedImage image;
> try
> {
> - image = reader.read(0);
> + image = reader.read(0, reader.getDefaultReadParam());
> }
> catch (Exception e)
> {
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)