Bug 80998

Summary: Overprintmode and shadings
Product: poppler Reporter: Thomas Freitag <Thomas.Freitag>
Component: splash backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: PDF which shows the problem
patch which fixes the bug
setOverprintMask should stiil be called, but with singleColor = NULL
setOverprintMask should stiil be called, but with singleColor = NULL

Description Thomas Freitag 2014-07-07 10:32:18 UTC
Created attachment 102365 [details]
PDF which shows the problem

If using overprintmode (OPM) together with overprint switched on, the CMYK values have to examined for each channel. If the channel value is != 0, it knocks out the background channel, otherwise the background channel remains unchained.
The actual implementation will not work with shadings: here we have dynamic patterns and the comparison have to be done with the result of pattern->getColor(), but it does it only once with the actual fill color which is completely wrong because the fill color has nothing to do with the shading colors.
The attached PDF shows the effect: the yellow N is painted greenish if the jpegcmyk or overprint option is used (only available if compiled with SPLASH_CMYK)
Comment 1 Thomas Freitag 2014-07-07 11:12:39 UTC
Created attachment 102367 [details] [review]
patch which fixes the bug
Comment 2 Thomas Freitag 2014-07-07 11:18:25 UTC
Created attachment 102368 [details] [review]
setOverprintMask should stiil be called, but with singleColor = NULL
Comment 3 Albert Astals Cid 2014-07-10 22:37:36 UTC
Where is

GfxColorSpaceMode gfxMode;

initialized?
Comment 4 Thomas Freitag 2014-07-17 15:49:11 UTC
Created attachment 102988 [details] [review]
setOverprintMask should stiil be called, but with singleColor = NULL

(In reply to comment #3)
> Where is
> 
> GfxColorSpaceMode gfxMode;
> 
> initialized?

Thank You for being so careful. I missed that when I manually merged from my Windows wirtual machine where I debugged it to my Ubuntu master where I created the patch :-(.

So here the patch with the initialization.
Comment 5 Albert Astals Cid 2014-07-20 22:34:34 UTC
Pushed to master

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.