Annotation of ntddk/src/print/pscript/ps/image.cps, revision 1.1

1.1     ! root        1: 
        !             2: %%BeginResource: file Adobe_WinNT_BW_Images 2.0 0
        !             3: /iw 0 def/ih 0 def/im_save 0 def/setupimageproc 0 def/polarity 0 def/smoothflag
        !             4: 0 def/mystring 0 def/bpc 0 def/setup1asciiproc{[ currentfile mystring/readhexstring
        !             5: cvx/pop cvx ] cvx bind}b/setup1binaryproc{[ currentfile mystring/readstring
        !             6: cvx/pop cvx ] cvx bind}b/setup2asciiproc{currentfile/ASCII85Decode
        !             7: filter/RunLengthDecode filter}b/setup2binaryproc{currentfile/RunLengthDecode
        !             8: filter}b/mycolorspace{colspABC}def/myimagedict{/myimagedict 10 dict
        !             9: def myimagedict dup begin/ImageType 1 def/MultipleDataSource false
        !            10: def end}b/imageprocarray [/setup1binaryproc/setup1asciiproc/setup2binaryproc/setup2asciiproc
        !            11: ] def/L2Polarity{{[ 1 0 ]}{[ 0 1 ]}ifelse}b/beginimage{/im_save save
        !            12: def imageprocarray exch get/setupimageproc exch load def L2Polarity/polarity
        !            13: exch def/smoothflag exch def _snap translate/dx 2 index def/dy 1 index
        !            14: def neg scale/mystring exch string def/bpc exch def/ih exch def/iw
        !            15: exch def}b/endimage{im_save restore}b/1bitmaskimage{sgco myimagedict
        !            16: dup begin/Width iw def/Height ih def/Decode polarity def/ImageMatrix
        !            17: [iw 0 0 ih neg 0 ih] def/DataSource setupimageproc def/BitsPerComponent
        !            18: 1 def/Interpolate smoothflag def end imagemask}b/1bitcopyimage{sgco
        !            19: 0 0 72 dx DPI mul div 72 dy DPI mul div 1 2 index sub 1 2 index sub
        !            20: L2?{4}{6}ifelse -2 roll pop pop rf 1bitmaskimage}b/1bitbwcopyimage{0
        !            21: true 1 true 1bitcopyimage}b
        !            22: %%EndResource
        !            23: 
        !            24: %%BeginResource: file Adobe_WinNT_BW_Images_L1 2.0 0
        !            25:  L2? not DefIf_B{/setup2asciiproc{[/Level2ImagesError
        !            26: load aload pop true FatalErrorIf}b/setup2binaryproc/setup2asciiproc
        !            27: load def/L2Polarity{}def/1bitmaskimage{sgco iw ih polarity [iw 0 0
        !            28: ih neg 0 ih] setupimageproc imagemask}b}DefIf_E
        !            29: %%EndResource
        !            30: 
        !            31: %%BeginResource: file Adobe_WinNT_Co_Images_L1 2.0 0
        !            32:  L2? not DefIf_B{/testsystemdict{where{systemdict
        !            33: eq{true}{false}ifelse}{false}ifelse}b/ncolors 1 def/colorimage where{pop
        !            34: true}{false}ifelse{/ncolors 0 statusdict begin/processcolors where{pop
        !            35: pop processcolors}{/deviceinfo where{pop deviceinfo/Colors known{pop{deviceinfo/Colors
        !            36: get}}if}if}ifelse end def ncolors 0 ne{/colorimage testsystemdict/setcolortransfer
        !            37: testsystemdict/currentcolortransfer testsystemdict/currentcmykcolor
        !            38: testsystemdict and and and not{/ncolors 0 def}if}if}if ncolors dup
        !            39: 1 ne exch dup 3 ne exch 4 ne and and{/ncolors 0 def}if ncolors 1 eq
        !            40: DefIf_B{/expandbw{expandfactor mul round cvi bwclut exch get 255 div}b/doclutimage{pop/bwclut
        !            41: exch def bpc dup 8 eq{pop 255}{4 eq{15}{3}ifelse}ifelse/expandfactor
        !            42: exch def [/expandbw load/exec load dup currenttransfer exch ] cvx bind
        !            43: settransfer iw ih bpc [iw 0 0 ih neg 0 ih] setupimageproc image}b}DefIf_E
        !            44: ncolors dup 3 eq exch 4 eq or DefIf_B{/nullproc{{}}def/concatutil{/exec
        !            45: load 7 -1 roll/exec load}b/defsubclut{1 add getinterval def}b/spconcattransfer{/Dclut
        !            46: exch def/Cclut exch def/Bclut exch def/Aclut exch def/ncompute exch
        !            47: load def currentcolortransfer [{Aclut ncompute}concatutil ] cvx [{Bclut
        !            48: ncompute}concatutil ] cvx [{Cclut ncompute}concatutil ] cvx [{Dclut
        !            49: ncompute}concatutil ] cvx setcolortransfer}b/setuprgbcluts{/bit3x rgbclut
        !            50: length 3 sub def/bit1x bit3x 3 idiv def/rclut rgbclut def/gclut rclut
        !            51: 1 bit3x defsubclut/bclut rclut 2 bit3x defsubclut}b}DefIf_E ncolors
        !            52: 3 eq DefIf_B{/3compute{exch bit3x mul round cvi get 255 div}b/doclutimage{/rgbclut
        !            53: exch def pop setuprgbcluts/3compute rclut gclut bclut dup spconcattransfer
        !            54: iw ih bpc [iw 0 0 ih neg 0 ih] [ setupimageproc/exec load/dup load
        !            55: dup ] cvx nullproc nullproc true 3 colorimage}b}DefIf_E ncolors 4 eq
        !            56: DefIf_B{/ftoint{1 exch sub 255 mul round cvi}b/stuffclut{cmykindex
        !            57: 3 -1 roll put}b/4compute{exch bit4x mul round cvi get 255 div}b/invalidcolortable?
        !            58: true def/computecmykclut{setuprgbcluts/bit4x rgbclut length 3 idiv
        !            59: 4 mul 4 sub def/cmykclut bit4x 4 add string def/cclut cmykclut def/mclut
        !            60: cclut 1 bit4x defsubclut/yclut cclut 2 bit4x defsubclut/kclut cclut
        !            61: 3 bit4x defsubclut/cmykindex 0 def 0 1 bit1x{dup/cmykindex exch bit1x
        !            62: exch sub 4 mul def 3 mul dup rclut exch get 255 div exch dup gclut
        !            63: exch get 255 div exch bclut exch get 255 div setrgbcolor currentcmykcolor
        !            64: ftoint kclut stuffclut ftoint yclut stuffclut ftoint mclut stuffclut
        !            65: ftoint cclut stuffclut}for}b/doclutimage{/rgbclut exch def pop invalidcolortable?{computecmykclut}if/4compute
        !            66: cclut mclut yclut kclut spconcattransfer iw ih bpc [iw 0 0 ih neg 0
        !            67: ih] [ setupimageproc/exec load/dup load dup dup ] cvx nullproc nullproc
        !            68: nullproc true 4 colorimage}b}DefIf_E ncolors 0 eq DefIf_B{/lookupandstore{3
        !            69: mul 3 getinterval putinterval exch 3 add exch 3 copy}b/8lookup/lookupandstore
        !            70: load def/4lookup{/byte 1 index def -4 bitshift lookupandstore byte
        !            71: 15 and lookupandstore}b/2lookup{/byte 1 index def -6 bitshift lookupandstore
        !            72: byte -4 bitshift 3 and lookupandstore byte -2 bitshift 3 and lookupandstore
        !            73: byte 3 and lookupandstore}b/colorexpand{mystringexp 0 rgbclut 3 copy
        !            74: 7 -1 roll/mylookup load forall pop pop pop pop pop}b/createexpandstr{/mystringexp
        !            75: exch mystring length mul string def}b/doclutimage{/rgbclut exch def
        !            76: pop/mylookup bpc 8 eq{3 createexpandstr/8lookup}{bpc 4 eq{6 createexpandstr/4lookup}{12
        !            77: createexpandstr/2lookup}ifelse}ifelse load def iw ih bpc [iw 0 0 ih
        !            78: neg 0 ih] [ setupimageproc/exec load/colorexpand load/exec load] cvx
        !            79: false 3 colorimage}b}DefIf_E/colorimage where{pop true}{false}ifelse
        !            80: DefIf_B{/do24image{iw ih 8 [iw 0 0 ih neg 0 ih] setupimageproc false
        !            81: 3 colorimage}b}DefIf_El{/rgbtogray{/str exch def/len str length def/smlen
        !            82: len 3 idiv def/rstr str def/gstr str 1 len 1 sub getinterval def/bstr
        !            83: str 2 len 2 sub getinterval def str dup 0 1 smlen 1 sub{dup 3 mul rstr
        !            84: 1 index get .3 mul gstr 2 index get .59 mul add bstr 3 -1 roll get
        !            85: .11 mul add round cvi put dup}for pop 0 smlen getinterval}b/do24image{iw
        !            86: ih 8 [iw 0 0 ih neg 0 ih] [ setupimageproc/exec load/rgbtogray load/exec
        !            87: load ] cvx bind image}b}DefIf_E/doNimage{bpc 24 eq{do24image}{iw ih
        !            88: bpc [iw 0 0 ih neg 0 ih] setupimageproc image}ifelse}b}DefIf_E
        !            89: %%EndResource
        !            90: 
        !            91: %%BeginResource: file Adobe_WinNT_Co_Images_L2 2.0 0
        !            92:  L2?
        !            93: DefIf_B{/doclutimage{/rgbclut exch def pop bpc dup 8 eq{pop 255}{4
        !            94: eq{15}{3}ifelse}ifelse/hival exch def [/Indexed colspABC hival rgbclut]
        !            95: setcolorspace myimagedict dup begin/Width iw def/Height ih def/Decode
        !            96: [0 hival] def/ImageMatrix [iw 0 0 ih neg 0 ih] def/DataSource setupimageproc
        !            97: def/BitsPerComponent bpc def/Interpolate smoothflag def end image}b/doNimage{bpc
        !            98: 24 eq{colspABC}{colspA}ifelse setcolorspace myimagedict dup begin/Width
        !            99: iw def/Height ih def/Decode bpc 24 eq{[0 1 0 1 0 1]}{[0 1]}ifelse def/ImageMatrix
        !           100: [iw 0 0 ih neg 0 ih] def/DataSource setupimageproc def/BitsPerComponent
        !           101: bpc 24 eq{8}{bpc}ifelse def/Interpolate smoothflag def end image}b}DefIf_E
        !           102: %%EndResource
        !           103: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.