Bug 59179 - Some colors appear grey/black, whereas it works with Adobe Reader
Summary: Some colors appear grey/black, whereas it works with Adobe Reader
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-09 19:37 UTC by Germán Poo-Caamaño
Modified: 2013-06-15 08:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
PDF test for color mismatch (224.28 KB, text/plain)
2013-01-09 19:37 UTC, Germán Poo-Caamaño
Details
Screenshot of Acroread and Evince output (526.86 KB, image/png)
2013-01-09 19:39 UTC, Germán Poo-Caamaño
Details
support uncolored tiling patterns (1.82 KB, patch)
2013-01-24 11:53 UTC, Adrian Johnson
Details | Splinter Review
support uncolored tiling patterns (3.30 KB, patch)
2013-01-25 12:01 UTC, Adrian Johnson
Details | Splinter Review

Description Germán Poo-Caamaño 2013-01-09 19:37:53 UTC
Created attachment 72749 [details]
PDF test for color mismatch

As it was reported in GNOME Bugzilla:

--------------------------------------------------------------
On one specific document that I have, some colors are not displayed correcly.
With Adode Reader, I have different colors. With Evince, everything is gray.

Here is the link to the document:
http://www.info.ucl.ac.be/~pecheur/talks/VVof2GRLV-FAABS02.pdf

Slide 13 has this issue: yellow, red and green are all gray. I've attached a a
picture showing how this slide is displayed by both pdf viewers.
--------------------------------------------------------------

I took out only the page 13 that shows the issue.  You will find it attached.
I can reproduce the problem with pdftocairo -png.
Comment 1 Germán Poo-Caamaño 2013-01-09 19:39:00 UTC
Created attachment 72750 [details]
Screenshot of Acroread and Evince output
Comment 2 Germán Poo-Caamaño 2013-01-09 19:41:06 UTC
I forgot to add:

I tested it against cairo 1.12 and poppler master (bef2c42f381c74fd,
the commit after 0.22.0).
Comment 3 Albert Astals Cid 2013-01-09 19:43:24 UTC
FWIW it works fine in splash
Comment 4 Adrian Johnson 2013-01-24 11:53:18 UTC
Created attachment 73562 [details] [review]
support uncolored tiling patterns

The cairo backend does not support uncolored tiling patterns. This caused uncolored patterns to be drawn in gray.

The attached patch fixes this.
Comment 5 Carlos Garcia Campos 2013-01-24 14:10:01 UTC
(In reply to comment #4)
> Created attachment 73562 [details] [review] [review]
> support uncolored tiling patterns
> 
> The cairo backend does not support uncolored tiling patterns. This caused
> uncolored patterns to be drawn in gray.
> 
> The attached patch fixes this.

This looks sane to me, but I'm getting a small regression in one of my files, I'll send the pdf file to you by email. Thanks
Comment 6 Adrian Johnson 2013-01-25 12:01:03 UTC
Created attachment 73644 [details] [review]
support uncolored tiling patterns

It turns out that we can't use cairo_mask for uncolored patterns since cairo_mask uses the alpha and not the luminosity to mask the source.

This patch uses the same solution as uncolored patterns in PSOutputDev. It adds a flag to indicate we are rendering an uncolored pattern and disables setting the color when the flag is true.
Comment 7 Carlos Garcia Campos 2013-01-28 14:57:15 UTC
(In reply to comment #6)
> Created attachment 73644 [details] [review] [review]
> support uncolored tiling patterns
> 
> It turns out that we can't use cairo_mask for uncolored patterns since
> cairo_mask uses the alpha and not the luminosity to mask the source.
> 
> This patch uses the same solution as uncolored patterns in PSOutputDev. It
> adds a flag to indicate we are rendering an uncolored pattern and disables
> setting the color when the flag is true.

Great, no regressions this time. Thanks! Please, don't use braces for single statement ifs. Feel free to push.
Comment 8 Adrian Johnson 2013-01-28 20:59:10 UTC
I've removed the surplus braces and pushed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.