summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancy Durgin <nancy.durgin@artifex.com>2021-04-06 12:50:45 -0700
committerNancy Durgin <nancy.durgin@artifex.com>2021-04-06 13:33:03 -0700
commit9d5d0eedcec8be14af3b7a95ca14f8506449fb75 (patch)
tree008fb9e537535dece9868ab7d6c3160fbc560337
parentdf009f1b1099960c5d71720d6b7d4a98732c38b6 (diff)
downloadghostpdl-9d5d0eedcec8be14af3b7a95ca14f8506449fb75.tar.gz
Disable OverrideICC when doing an smask
This temporarily sets pgs->icc_manager->override_internal to TRUE Basically this causes the ICC color space to be set to match the number of components (N). In the sample being debugged, this means the cmm_icc_profile_data will have a type of default_match = DEFAULT_CMYK instead of DEFAULT_NONE. Sample:tests/pdf/smask_withicc.pdf
-rw-r--r--pdf/pdf_trans.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pdf/pdf_trans.c b/pdf/pdf_trans.c
index a27c47082..856fc4a49 100644
--- a/pdf/pdf_trans.c
+++ b/pdf/pdf_trans.c
@@ -98,6 +98,7 @@ static int pdfi_trans_set_mask(pdf_context *ctx, pdfi_int_gstate *igs, int color
gs_matrix save_matrix, GroupMat, group_Matrix;
gs_transparency_mask_subtype_t subtype = TRANSPARENCY_MASK_Luminosity;
pdf_bool *Processed = NULL;
+ bool save_OverrideICC = gs_currentoverrideicc(ctx->pgs);
#if DEBUG_TRANSPARENCY
dbgmprintf(ctx->memory, "pdfi_trans_set_mask (.execmaskgroup) BEGIN\n");
@@ -115,6 +116,8 @@ static int pdfi_trans_set_mask(pdf_context *ctx, pdfi_int_gstate *igs, int color
goto exit;
}
+ gs_setoverrideicc(ctx->pgs, true);
+
/* If /Processed not in the dict, put it there */
if (code == 0) {
/* the cleanup at end of this routine assumes Processed has a ref */
@@ -303,6 +306,7 @@ static int pdfi_trans_set_mask(pdf_context *ctx, pdfi_int_gstate *igs, int color
}
exit:
+ gs_setoverrideicc(ctx->pgs, save_OverrideICC);
if (gsfunc)
pdfi_free_function(ctx, gsfunc);
if (pcs)