You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/03/22 00:55:43 UTC
[jira] [Commented] (PDFBOX-1993) Gray color images much lighter
[ https://issues.apache.org/jira/browse/PDFBOX-1993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943742#comment-13943742 ]
John Hewson commented on PDFBOX-1993:
-------------------------------------
That's interesting, there might be a difference in how PDF defines a gray colorspace vs how Java defines it.
> Gray color images much lighter
> ------------------------------
>
> Key: PDFBOX-1993
> URL: https://issues.apache.org/jira/browse/PDFBOX-1993
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Priority: Minor
> Attachments: gray-bad.png, gray-cow-bad.png, gray-cow-good.png, gray-good.png
>
>
> In testCreateLosslessFromImageRGB() I create a grayscale image, and in LosslessFactory.createFromImage() I save it as a grayscale image (that part is currently disabled, search and enable the part with BufferedImage.TYPE_BYTE_GRAY. When this is enabled, testCreateLosslessFromImageRGB() fails the identity test. The expected and the actual images are attached. I traced this effect to PDColorSpace.toRGBImageAWT(), where I saved the "src" and the "dest" image and got two different ones. But even the first one is already different to the grayscale image I created in the test.
> The two attached file pairs were created by writing the BufferedImage src and dst in PDColorSpace.toRGBImageAWT().
--
This message was sent by Atlassian JIRA
(v6.2#6252)