You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2020/05/27 19:54:45 UTC

svn commit: r1878198 - /pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PNGConverter.java

Author: tilman
Date: Wed May 27 19:54:44 2020
New Revision: 1878198

URL: http://svn.apache.org/viewvc?rev=1878198&view=rev
Log:
PDFBOX-4847: fix bug that created unusable icc profile, by Emmeran Seehuber

Modified:
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PNGConverter.java

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PNGConverter.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PNGConverter.java?rev=1878198&r1=1878197&r2=1878198&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PNGConverter.java (original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PNGConverter.java Wed May 27 19:54:44 2020
@@ -411,6 +411,7 @@ final class PNGConverter
                     == 1 ? COSName.DEVICEGRAY : COSName.DEVICERGB);
             if (state.iCCP != null)
             {
+                cosStream.setItem(COSName.FILTER, COSName.FLATE_DECODE);
                 // We need to skip over the name
                 int iccProfileDataStart = 0;
                 while (iccProfileDataStart < 80 && iccProfileDataStart < state.iCCP.length)