[
https://issues.apache.org/jira/browse/PDFBOX-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Neil McErlean updated PDFBOX-323:
---------------------------------
Attachment: PDJpeg.patch
Patch attached which partially fixes this issue.
This patch addresses the use of "soft masks" as transparency masks for Jpegs
within PDF files. See section 11.5 of the PDF spec.
The patch does not fix the transparency problem seen in test.pdf, but it fixes
4 out of the 5 images in About Stacks.pdf. I'll hopefully fix the other image
soon.
The patch adds a method getSMaskImage() which reads from the COS model and
publishes the SMask transparency image in the PDModel. This is a greyscale
image whose RGB values represent transparency. Note that this image itself has
no transparency.
Then I've changed getRGBImage so that if there is an smask image, it is used to
apply the transparency to the main image.
Please note that although this is marked as minor, this is important
functionality for us as we would like to use pdfbox to produce thumbnails of
pdf files.
> 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, PDJpeg.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.