diff options
-rw-r--r-- | base/gscms.h | 4 | ||||
-rw-r--r-- | base/gsdparam.c | 25 | ||||
-rw-r--r-- | base/gsequivc.c | 1 | ||||
-rw-r--r-- | base/gsicc_manage.c | 15 |
4 files changed, 39 insertions, 6 deletions
diff --git a/base/gscms.h b/base/gscms.h index 82150a155..c05d64f57 100644 --- a/base/gscms.h +++ b/base/gscms.h @@ -185,7 +185,8 @@ typedef enum { gsTEXTPROFILE, gsPROOFPROFILE, gsLINKPROFILE, - gsOIPROFILE + gsOIPROFILE, + gsPRPROFILE } gsicc_profile_types_t; typedef enum { @@ -262,6 +263,7 @@ typedef struct cmm_dev_profile_s { cmm_profile_t *proof_profile; cmm_profile_t *link_profile; cmm_profile_t *oi_profile; /* output intent profile */ + cmm_profile_t *postren_profile; /* Profile for use by devices post render */ gsicc_rendering_param_t rendercond[NUM_DEVICE_PROFILES]; bool devicegraytok; /* Used for forcing gray to pure black */ bool graydetection; /* Device param for monitoring for gray only page */ diff --git a/base/gsdparam.c b/base/gsdparam.c index 4d1e69d8e..92dc29d36 100644 --- a/base/gsdparam.c +++ b/base/gsdparam.c @@ -69,6 +69,7 @@ int gx_default_get_param(gx_device *dev, char *Param, void *list) gs_param_list * plist = (gs_param_list *)list; int k, colors = dev->color_info.num_components; gs_param_string profile_array[NUM_DEVICE_PROFILES]; + gs_param_string postren_profile; gs_param_string proof_profile, link_profile, icc_colorants; gsicc_rendering_intents_t profile_intents[NUM_DEVICE_PROFILES]; gsicc_blackptcomp_t blackptcomps[NUM_DEVICE_PROFILES]; @@ -297,6 +298,12 @@ int gx_default_get_param(gx_device *dev, char *Param, void *list) blackpreserve[k] = dev_profile->rendercond[k].preserve_black; } } + if (dev_profile->postren_profile == NULL) { + param_string_from_string(postren_profile, null_str); + } else { + param_string_from_transient_string(postren_profile, + dev_profile->postren_profile->name); + } if (dev_profile->proof_profile == NULL) { param_string_from_string(proof_profile, null_str); } else { @@ -337,6 +344,7 @@ int gx_default_get_param(gx_device *dev, char *Param, void *list) blackptcomps[k] = gsBPNOTSPECIFIED; blackpreserve[k] = gsBKPRESNOTSPECIFIED; } + param_string_from_string(postren_profile, null_str); param_string_from_string(proof_profile, null_str); param_string_from_string(link_profile, null_str); param_string_from_string(icc_colorants, null_str); @@ -355,6 +363,9 @@ int gx_default_get_param(gx_device *dev, char *Param, void *list) } if (strcmp(Param, "PreBandThreshold") == 0) { return param_write_bool(plist, "PreBandThreshold", &prebandthreshold); + } + if (strcmp(Param, "PostRenderProfile") == 0) { + return param_write_string(plist, "PostRenderProfile", &(postren_profile)); } if (strcmp(Param, "ProofProfile") == 0) { return param_write_string(plist,"ProofProfile", &(proof_profile)); @@ -449,6 +460,7 @@ gx_default_get_params(gx_device * dev, gs_param_list * plist) bool seprs = false; gs_param_string dns, pcms, profile_array[NUM_DEVICE_PROFILES]; + gs_param_string postren_profile; gs_param_string proof_profile, link_profile, icc_colorants; gsicc_rendering_intents_t profile_intents[NUM_DEVICE_PROFILES]; gsicc_blackptcomp_t blackptcomps[NUM_DEVICE_PROFILES]; @@ -530,7 +542,7 @@ gx_default_get_params(gx_device * dev, gs_param_list * plist) blackpreserve[k] = dev_profile->rendercond[k].preserve_black; } } - /* The proof and link profile */ + /* The proof, link and post render profile */ if (dev_profile->proof_profile == NULL) { param_string_from_string(proof_profile, null_str); } else { @@ -543,6 +555,12 @@ gx_default_get_params(gx_device * dev, gs_param_list * plist) param_string_from_transient_string(link_profile, dev_profile->link_profile->name); } + if (dev_profile->postren_profile == NULL) { + param_string_from_string(postren_profile, null_str); + } else { + param_string_from_transient_string(postren_profile, + dev_profile->postren_profile->name); + } devicegraytok = dev_profile->devicegraytok; graydetection = dev_profile->graydetection; usefastcolor = dev_profile->usefastcolor; @@ -574,6 +592,7 @@ gx_default_get_params(gx_device * dev, gs_param_list * plist) param_string_from_string(proof_profile, null_str); param_string_from_string(link_profile, null_str); param_string_from_string(icc_colorants, null_str); + param_string_from_string(postren_profile, null_str); } /* Transmit the values. */ /* Standard parameters */ @@ -611,6 +630,7 @@ gx_default_get_params(gx_device * dev, gs_param_list * plist) (code = param_write_string(plist,"ImageICCProfile", &(profile_array[2]))) < 0 || (code = param_write_string(plist,"TextICCProfile", &(profile_array[3]))) < 0 || (code = param_write_string(plist,"ProofProfile", &(proof_profile))) < 0 || + (code = param_write_string(plist, "PostRenderProfile", &(postren_profile))) < 0 || (code = param_write_string(plist,"DeviceLinkProfile", &(link_profile))) < 0 || (code = param_write_string(plist,"ICCOutputColors", &(icc_colorants))) < 0 || (code = param_write_int(plist,"RenderIntent", (const int *) (&(profile_intents[0])))) < 0 || @@ -1509,6 +1529,9 @@ nce: if ((code = param_read_string(plist, "DeviceLinkProfile", &icc_pro)) != 1) { gx_default_put_icc(&icc_pro, dev, gsLINKPROFILE); } + if ((code = param_read_string(plist, "PostRenderProfile", &icc_pro)) != 1) { + gx_default_put_icc(&icc_pro, dev, gsPRPROFILE); + } if ((code = param_read_int(plist, (param_name = "RenderIntent"), &(rend_intent[0]))) < 0) { ecode = code; diff --git a/base/gsequivc.c b/base/gsequivc.c index 5008e0efc..5fab64ea2 100644 --- a/base/gsequivc.c +++ b/base/gsequivc.c @@ -468,6 +468,7 @@ capture_spot_equivalent_cmyk_colors(gx_device * pdev, const gs_state * pgs, cmm_dev_profile_t temp_profile = { /* Initialize to 0's/NULL's */ { 0 } /* device_profile[] */, 0 /* proof_profile */, 0 /* link_profile */, 0 /* oi_profile */, + 0 /* postren_profile */, { {0} } /* rendercond[] */, 0 /* devicegraytok */, 0 /* graydection */, 0 /* pageneutralcolor */, 0 /* usefastcolor */, 0 /* supports_devn */, diff --git a/base/gsicc_manage.c b/base/gsicc_manage.c index c51ebfe1a..065984e0e 100644 --- a/base/gsicc_manage.c +++ b/base/gsicc_manage.c @@ -1244,6 +1244,7 @@ gsicc_new_device_profile_array(gs_memory_t *memory) } result->proof_profile = NULL; result->link_profile = NULL; + result->postren_profile = NULL; result->oi_profile = NULL; result->spotnames = NULL; result->devicegraytok = true; /* Default is to map gray to pure K */ @@ -1507,11 +1508,13 @@ gsicc_init_device_profile_struct(gx_device * dev, if (profile_type < gsPROOFPROFILE) { curr_profile = profile_struct->device_profile[profile_type]; } else { - /* The proof or link profile */ + /* The proof, link profile or post render */ if (profile_type == gsPROOFPROFILE) { curr_profile = profile_struct->proof_profile; - } else { + } else if (profile_type == gsLINKPROFILE) { curr_profile = profile_struct->link_profile; + } else { + curr_profile = profile_struct->postren_profile; } } /* See if we have the same profile in this location */ @@ -1632,13 +1635,17 @@ gsicc_set_device_profile(gx_device * pdev, gs_memory_t * mem, "[icc] Setting device profile %d\n", pro_enum); pdev->icc_struct->device_profile[pro_enum] = icc_profile; } else { - /* The proof, link or output intent profile */ + /* The proof, link or post render profile. Output intent + profile is set in zicc.c */ if (pro_enum == gsPROOFPROFILE) { if_debug0m(gs_debug_flag_icc, mem, "[icc] Setting proof profile\n"); pdev->icc_struct->proof_profile = icc_profile; - } else { + } else if (pro_enum == gsLINKPROFILE) { if_debug0m(gs_debug_flag_icc, mem, "[icc] Setting link profile\n"); pdev->icc_struct->link_profile = icc_profile; + } else { + if_debug0m(gs_debug_flag_icc, mem, "[icc] Setting postrender profile\n"); + pdev->icc_struct->postren_profile = icc_profile; } } /* Get the profile handle */ |