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

Neil McErlean updated PDFBOX-323:
---------------------------------

    Attachment: pdfbox323.patch

OK, here's another patch that fixes this issue in all images in both sample 
pdfs attached to the issue: test.pdf and About Stacks.pdf.
Note that this patch overwrites the changes in the previous one and therefore 
should be used instead of it.

The image in test.pdf and one of the 5 images in About Stacks.pdf were indeed 
PDPixelMaps. Thanks Andeas. But there was a bit more work than just reusing the 
previous patch. :( Turns out SMask images can be transparency masks OR opacity 
masks.

Here's what this patch does:
* PDXObjectImage now has methods to get the SMaskImage and the Decode array for 
image XObjects.
  Note that the decode array is only used in this patch for smask images 
although it can have meaning in "base images".
* PDPixelMap & PDJpeg now get the SMask image (if there is one) and its decode 
array and asks CompositeImage to create an image that combines the base image 
with the transparency mask.
* CompositeImage a new class which does the work of combining base images with 
transparency/opacity masks.


> Images with transparency are not rendered correctly
> ---------------------------------------------------
>
>                 Key: PDFBOX-323
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-323
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>            Priority: Minor
>         Attachments: About Stacks.pdf, pdfbox323.patch, test.pdf
>
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1833244
> Originally submitted by phenderson on 2007-11-16 08:23.
> PDF documents that contain images with transparent regions are not rendered 
> correctly. The transparent areas are painted black.
> Attached is an example pdf with text behind an image, generated via 
> OpenOffice.
> Cheers
> Peter Henderson
> [attachment on SourceForge]
> http://sourceforge.net/tracker/download.php?group_id=78314&atid=552832&aid=1833244&file_id=254618
> test.pdf (application/pdf), 196955 bytes
> example pdf

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to