summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2016-10-10 14:03:51 -0700
committerRay Johnston <ray.johnston@artifex.com>2016-10-11 07:41:24 -0700
commita34f71c530409a559c4cb35cb1a23296541d53c3 (patch)
treea4943d2726ef929246e89a8b22131ed3d7015823
parenta87e380acd5e326f7d4e4380348bac393fac3058 (diff)
downloadghostpdl-a34f71c530409a559c4cb35cb1a23296541d53c3.tar.gz
Fix Bug 696864: Use Default colorspaces when processing SMask
This is done by saving the OverrideICC user parameter before setting the colorspace, etc. so as to ignore the ICC profile, which may have a gamma that we don't expect, and restore it after the SMask has been rendered. Note this file rendered correctly with -dOverrideICC on the command line, but this patch automatically applies that during execmaskgroup. Thanks to Michael Vrhel for identifying the problem and coming up with a simplified test case.
-rw-r--r--Resource/Init/pdf_draw.ps3
1 files changed, 3 insertions, 0 deletions
diff --git a/Resource/Init/pdf_draw.ps b/Resource/Init/pdf_draw.ps
index fb2e564d8..878282587 100644
--- a/Resource/Init/pdf_draw.ps
+++ b/Resource/Init/pdf_draw.ps
@@ -602,6 +602,8 @@ def
matrix currentmatrix 4 1 roll
mark currentcolor counttomark dup 4 add exch roll pop
currentcolorspace 4 1 roll .getuseciecolor 4 1 roll
+ currentuserparams /OverrideICC get 4 1 roll
+ mark /OverrideICC true .dicttomark setuserparams
% We can't simply set the group's gstate here because
% we can't use gsave/grestore. So we actually set it
@@ -637,6 +639,7 @@ def
exch //false resolvestream
.execgroup .endtransparencymask
PDFfile exch setfileposition
+ mark exch /OverrideICC exch .dicttomark setuserparams
.setuseciecolor setcolorspace setcolor
setmatrix
end % restore colorspace, color and ExtGState (end)