[
https://issues.apache.org/jira/browse/PDFBOX-6154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18054353#comment-18054353
]
Tilman Hausherr edited comment on PDFBOX-6154 at 1/30/26 7:41 AM:
------------------------------------------------------------------
The specification doesn't clearly explain what to do with the HSKIP bitmap,
however it links it to GSKIP, and later to SKIP, and later to USESKIP. And that
one is found (inactive / not implemented) in the code in GenericRegion.java.
The commented code there isn't helpful. We have to get into deep down in
{{decodeLine()}} and {{decodeTemplateXX()}} and find the places where the bits
are computed, and then skip single bits instead of reading. I did this and the
IndexOutOfBoundsException were gone, however some of the bitmaps gathered look
like trash, and the final result image is empty.
Update: they may not be trash after all. Their shape reminds somewhat of the
(expected) final image, and these bitmaps are meant to be combined as shown on
page 132 / Figure H.10 of the specification. It's still unclear why the final
result image is empty.
was (Author: tilman):
The specification doesn't clearly explain what to do with the HSKIP bitmap,
however it links it to GSKIP, and later to SKIP, and later to USESKIP. And that
one is found (inactive / not implemented) in the code in GenericRegion.java.
The commented code there isn't helpful. We have to get into deep down in
{{decodeLine()}} and {{decodeTemplateXX()}} and find the places where the bits
are computed, and then skip single bits instead of reading. I did this and the
IndexOutOfBoundsException were gone, however some of the bitmaps gathered look
like trash, and the final result image is empty.
> HENABLESKIP isn't supported
> ---------------------------
>
> Key: PDFBOX-6154
> URL: https://issues.apache.org/jira/browse/PDFBOX-6154
> Project: PDFBox
> Issue Type: Sub-task
> Components: JBIG2
> Affects Versions: 3.0.4 JBIG2
> Reporter: Tilman Hausherr
> Priority: Minor
> Attachments: 1769433802492.png
>
>
> This is described in "6.6.5.1 Computing HSKIP". I managed to implement the
> bitmap but not yet to do anything with it. Until this is fully implemented we
> should throw an IOException instead of letting an IOOB happen.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]