[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1933-g0129596

[email protected] (Michael Vrhel) Thu, 21 Nov 2019 23:16:43 +0000 (UTC)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  0129596f6cf2d090ed46f9a9c8189ab60b56735f (commit)
      from  e0c2e4d8f43d6e83a0a04e6d2c350d2d7fc1e7a6 (commit)

----------------------------------------------------------------------
commit 0129596f6cf2d090ed46f9a9c8189ab60b56735f
Author: Michael Vrhel <[email protected]>
Date:   Thu Nov 21 14:06:50 2019 -0800

    Bug 700929: Pass object type rendering intent settings to pdf14 device

diff --git a/base/gdevp14.c b/base/gdevp14.c
index 392e647..18d0283 100644
--- a/base/gdevp14.c
+++ b/base/gdevp14.c
@@ -2813,6 +2813,7 @@ gs_pdf14_device_copy_params(gx_device *dev, const gx_device *target)
     cmm_dev_profile_t *profile_targ;
     cmm_dev_profile_t *profile_dev14;
     pdf14_device *pdev = (pdf14_device*) dev;
+    int k;
 
     COPY_PARAM(width);
     COPY_PARAM(height);
@@ -2837,17 +2838,24 @@ gs_pdf14_device_copy_params(gx_device *dev, const gx_device *target)
         profile_dev14 = dev->icc_struct;
         dev_proc((gx_device *) target, get_profile)((gx_device *) target,
                                           &(profile_targ));
-        gsicc_adjust_profile_rc(profile_targ->device_profile[0], 1, "gs_pdf14_device_copy_params");
-        if (profile_dev14->device_profile[0] != NULL) {
-            gsicc_adjust_profile_rc(profile_dev14->device_profile[0], -1, "gs_pdf14_device_copy_params");
+
+        for (k = 0; k < NUM_DEVICE_PROFILES; k++) {
+            if (profile_targ->device_profile[k] != NULL) {
+                gsicc_adjust_profile_rc(profile_targ->device_profile[k], 1, "gs_pdf14_device_copy_params");
+            }
+            if (profile_dev14->device_profile[k] != NULL) {
+                gsicc_adjust_profile_rc(profile_dev14->device_profile[k], -1, "gs_pdf14_device_copy_params");
+            }
+            profile_dev14->device_profile[k] = profile_targ->device_profile[k];
+            profile_dev14->rendercond[k] = profile_targ->rendercond[k];
         }
-        profile_dev14->device_profile[0] = profile_targ->device_profile[0];
+
         dev->icc_struct->devicegraytok = profile_targ->devicegraytok;
         dev->icc_struct->graydetection = profile_targ->graydetection;
         dev->icc_struct->pageneutralcolor = profile_targ->pageneutralcolor;
         dev->icc_struct->supports_devn = profile_targ->supports_devn;
         dev->icc_struct->usefastcolor = profile_targ->usefastcolor;
-        profile_dev14->rendercond[0] = profile_targ->rendercond[0];
+
         if (pdev->using_blend_cs) {
             /* Swap the device profile and the blend profile. */
             gsicc_adjust_profile_rc(profile_targ->device_profile[0], 1, "gs_pdf14_device_copy_params");


Summary of changes:
 base/gdevp14.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)