home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2000 March
/
VPR0003B.ISO
/
support
/
usprndrv
/
alpha
/
pscript4.dll
/
259
/
15
< prev
next >
Wrap
Text File
|
1999-10-14
|
5KB
|
70 lines
%%BeginResource: file Pscript_Win_Dib_L1 5.0 0
/iw 0 d/ih 0 d/im_save 0 d/s 0 d/polarity 0 d/smoothflag 0 d/mystring 0 d/bpc 0
d/setup1asciiproc{[currentfile mystring/readhexstring cvx/! cvx]cvx bind}b
/setup1binaryproc{[currentfile mystring/readstring cvx/! cvx]cvx bind}b
/setup2asciiproc{[/Level2ImagesError , aload ! T FatalErrorIf}b
/setup2binaryproc/setup2asciiproc , d/mycolorspace{colspABC}d/pp 1 string d/ss
1 string d/rledecodebinary{/DC 0 d/BC 0 d{DC mystring length ge{exit}if
currentfile ss readstring ! 0 get/BC ~ d BC 127 le{/BC BC 1 add d DC 1 DC BC
add 1 sub{mystring ~ currentfile ss readstring ! 0 get put}for}{/BC 257 BC sub
d currentfile ss readstring ! 0 get/pp ~ d DC 1 DC BC add 1 sub{mystring ~ pp
put}for}?/DC DC BC add d}loop mystring}b/rledecodeascii{/DC 0 d/BC 0 d{DC
mystring length ge{exit}if currentfile ss readhexstring ! 0 get/BC ~ d BC 127
le{/BC BC 1 add d DC 1 DC BC add 1 sub{mystring ~ currentfile ss readhexstring
! 0 get put}for}{/BC 257 BC sub d currentfile ss readhexstring ! 0 get/pp ~ d
DC 1 DC BC add 1 sub{mystring ~ pp put}for}?/DC DC BC add d}loop mystring}b
/setup1asciidecodeproc{[/rledecodeascii cvx]cvx bind}b/setup1binarydecodeproc{[
/rledecodebinary cvx]cvx bind}b/myimagedict{/myimagedict 10 dict d myimagedict
@ `/ImageType 1 d/MultipleDataSource F d E}b/imageprocarray[/setup1binaryproc
/setup1asciiproc/setup2binaryproc/setup2asciiproc/setup1binarydecodeproc
/setup1asciidecodeproc]d/Q{/im_save save d scol imageprocarray ~ get/s ~ , d
/polarity ~ d/smoothflag ~ d +/dx 2 ^ d/dy 1 ^ d +S/mystring ~ string d/bpc ~ d
/ih ~ d/iw ~ d fx rf}b/X{/im_save save d ! ! imageprocarray ~ get/s ~ , d
/polarity ~ d/smoothflag ~ d +/dx 2 ^ d/dy 1 ^ d +S/mystring ~ string d/bpc ~ d
/ih ~ d/iw ~ d}b/Z{im_save restore}b/Y{scol iw ih polarity[iw 0 0 ih 0 0]s
imagemask}b/testsystemdict{where{systemdict eq{T}{F}?}{F}?}b/c 1 d/colorimage
where{! T}{F}?{/c 0 statusdict `/processcolors where{! ! processcolors}{
/deviceinfo where{! deviceinfo/Colors known{!{deviceinfo/Colors get}}if}if}? E
d c 0 ne{/colorimage testsystemdict/setcolortransfer testsystemdict
/currentcolortransfer testsystemdict/currentcmykcolor testsystemdict and and
and not{/c 0 d}if}if}if c @ 1 ne ~ @ 3 ne ~ 4 ne and and{/c 0 d}if c 1 eq g{
/expandbw{expandfactor mul round cvi bwclut ~ get 255 V}b/doclutimage{/bwclut ~
d bpc @ 8 eq{! 255}{4 eq{15}{3}?}?/expandfactor ~ d[/expandbw ,/exec , @
currenttransfer ~]cvx bind settransfer iw ih bpc[iw 0 0 ih 0 0]s image}b}e c @
3 eq ~ 4 eq or g{/nullproc{{}}d/concatutil{/exec , 7 -1 $/exec ,}b/defsubclut{1
add getinterval d}b/spconcattransfer{/Dclut ~ d/Cclut ~ d/Bclut ~ d/Aclut ~ d
/ncompute ~ , d currentcolortransfer[{Aclut ncompute}concatutil]cvx[{Bclut
ncompute}concatutil]cvx[{Cclut ncompute}concatutil]cvx[{Dclut ncompute}
concatutil]cvx setcolortransfer}b/setuprgbcluts{/bit3x rgbclut length 3 sub d
/bit1x bit3x 3 idiv d/rclut rgbclut d/gclut rclut 1 bit3x defsubclut/bclut
rclut 2 bit3x defsubclut}b}e c 3 eq g{/3compute{~ bit3x mul round cvi get 255
V}b/doclutimage{/rgbclut ~ d setuprgbcluts/3compute rclut gclut bclut @
spconcattransfer iw ih bpc[iw 0 0 ih 0 0][s/exec ,/@ , @]cvx nullproc nullproc
T 3 colorimage}b}e c 4 eq g{/ftoint{1 ~ sub 255 mul round cvi}b/stuffclut
{cmykindex 3 -1 $ put}b/4compute{~ bit4x mul round cvi get 255 V}b
/invalidcolortable? T d/computecmykclut{setuprgbcluts/bit4x rgbclut length 3
idiv 4 mul 4 sub d/cmykclut bit4x 4 add string d/cclut cmykclut d/mclut cclut 1
bit4x defsubclut/yclut cclut 2 bit4x defsubclut/kclut cclut 3 bit4x defsubclut
/cmykindex 0 d 0 1 bit1x{@/cmykindex ~ bit1x ~ sub 4 mul d 3 mul @ rclut ~ get
255 V ~ @ gclut ~ get 255 V ~ bclut ~ get 255 V setrgbcolor currentcmykcolor
ftoint kclut stuffclut ftoint yclut stuffclut ftoint mclut stuffclut ftoint
cclut stuffclut}for}b/doclutimage{/rgbclut ~ d invalidcolortable?
{computecmykclut}if/4compute cclut mclut yclut kclut spconcattransfer iw ih bpc
[iw 0 0 ih 0 0][s/exec ,/@ , @ @]cvx nullproc nullproc nullproc T 4 colorimage}
b}e c 0 eq g{/a{3 mul 3 getinterval putinterval ~ 3 add ~ 3 copy}b/8lookup/a ,
d/4lookup{/byte 1 ^ d -4 bitshift a byte 15 and a}b/2lookup{/byte 1 ^ d -6
bitshift a byte -4 bitshift 3 and a byte -2 bitshift 3 and a byte 3 and a}b
/colorexpand{mystringexp 0 rgbclut 3 copy 7 -1 $/mylookup , forall ! ! ! ! !}b
/createexpandstr{/mystringexp ~ mystring length mul string d}b/doclutimage{
/rgbclut ~ d/mylookup bpc 8 eq{3 createexpandstr/8lookup}{bpc 4 eq{6
createexpandstr/4lookup}{12 createexpandstr/2lookup}?}? , d iw ih 8[iw 0 0 ih 0
0][s/exec ,/colorexpand ,/exec ,]cvx F 3 colorimage}b}e/colorimage where{! T}
{F}? g{/do24image{iw ih 8[iw 0 0 ih 0 0]s F 3 colorimage}b}DefIf_El{/rgbtogray{
/str ~ d/len str length d/smlen len 3 idiv d/rstr str d/gstr str 1 len 1 sub
getinterval d/bstr str 2 len 2 sub getinterval d str @ 0 1 smlen 1 sub{@ 3 mul
rstr 1 ^ get .3 mul gstr 2 ^ get .59 mul add bstr 3 -1 $ get .11 mul add round
cvi put @}for ! 0 smlen getinterval}b/do24image{iw ih 8[iw 0 0 ih 0 0][s/exec ,
/rgbtogray ,/exec ,]cvx bind image}b}e/doNimage{bpc 24 eq{do24image}{iw ih bpc
[iw 0 0 ih 0 0]s image}?}b
%%EndResource