[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1632-gd2652a9

[email protected] (Michael Vrhel)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  d2652a950b035090587c7771e182226ab47b4a73 (commit)
       via  84aef7719b49dfac94fa358380f460ea88ee1954 (commit)
      from  cfdb64eec150da48dea5063b14ae7596e6b7050a (commit)

----------------------------------------------------------------------
commit d2652a950b035090587c7771e182226ab47b4a73
Author: Michael Vrhel <[email protected]>
Date:   Tue Sep 3 08:52:16 2019 -0700

    Add -sBlendColorProfile into Use.htm

diff --git a/doc/Use.htm b/doc/Use.htm
index 94f221d..ed9d4c5 100644
--- a/doc/Use.htm
+++ b/doc/Use.htm
@@ -3073,6 +3073,17 @@ Separation and DeviceN colors.  For the general user this command option
 </dl>
 
 <dl>
+    <dt><code>-sBlendColorProfile=</code><em>filename</em></dt>
+<dd>With the PDF transparency imaging model, a color space can
+be specified within which the color blending operations are to
+take place. Some files lack this specification, in which case
+the blending occurs in the output device's native color space.  This
+dependency of blending color space on the device color model 
+can be avoided by using the above command to force a specific
+color space in which to perform the blending. </dd>
+</dl>
+
+<dl>
     <dt><code>-dColorAccuracy=</code><em>0/1/2</em></dt>
 <dd>Set the level of accuracy that should be used.  A setting of 0 will result in less accurate
 color rendering compared to a setting of 2.  However, the creation of a transformation

----------------------------------------------------------------------
commit 84aef7719b49dfac94fa358380f460ea88ee1954
Author: Michael Vrhel <[email protected]>
Date:   Wed Aug 21 21:28:10 2019 -0700

    Do not allow overprint if the PDF14 device target is not subtractive
    
    If the device is a PDF14 device whose target is not subtractive,
    then overprinting is not allowed. Otherwise, the presence of subtractive
    blend spaces on the page could result in mixed behavior.  This matches
    behavior seen in AR.  colorinfo.opmode is inherited by the pdf14 device
    from its target and is used to determine if overprinting should occur.

diff --git a/base/gscdevn.c b/base/gscdevn.c
index d4f5aa3..d8cc9f4 100644
--- a/base/gscdevn.c
+++ b/base/gscdevn.c
@@ -736,8 +736,16 @@ gx_set_overprint_DeviceN(const gs_color_space * pcs, gs_gstate * pgs)
             return gx_spot_colors_set_overprint( pcs->base_space, pgs);
     } else {
         gs_overprint_params_t   params;
+        gx_device* dev = pgs->device;
+        gx_device_color_info* pcinfo = (dev == 0 ? 0 : &dev->color_info);
 
-        if ((params.retain_any_comps = pgs->overprint)) {
+        /* If the target device is a PDF14 device whose target is not subtractive
+           then overprinting is not allowed. Otherwise the presence of subtractive
+           blend spaces on the page could result in mixed behavior.  pcinfo->opmode
+           is inherited by the pdf14 device from its target */
+        if (pcinfo->opmode == GX_CINFO_OPMODE_NOT)
+            params.retain_any_comps = 0;
+        else if ((params.retain_any_comps = pgs->overprint)) {
             int     i, ncomps = pcs->params.device_n.num_components;
 
             params.retain_spot_comps = false;
diff --git a/base/gscsepr.c b/base/gscsepr.c
index d0c81f0..e754785 100644
--- a/base/gscsepr.c
+++ b/base/gscsepr.c
@@ -188,11 +188,21 @@ gx_set_overprint_Separation(const gs_color_space * pcs, gs_gstate * pgs)
     if (pcmap->use_alt_cspace)
         return gx_spot_colors_set_overprint(pcs->base_space, pgs);
     else {
-        gs_overprint_params_t   params;
+        gs_overprint_params_t   params;        
+        gx_device* dev = pgs->device;
+        gx_device_color_info* pcinfo = (dev == 0 ? 0 : &dev->color_info);
 
-        /* We should not have to blend if we don't need the alternate tint transform */
-        params.retain_any_comps = pgs->overprint &&
-                                  pcs->params.separation.sep_type != SEP_ALL;
+        /* If the target device is a PDF14 device whose target is not subtractive
+           then overprinting is not allowed. Otherwise the presence of subtractive
+           blend spaces on the page could result in mixed behavior pcinfo->opmode
+           is inherited by the pdf14 device from its target */
+        if (pcinfo->opmode == GX_CINFO_OPMODE_NOT)
+            params.retain_any_comps = 0;
+        else {
+            /* We should not have to blend if we don't need the alternate tint transform */
+            params.retain_any_comps = pgs->overprint &&
+                pcs->params.separation.sep_type != SEP_ALL;
+        }
         if (params.retain_any_comps) {
             params.retain_spot_comps = false;
             params.drawn_comps = 0;
@@ -200,9 +210,10 @@ gx_set_overprint_Separation(const gs_color_space * pcs, gs_gstate * pgs)
                 int mcomp = pcmap->color_map[0];
 
                 if (mcomp >= 0)
-                    gs_overprint_set_drawn_comp( params.drawn_comps, mcomp);
+                    gs_overprint_set_drawn_comp(params.drawn_comps, mcomp);
             }
         }
+
         /* Only DeviceCMYK can use overprint mode */
         pgs->effective_overprint_mode = 0;
         return gs_gstate_update_overprint(pgs, &params);
diff --git a/base/gxdevsop.h b/base/gxdevsop.h
index 2d4d1a9..c74f819 100644
--- a/base/gxdevsop.h
+++ b/base/gxdevsop.h
@@ -358,6 +358,7 @@ enum {
     /* Private dso used to check that a printer device properly forwards to the default */
     gxdso_debug_printer_check,
 #endif
+
     /* Add new gxdso_ keys above this. */
     gxdso_pattern__LAST
 };


Summary of changes:
 base/gscdevn.c  | 12 ++++++++++--
 base/gscsepr.c  | 23 +++++++++++++++++------
 base/gxdevsop.h |  1 +
 doc/Use.htm     | 11 +++++++++++
 4 files changed, 39 insertions(+), 8 deletions(-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.