Bug 697614 - Overprint/Text Knockout
Summary: Overprint/Text Knockout
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Color (show other bugs)
Version: master
Hardware: PC All
: P4 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-24 12:38 UTC by Robin Watts
Modified: 2020-12-29 17:34 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
simplified (12.86 KB, application/pdf)
2017-02-28 11:03 UTC, Michael Vrhel
Details
preliminary_fix.patch (1.11 KB, patch)
2017-02-28 21:23 UTC, Ray Johnston
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Watts 2017-02-24 12:38:19 UTC
The fix for Bug 697048:

commit af3c1d10726b2d932d951bf021193cbd5bcc734d
Author: Robin Watts <robin.watts@artifex.com>
Date:   Fri Feb 24 19:05:52 2017 +0000

    Bug 697048: Fix compatible overprint blend mode.

    Fix from Michael Vrhel.

    Compatible overprint is operating in subtractive color spaces, so
    a 'zero' component actually means 0xFF.

reveals a problem with a test in the cluster:

  tests_private/pdf/PDF_1.7_FTS/fts_09_0924.pdf.pdf.pkmraw.300.0

i.e. the pdfwritten file shows a problem when rendered.

Apparently the pdfwritten file renders correctly in Acrobat, so it is not pdfwrite at fault.
Comment 1 Michael Vrhel 2017-02-28 11:03:43 UTC
Created attachment 13429 [details]
simplified

Simplified file
Comment 2 Michael Vrhel 2017-02-28 11:32:49 UTC
The text fills occur with RGB values and overprint is on, with the softlight blend mode.  Of course overprint with RGB fills make no sense but we go ahead and set the blend mode to overprint compatible since we are going out to a CMYK device (e.g. tiff32nc works), overprint is true and we have transparency.

If I don't let the interpreter change the blend mode, we match Adobe.  I believe we need to look at what the current color fill type is in the interpreter and not change the blend mode if the fills are RGB or Gray types.   Pushing this to Ray to have a look as he did the interpreter work for CompatibleOverprint blend mode.
Comment 3 Michael Vrhel 2017-02-28 11:34:06 UTC
By the way this does not need to run in clist mode to see the issue.
Comment 4 Ray Johnston 2017-02-28 21:23:33 UTC
Created attachment 13431 [details]
preliminary_fix.patch

I'm not sure what the test file is supposed to look like, but I see a very
slight color difference with the patch that doesn't result in the special
"CompatibleOverprint" handling that pushes an extra group.

Note that if there are more colorspaces types that don't need the special
handling we can add them.

One question is, do we need to check for an Indexed colorspace base space?
(if I had to guess, I would say "yes, we should").

Also if there are fewer colorspaces that _do_ need the special handling, it
would be easy to change the logic for that.
Comment 5 Peter Cherepanov 2020-12-29 06:36:58 UTC
Ray's patch was incorporated (with some changes) into the commit 009d44b855dcda9d0d9ecf5ca20944504648eebe . This bug can be closed now.
Comment 6 Ray Johnston 2020-12-29 17:34:13 UTC
Thanks for checking this, Peter.