[gs-cvs] rev 8048 - trunk/gs/lib
tim at ghostscript.com
tim at ghostscript.com
Wed Jun 13 09:27:33 PDT 2007
Author: tim
Date: 2007-06-13 09:27:33 -0700 (Wed, 13 Jun 2007)
New Revision: 8048
Modified:
trunk/gs/lib/gs_cspace.ps
trunk/gs/lib/gs_devn.ps
Log:
This is a fix for regression bug report 689263.
DETAILS:
Some versions of PhotoShop generate documents that place an extra value on the operand stack and tintTransform replaces it - see bug 549307 for details. Also see the test case of bug 689263. Since GS invokes setcolor as a side-effect of setcolorspace, we must prevent Adobe's hack from pop'ing an extra (significant) item from the operand stack when setcolor is invoked from a setcolorspace context.
The previous patch for bug report 688584, which was committed before I was done with it, was too broad and was undoing Adobe's hack whenever setcolor was invoked (from setcolorspace or otherwise). This change also undoes the previous patch, which was the cause of the error:
Error: /rangecheck in --image--
under the conditions specified in bug report 689263.
EXPECTED DIFFERENCES:
Regression test file Bug688584.ps should now work properly for all output device types.
Modified: trunk/gs/lib/gs_cspace.ps
===================================================================
--- trunk/gs/lib/gs_cspace.ps 2007-06-13 02:42:04 UTC (rev 8047)
+++ trunk/gs/lib/gs_cspace.ps 2007-06-13 16:27:33 UTC (rev 8048)
@@ -502,14 +502,30 @@
ifelse
}
if
- { //.cs_get_default_color exec setcolor }
+ {
+ % Some versions of PhotoShop generate documents
+ % that place an extra value on the operand stack
+ % and tintTransform replaces it - see bug 549307
+ % for details. Also see the test case of bug 689263.
+ % Here we use mark...cleartomark to restore the stack
+ % to its normal state.
+ mark
+ true % An extra value for bogus Adobe tintTransform
+ 3 -1 roll
+ //.cs_get_default_color exec setcolor
+ cleartomark
+ }
{
//.cs_validate exec
//.cs_substitute exec
//.cs_prepare exec
//.cs_install exec
dup //make_array1 exec //setcolorspace
- //.cs_get_default_color exec setcolor
+ mark %See comments above
+ true
+ 3 -1 roll
+ //.cs_get_default_color exec setcolor
+ cleartomark
}
ifelse
}
Modified: trunk/gs/lib/gs_devn.ps
===================================================================
--- trunk/gs/lib/gs_devn.ps 2007-06-13 02:42:04 UTC (rev 8047)
+++ trunk/gs/lib/gs_devn.ps 2007-06-13 16:27:33 UTC (rev 8048)
@@ -201,16 +201,10 @@
.usealternate
{
pop
- % "QuarkXPress pictwpstops filter 1.0" generates a document,
- % which places an extra value on the operand stack
- % and tintTransform replaces it - see bug 549307
- % and the test case of bug 688584.
- % Here we use mark...cleartomark for providing a tolerance.
- mark
- true % An extra value for bogus Adobe tintTransform
currentcolor
currentcolorspace 3 get exec
- cleartomark
+ currentcolorspace 2 get
+ //clear_setcolor_operands exec
}
{ pop }
ifelse
More information about the gs-cvs
mailing list