Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image transparency loaded incorrectly - Image's black color "burns out" #217

Closed
fono opened this issue Aug 5, 2019 · 6 comments
Closed

Comments

@fono
Copy link

fono commented Aug 5, 2019

In one of our projects we render images to PDF documents in a similar way to backround images in CSS: the image can be offset, tiled, or repeated horizontally/vertically in a placeholder area.
In some cases the black color burns out in the PDF, displaying white instead of black. I managed to create a very simple project to reproduce the issue:
https://github.com/fono/openpdf-test-image

I included some details in the readme of the project.

Please note that this issue was introduced in OpenPDF version 1.2.0 -- it worked fine in 1.1.0.

@fono
Copy link
Author

fono commented Aug 5, 2019

result

@andreasrosdal
Copy link
Contributor

OpenPDF 1.2.x switched to using Java ImageIO to load images. This was to move the maintenance of image codec loading code from the OpenPDF project, and use a common library instead.
https://docs.oracle.com/javase/8/docs/api/javax/imageio/package-summary.html

@fono Can you please update the openpdf-test-image project to use OpenPDF 1.3.1 instead, it's the latest version. The code for loading images is different in OpenPDF 1.3.1, although the problem is still present there also. Maybe you could help us debug and fix this problem? OpenPDF is volunteer-based.

@andreasrosdal andreasrosdal changed the title Image's black color "burns out" Image transparency loaded incorrectly - Image's black color "burns out" Aug 6, 2019
@fono
Copy link
Author

fono commented Aug 6, 2019

I've updated the sample project to use OpenPDF 1.3.1.

At some time I should have a try and debug the issue, but I'm not very familiar with image processing (and also with PDFs), so someone with more experience might be more efficient.

@andreasrosdal
Copy link
Contributor

This has been fixed in the latest version.

@fono Can you please verify?

@fono
Copy link
Author

fono commented Aug 13, 2019

Thanks, our tests regarding the images pass with this release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants