[ 
https://issues.apache.org/jira/browse/PDFBOX-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-6157:
------------------------------------
    Description: 
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 include the file 
mentioned. 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}


  was:
Follow-up to PDFBOX-6151, 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 include the file 
mentioned. 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}



> 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: Major
>
> 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 include the file 
> mentioned. 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
(v8.20.10#820010)

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

Reply via email to