[
https://issues.apache.org/jira/browse/PDFBOX-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140740#comment-18140740
]
Tilman Hausherr edited comment on PDFBOX-6157 at 11/8/26, 12:46 PM:
--------------------------------------------------------------------
The patch works only for one of the files, the test file should be done
manually. The build works, and my regression tests also work. This is amazing.
I haven't done any checks for speed, I'll do that later.
was (Author: tilman):
The patch works only for one of the files, the test file should be done
manually. The build works, and my regression tests also work. I haven't done
any checks for speed, I'll do that later.
> Fix original Bitmaps.blit() code
> --------------------------------
>
> Key: PDFBOX-6157
> URL: https://issues.apache.org/jira/browse/PDFBOX-6157
> Project: PDFBox
> Issue Type: Task
> Components: JBIG2
> Affects Versions: 3.0.4 JBIG2
> Reporter: Tilman Hausherr
> Priority: Minor
> Attachments:
> 0001-PDFBOX-6156-fix-blitUnshifted-blitSpecialShifted-and.patch,
> Bitmaps.java, BitmapsBlitTest.java
>
>
> Follow-up to PDFBOX-6156, which was fixed with a correct but not very
> efficient solution. The original code should be fixed so that the last bits
> of a byte are handled without touching the other bits of the destination.
> How to test this: use the test code from PDFBOX-6151 on the file mentioned in
> PDFBOX-6156. To see intermediate images, save the bitmaps {{regionBitmap}}
> and {{pageBitmap}} in JBIG2Page.createNormalPage() with a call like this near
> {{Bitmaps.blit()}}:
> {code:java}
> ImageIO.write(Bitmaps.asBufferedImage(pageBitmap), "png", new
> File("XXXX","JPeg2PageResultBitmap-" + System.currentTimeMillis() + ".png"));
> {code}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]