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

Tilman Hausherr commented on PDFBOX-6199:
-----------------------------------------

This is how it looks currently:

!image-2026-04-28-12-27-28-955.png!

I asked copilot about this. Besides advice that are not relevant IMHO, it 
suggested to move the "grReferenceValue = ..." segment in 
decodeTypicalPredictedLineTemplate1() above the line "for (int minorX = 0; 
minorX < minorWidth; minorX++)". The explanation: "previously 
{{grReferenceValue}} was effectively “drifting” and not being re-anchored to 
the current 3-line byte window at each byte boundary."

Doing so brings this:

!image-2026-04-28-12-28-19-575.png!

So the triangles are gone. Moving "context = ..." as well brings this:

!image-2026-04-28-12-29-21-038.png!

> Template 1 handling with TPGRON not supported
> ---------------------------------------------
>
>                 Key: PDFBOX-6199
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6199
>             Project: PDFBox
>          Issue Type: Sub-task
>          Components: JBIG2
>    Affects Versions: 3.0.4 JBIG2
>            Reporter: Maruan Sahyoun
>            Priority: Minor
>         Attachments: image-2026-04-28-12-27-28-955.png, 
> image-2026-04-28-12-28-19-575.png, image-2026-04-28-12-29-21-038.png
>
>
> {{bitmap-refine-template1-tpgron.jbig2}} tests the folling features of JBIG2:
> - Refinement region
> - Template 1
> - TPGRON
> - Reference bitmap reuse
> We currently produce garbled output when decoding



--
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