Skip to content

Conversation

@7obywankenobi
Copy link

…ages in PDF export

java.awt.image.BufferedImage.getAlphRaster() return null if an
IndexColorModel is used. This resulted in those PNGs missing the
SMask and had broken transparency effects.

PNG images with indexed color palette featuring tRNS transparency
encoding had potentially wrong PDF Mask. If image contained transparency
but no fully transparent pixel, then the default implementation of
PDFImageXObject still generates a Mask entry with three color components.
PDF Specification expects the index when using a palette based color
model. Thus Acrobat Reader does not process this image and shows an
error message. In general ImageRenderedAdapter would overwrite this
Mask, but since
AbstractImageAdapter.getIndexOfFirstTransparentColorInPalette() does
return null if image does not contain fully transparent pixels the
more general implementation of PDFImageXObject leaks to the output.
This has been fixed.

simonsteiner1984 and others added 30 commits June 16, 2015 11:46
…as suggested by dvineshkumar@gmail.com

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1705133 13f79535-47bb-0310-9956-ffa450edef68
…gested by sdridi@iptech-group.com.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1716732 13f79535-47bb-0310-9956-ffa450edef68
…eException (i.e. reported as errors) and AssertionException (i.e. reported as failure)

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1716744 13f79535-47bb-0310-9956-ffa450edef68
…ssignment + start of javadoc fixups

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1716765 13f79535-47bb-0310-9956-ffa450edef68
simonsteiner1984 and others added 25 commits July 6, 2018 10:05
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1839970 13f79535-47bb-0310-9956-ffa450edef68
…ages in PDF export

java.awt.image.BufferedImage.getAlphRaster() return null if an
IndexColorModel is used. This resulted in those PNGs missing the
SMask and had broken transparency effects.

PNG images with indexed color palette featuring tRNS transparency
encoding had potentially wrong PDF Mask. If image contained transparency
but no fully transparent pixel, then the default implementation of
PDFImageXObject still generates a Mask entry with three color components.
PDF Specification expects the index when using a palette based color
model. Thus Acrobat Reader does not process this image and shows an
error message. In general ImageRenderedAdapter would overwrite this
Mask, but since
AbstractImageAdapter.getIndexOfFirstTransparentColorInPalette() does
return null if image does not contain fully transparent pixels the
more general implementation of PDFImageXObject leaks to the output.
This has been fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants