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

Tilman Hausherr commented on PDFBOX-6151:
-----------------------------------------

Nico Weber has a list of the different viewers. We're not mentioned but it's 
nice anyway:
https://nico.github.io/jbig2-bench/

We're down to 4 failures:
threw java.lang.RuntimeException: bitmap-symbol-context-reuse.jbig2
unequal: bitmap-refine-template1-tpgron.jbig2
unequal: bitmap-symbol-symhuffrefine-textrefine.jbig2
unequal: bitmap-symbol-textrefine-customat.jbig2

4 more files are wrongly considered unequal by the code I posted here:
unequal: bitmap-composite-and-xnor-halftone.jbig2
unequal: bitmap-composite-and-xnor-refine.jbig2
unequal: bitmap-composite-and-xnor-text.jbig2
unequal: bitmap-composite-and-xnor.jbig2
However they are equal in the PDFBox rendering tests.

I believe this is because of a bug in {{Bitmap.equals()}}. That one compares 
the arrays. This includes also unused bits, which may have a 1 value. XNOR 
means that 0 xnor 0 = 1. This should also be fixed.
See also the last remark by Gunnar here: 
https://github.com/apache/pdfbox-jbig2/pull/4 where he mentions this too.


> Run serenity JBIG2 tests
> ------------------------
>
>                 Key: PDFBOX-6151
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6151
>             Project: PDFBox
>          Issue Type: Task
>          Components: JBIG2
>    Affects Versions: 3.0.4 JBIG2
>            Reporter: Tilman Hausherr
>            Priority: Minor
>
> Run the jbig2 files from the serenity tests by Nico Weber to see what happens.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to