[ https://issues.apache.org/jira/browse/PDFBOX-2364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14145091#comment-14145091 ]
John Hewson commented on PDFBOX-2364: ------------------------------------- We don't use IndexColorModel, so that bug report doesn't apply to us, also we're not scaling the image, Graphics2D is, so Image.getScaledInstance() isn't really a substitute. The image is 1bpc (i.e. binary) rather than grayscale, though the PDF colour space is DeviceGray. Ultimately the image which is rendered by Graphics2D is TYPE_INT_RGB because it's converted by DeviceGray#toRGBImage(). Dumping the image returned by this method shows that it is perfect, which means that the issues is with Java scaling a standard TYPE_INT_RGB image. Looking at the image's dictionary the "Interpolate" flag is not set, which means that we're using the VALUE_INTERPOLATION_NEAREST_NEIGHBOR hint to draw the image, this is correct, but Java's nearest neighbour scaling is particularly poor. > CCITT image renders incorrectly > ------------------------------- > > Key: PDFBOX-2364 > URL: https://issues.apache.org/jira/browse/PDFBOX-2364 > Project: PDFBox > Issue Type: Bug > Components: Rendering > Affects Versions: 2.0.0 > Reporter: John Hewson > Labels: CCITTFaxDecode, ccitt > Attachments: PDFBOX-2338-2038866.jpg, PDFBOX-2338-p6.jpg > > > The file from PDFBOX-2338 has a CCITT image on p6 which renders incorrectly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)