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 prints with black background #1128

Open
wesleyi23 opened this issue May 27, 2020 · 6 comments
Open

Image prints with black background #1128

wesleyi23 opened this issue May 27, 2020 · 6 comments
Labels
bug Existing features not working as expected

Comments

@wesleyi23
Copy link

I am trying to use Weasyprint to generate pdf reports for a Django web application. The HTML file the report is based on has images in base 64, some of the images generate with a black background instead of a white background. I am trying to understand where this issue might be or how to go about correcting it. Does anyone have any ideas where to start?

@liZe
Copy link
Member

liZe commented May 27, 2020

Hello!

Could you please provide an example?

@wesleyi23
Copy link
Author

Sure. Here is an example HTML file (saved as a txt file):
example.txt

@liZe
Copy link
Member

liZe commented May 27, 2020

Looks like a problem with CMYK, really like #315. It was supposed to be fixed in Cairo 1.15.4, I don’t know why it’s still there with 1.16.

@wesleyi23
Copy link
Author

Hey thanks! I will double check to make sure I have the latest version of Cairo and post back what I find tomorrow.

@liZe
Copy link
Member

liZe commented May 27, 2020

Looks like a problem with CMYK, really like #315. It was supposed to be fixed in Cairo 1.15.4, I don’t know why it’s still there with 1.16.

Here is why: the fix has been reverted.

Hopefully Cairo is soon gone forever.

A quick workaround is to save your JPG file as RGB.

@liZe liZe added the bug Existing features not working as expected label May 27, 2020
@liZe
Copy link
Member

liZe commented Sep 16, 2021

The bug remains, even without Cairo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants