[gs-cvs] rev 7497 - trunk/gs/lib
giles at ghostscript.com
giles at ghostscript.com
Tue Dec 12 16:26:05 PST 2006
Author: giles
Date: 2006-12-12 16:26:05 -0800 (Tue, 12 Dec 2006)
New Revision: 7497
Modified:
trunk/gs/lib/pdf_base.ps
Log:
Reenable the jpxparmfix call, after making it check specifically for a
JPXDecode filter. Adding a ParmDict to filters that don't take
parameters caused problems with some PDF files. Bug 688869.
Modified: trunk/gs/lib/pdf_base.ps
===================================================================
--- trunk/gs/lib/pdf_base.ps 2006-12-12 10:22:38 UTC (rev 7496)
+++ trunk/gs/lib/pdf_base.ps 2006-12-13 00:26:05 UTC (rev 7497)
@@ -856,16 +856,22 @@
% the image stream itself. We therefore propagate any such key into
% a filter's DecodeParms.
/jpxparmfix { % <streamdict> <readdata?> jpxparmfix <streamdict <readdata?>
- 1 index /ColorSpace knownoget {
- 2 index /DecodeParms knownoget {
- % insert in the existing DecodeParms dict
- /ColorSpace 3 -1 roll put
- }{
- 1 dict % need to create a custom DecodeParms dict
- dup /ColorSpace 4 -1 roll put
- 2 index exch /DecodeParms exch put
- } ifelse
- } if
+ 1 index /Filter .knownget
+ { /JPXDecode eq % we only need to do this for JPXDecode filters
+ % TODO: handle filter arrays
+ {
+ 1 index /ColorSpace knownoget {
+ 2 index /DecodeParms knownoget {
+ % insert in the existing DecodeParms dict
+ /ColorSpace 3 -1 roll put
+ }{
+ 1 dict % need to create a custom DecodeParms dict
+ dup /ColorSpace 4 -1 roll put
+ 2 index exch /DecodeParms exch put
+ } ifelse
+ } if
+ } if
+ } if
} bind def
% Resolve a stream dictionary to a PostScript stream.
@@ -876,7 +882,7 @@
% Note that, in general, resolving a stream repositions PDFfile.
% Clients must save and restore the position of PDFfile themselves.
/resolvestream { % <streamdict> <readdata?> resolvestream <stream>
- %%%% DISABLED UNTIL THIS IS FIXED %%%% jpxparmfix
+ jpxparmfix
1 index /F knownoget {
% This stream is stored on an external file.
(r) file 3 -1 roll
More information about the gs-cvs
mailing list