diff options
Diffstat (limited to 'Master/tlpkg/tlgs/lib/viewgif.ps')
-rw-r--r-- | Master/tlpkg/tlgs/lib/viewgif.ps | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/Master/tlpkg/tlgs/lib/viewgif.ps b/Master/tlpkg/tlgs/lib/viewgif.ps index 2b7aecae71b..78c45bdb221 100644 --- a/Master/tlpkg/tlgs/lib/viewgif.ps +++ b/Master/tlpkg/tlgs/lib/viewgif.ps @@ -1,19 +1,19 @@ % Copyright (C) 1989, 1992, 1993, 1998 Aladdin Enterprises. All rights reserved. -% +% % This software is provided AS-IS with no warranty, either express or % implied. -% +% % This software is distributed under license and may not be copied, % modified or distributed except as expressly authorized under the terms % of the license contained in the file LICENSE in this distribution. -% +% % For more information about licensing, please refer to % http://www.ghostscript.com/licensing/. For information on % commercial licensing, go to http://www.artifex.com/licensing/ or % contact Artifex Software, Inc., 101 Lucas Valley Road #110, % San Rafael, CA 94903, U.S.A., +1(415)492-9861. -% $Id: viewgif.ps 6300 2005-12-28 19:56:24Z giles $ +% $Id$ % viewgif.ps % Display a GIF file. @@ -48,7 +48,7 @@ } bind def /readGIFimageHeader % <file> readGIFimageHeader <dict> - % Note: GIF header must be on dict stack + % Note: GIF header must be on dict stack { 10 dict begin { dup read1 dup (!) 0 get ne { exit } if pop % extension @@ -80,21 +80,21 @@ /imageGIF % <imagedict> imageGIF { /ImageOut where { pop - % We know BitsPerComponent = 8, Decode = [0 255]. - % and there is only a single data source which is - % either a filter or a string whose size is exactly - % the width of the row. + % We know BitsPerComponent = 8, Decode = [0 255]. + % and there is only a single data source which is + % either a filter or a string whose size is exactly + % the width of the row. dup /DataSource get dup type /stringtype eq { ImageOut exch writestring } { pop dup /Width get string - 1 index /Height get - { 1 index /DataSource get 1 index readstring pop - ImageOut exch writestring - } - repeat pop pop + 1 index /Height get + { 1 index /DataSource get 1 index readstring pop + ImageOut exch writestring + } + repeat pop pop } - ifelse + ifelse } { image } @@ -115,9 +115,9 @@ VGIFDEBUG { ImageHeader { exch == == } forall (----------------\n) print flush } if /D F << /InitialCodeLength F read1 - /FirstBitLowOrder true - /BlockData true - /EarlyChange 0 + /FirstBitLowOrder true + /BlockData true + /EarlyChange 0 >> /LZWDecode filter def [/Indexed /DeviceRGB 1 BitsPerPixel bitshift 1 sub Palette] setcolorspace @@ -125,25 +125,25 @@ 0 1 3 { 2 copy get dup 0 ne { dup abs div } if 3 copy put pop pop } for setmatrix << /ImageType 1 - /ImageMatrix [1 0 0 -1 0 Height] - /BitsPerComponent 8 - /Decode [0 255] + /ImageMatrix [1 0 0 -1 0 Height] + /BitsPerComponent 8 + /Decode [0 255] Interlaced { /Width Width /Height 1 - /row Width string def - /DataSource row + /row Width string def + /DataSource row >> /I exch def /inter % <num> <denom> inter - { /denom exch def /num exch def gsave - /lines Height denom 1 sub add num sub denom idiv def - 0 1 lines 1 sub { - Height exch denom mul num add sub - I /ImageMatrix get 5 3 -1 roll put - D row readstring pop pop - I imageGIF - } for - grestore + /lines Height denom 1 sub add num sub denom idiv def + 0 1 lines 1 sub { + Height exch denom mul num add sub + I /ImageMatrix get 5 3 -1 roll put + D row readstring pop pop + I imageGIF + } for + grestore } bind def 0 8 inter @@ -152,9 +152,9 @@ 1 2 inter } { /Width Width /Height Height - /DataSource D + /DataSource D >> imageGIF } ifelse saved end end end restore - } bind def + } bind def |