home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 March / VPR0003B.ISO / support / usprndrv / i386 / pscript4.dll / 259 / 15 < prev    next >
Text File  |  1999-10-14  |  5KB  |  70 lines

  1. %%BeginResource: file Pscript_Win_Dib_L1 5.0 0
  2. /iw 0 d/ih 0 d/im_save 0 d/s 0 d/polarity 0 d/smoothflag 0 d/mystring 0 d/bpc 0
  3. d/setup1asciiproc{[currentfile mystring/readhexstring cvx/! cvx]cvx bind}b
  4. /setup1binaryproc{[currentfile mystring/readstring cvx/! cvx]cvx bind}b
  5. /setup2asciiproc{[/Level2ImagesError , aload ! T FatalErrorIf}b
  6. /setup2binaryproc/setup2asciiproc , d/mycolorspace{colspABC}d/pp 1 string d/ss
  7. 1 string d/rledecodebinary{/DC 0 d/BC 0 d{DC mystring length ge{exit}if
  8. currentfile ss readstring ! 0 get/BC ~ d BC 127 le{/BC BC 1 add d DC 1 DC BC
  9. add 1 sub{mystring ~ currentfile ss readstring ! 0 get put}for}{/BC 257 BC sub
  10. d currentfile ss readstring ! 0 get/pp ~ d DC 1 DC BC add 1 sub{mystring ~ pp
  11. put}for}?/DC DC BC add d}loop mystring}b/rledecodeascii{/DC 0 d/BC 0 d{DC
  12. mystring length ge{exit}if currentfile ss readhexstring ! 0 get/BC ~ d BC 127
  13. le{/BC BC 1 add d DC 1 DC BC add 1 sub{mystring ~ currentfile ss readhexstring
  14. ! 0 get put}for}{/BC 257 BC sub d currentfile ss readhexstring ! 0 get/pp ~ d
  15. DC 1 DC BC add 1 sub{mystring ~ pp put}for}?/DC DC BC add d}loop mystring}b
  16. /setup1asciidecodeproc{[/rledecodeascii cvx]cvx bind}b/setup1binarydecodeproc{[
  17. /rledecodebinary cvx]cvx bind}b/myimagedict{/myimagedict 10 dict d myimagedict
  18. @ `/ImageType 1 d/MultipleDataSource F d E}b/imageprocarray[/setup1binaryproc
  19. /setup1asciiproc/setup2binaryproc/setup2asciiproc/setup1binarydecodeproc
  20. /setup1asciidecodeproc]d/Q{/im_save save d scol imageprocarray ~ get/s ~ , d
  21. /polarity ~ d/smoothflag ~ d +/dx 2 ^ d/dy 1 ^ d +S/mystring ~ string d/bpc ~ d
  22. /ih ~ d/iw ~ d fx rf}b/X{/im_save save d ! ! imageprocarray ~ get/s ~ , d
  23. /polarity ~ d/smoothflag ~ d +/dx 2 ^ d/dy 1 ^ d +S/mystring ~ string d/bpc ~ d
  24. /ih ~ d/iw ~ d}b/Z{im_save restore}b/Y{scol iw ih polarity[iw 0 0 ih 0 0]s
  25. imagemask}b/testsystemdict{where{systemdict eq{T}{F}?}{F}?}b/c 1 d/colorimage
  26. where{! T}{F}?{/c 0 statusdict `/processcolors where{! ! processcolors}{
  27. /deviceinfo where{! deviceinfo/Colors known{!{deviceinfo/Colors get}}if}if}? E
  28. d c 0 ne{/colorimage testsystemdict/setcolortransfer testsystemdict
  29. /currentcolortransfer testsystemdict/currentcmykcolor testsystemdict and and
  30. 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{
  31. /expandbw{expandfactor mul round cvi bwclut ~ get 255 V}b/doclutimage{/bwclut ~
  32. d bpc @ 8 eq{! 255}{4 eq{15}{3}?}?/expandfactor ~ d[/expandbw ,/exec , @
  33. currenttransfer ~]cvx bind settransfer iw ih bpc[iw 0 0 ih 0 0]s image}b}e c @
  34. 3 eq ~ 4 eq or g{/nullproc{{}}d/concatutil{/exec , 7 -1 $/exec ,}b/defsubclut{1
  35. add getinterval d}b/spconcattransfer{/Dclut ~ d/Cclut ~ d/Bclut ~ d/Aclut ~ d
  36. /ncompute ~ , d currentcolortransfer[{Aclut ncompute}concatutil]cvx[{Bclut
  37. ncompute}concatutil]cvx[{Cclut ncompute}concatutil]cvx[{Dclut ncompute}
  38. concatutil]cvx setcolortransfer}b/setuprgbcluts{/bit3x rgbclut length 3 sub d
  39. /bit1x bit3x 3 idiv d/rclut rgbclut d/gclut rclut 1 bit3x defsubclut/bclut
  40. rclut 2 bit3x defsubclut}b}e c 3 eq g{/3compute{~ bit3x mul round cvi get 255
  41. V}b/doclutimage{/rgbclut ~ d setuprgbcluts/3compute rclut gclut bclut @
  42. spconcattransfer iw ih bpc[iw 0 0 ih 0 0][s/exec ,/@ , @]cvx nullproc nullproc
  43. T 3 colorimage}b}e c 4 eq g{/ftoint{1 ~ sub 255 mul round cvi}b/stuffclut
  44. {cmykindex 3 -1 $ put}b/4compute{~ bit4x mul round cvi get 255 V}b
  45. /invalidcolortable? T d/computecmykclut{setuprgbcluts/bit4x rgbclut length 3
  46. idiv 4 mul 4 sub d/cmykclut bit4x 4 add string d/cclut cmykclut d/mclut cclut 1
  47. bit4x defsubclut/yclut cclut 2 bit4x defsubclut/kclut cclut 3 bit4x defsubclut
  48. /cmykindex 0 d 0 1 bit1x{@/cmykindex ~ bit1x ~ sub 4 mul d 3 mul @ rclut ~ get
  49. 255 V ~ @ gclut ~ get 255 V ~ bclut ~ get 255 V setrgbcolor currentcmykcolor
  50. ftoint kclut stuffclut ftoint yclut stuffclut ftoint mclut stuffclut ftoint
  51. cclut stuffclut}for}b/doclutimage{/rgbclut ~ d invalidcolortable?
  52. {computecmykclut}if/4compute cclut mclut yclut kclut spconcattransfer iw ih bpc
  53. [iw 0 0 ih 0 0][s/exec ,/@ , @ @]cvx nullproc nullproc nullproc T 4 colorimage}
  54. b}e c 0 eq g{/a{3 mul 3 getinterval putinterval ~ 3 add ~ 3 copy}b/8lookup/a ,
  55. d/4lookup{/byte 1 ^ d -4 bitshift a byte 15 and a}b/2lookup{/byte 1 ^ d -6
  56. bitshift a byte -4 bitshift 3 and a byte -2 bitshift 3 and a byte 3 and a}b
  57. /colorexpand{mystringexp 0 rgbclut 3 copy 7 -1 $/mylookup , forall ! ! ! ! !}b
  58. /createexpandstr{/mystringexp ~ mystring length mul string d}b/doclutimage{
  59. /rgbclut ~ d/mylookup bpc 8 eq{3 createexpandstr/8lookup}{bpc 4 eq{6
  60. createexpandstr/4lookup}{12 createexpandstr/2lookup}?}? , d iw ih 8[iw 0 0 ih 0
  61. 0][s/exec ,/colorexpand ,/exec ,]cvx F 3 colorimage}b}e/colorimage where{! T}
  62. {F}? g{/do24image{iw ih 8[iw 0 0 ih 0 0]s F 3 colorimage}b}DefIf_El{/rgbtogray{
  63. /str ~ d/len str length d/smlen len 3 idiv d/rstr str d/gstr str 1 len 1 sub
  64. getinterval d/bstr str 2 len 2 sub getinterval d str @ 0 1 smlen 1 sub{@ 3 mul
  65. rstr 1 ^ get .3 mul gstr 2 ^ get .59 mul add bstr 3 -1 $ get .11 mul add round
  66. cvi put @}for ! 0 smlen getinterval}b/do24image{iw ih 8[iw 0 0 ih 0 0][s/exec ,
  67. /rgbtogray ,/exec ,]cvx bind image}b}e/doNimage{bpc 24 eq{do24image}{iw ih bpc
  68. [iw 0 0 ih 0 0]s image}?}b
  69. %%EndResource
  70.