Image prints with black background
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?
Hello!
Could you please provide an example?
Sure. Here is an example HTML file (saved as a txt file): example.txt
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.
Hey thanks! I will double check to make sure I have the latest version of Cairo and post back what I find tomorrow.
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.
The bug remains, even without Cairo.