[gs-cvs] gs/lib
Raph Levien
raph at casper.ghostscript.com
Wed Aug 28 10:34:18 PDT 2002
Update of /cvs/ghostscript/gs/lib
In directory casper:/tmp/cvs-serv7310/lib
Modified Files:
pdf_main.ps
Log Message:
Fix: Improve accuracy of transparency detection logic. Fixes SF
bug #586595.
Index: pdf_main.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_main.ps,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- pdf_main.ps 22 Aug 2002 07:12:28 -0000 1.55
+++ pdf_main.ps 28 Aug 2002 17:34:16 -0000 1.56
@@ -801,23 +801,21 @@
% ------ Transparency support ------ %
% Determine whether a page might invoke any transparency features:
-% - Group in the page dictionary
-% - Non-default ca, CA, or SMask in an ExtGState
-% - Form XObject with Group
+% - Non-default BM, ca, CA, or SMask in an ExtGState
% - Image XObject with SMask
-% ****** DO WE NEED TO LOOK IN RESOURCE DICTS OF OTHER CONTENT STREAMS? ******
+% Note: we deliberately don't check to see whether a Group is defined,
+% because Adobe Illustrator 10 (and possibly other applications) define
+% a page-level group whether transparency is actually used or not.
+% Ignoring the presence of Group is justified because, in the absence
+% of any other transparency features, they have no effect.
/pageusestransparency { % <pagedict> pageusestransparency <bool>
PDFversion 1.4 lt NOTRANSPARENCY or {
pop false
} {
- dup /Group known {
- pop true
- } {
- false exch {
- dup resourceusestransparency { pop not exit } if
- /Parent knownoget not { exit } if
- } loop
- } ifelse
+ false exch {
+ dup resourceusestransparency { pop not exit } if
+ /Parent knownoget not { exit } if
+ } loop
} ifelse
} bind def
% Check the Resources of a page or Form.
@@ -827,6 +825,9 @@
dup /ExtGState knownoget {
false exch {
exch pop oforce
+ dup /BM knownoget { dup /Normal ne exch /Compatible ne and
+ { pop not exit } if
+ } if
dup /ca knownoget { 1 ne { pop not exit } if } if
dup /CA knownoget { 1 ne { pop not exit } if } if
dup /SMask knownoget { /None ne { pop not exit } if } if
@@ -838,7 +839,6 @@
exch pop oforce dup /Subtype get
dup /Image eq { 1 index /SMask known { pop pop not exit } if } if
/Form eq {
- dup /Group known { pop not exit } if
resourceusestransparency { not exit } if
} {
pop
More information about the gs-cvs
mailing list