home *** CD-ROM | disk | FTP | other *** search
/ Hacker 27 / HACKER27.BIN / Infoexpress / AcroRd32.exe / PSPROCSET / 14 < prev    next >
Text File  |  2000-01-27  |  4KB  |  226 lines

  1. %%BeginResource: procset sep_ops
  2. %%Version: 4.0 1
  3. %%Copyright: Copyright 1987-1999 Adobe Systems Incorporated. All Rights Reserved.
  4. %%Title: Support for Separations in Level 1, following the conventions of Tech Note 5044
  5. userdict /sep_ops 50 dict dup begin put
  6. /bdef {bind def} bind def
  7. /xdef {exch def} bdef
  8. /colorimagebuffer {
  9. 0 1 2 index length 1 sub {
  10. dup 2 index exch get 255 exch sub 2 index 3 1 roll put
  11. } for
  12. } bdef
  13. /addprocs {
  14. [ 3 1 roll
  15. /exec load
  16. dup 3 1 roll
  17. ] cvx
  18. } bdef
  19. /L1? {
  20. systemdict /languagelevel known {
  21. systemdict /languagelevel get 2 lt
  22. }{
  23. true
  24. } ifelse
  25. } bdef
  26. /colorexists {
  27. statusdict /processcolors known {
  28. statusdict /processcolors get exec
  29. }{
  30. /deviceinfo where {
  31. pop deviceinfo /Colors known {
  32. deviceinfo /Colors get
  33. statusdict /processcolors {
  34. deviceinfo /Colors known {
  35. deviceinfo /Colors get
  36. }{
  37. 1
  38. } ifelse
  39. } put
  40. }{
  41. 1
  42. } ifelse
  43. }{
  44. 1
  45. } ifelse
  46. } ifelse
  47. 1 gt
  48. } bdef
  49. /colorplate colorexists { 0 } { 5 } ifelse def
  50. /negativecolorplate false def
  51. /setcmykcolor where {
  52. pop
  53. gsave
  54. 1 0 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  55. 0 1 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  56. 0 0 1 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  57. 0 0 0 1 setcmykcolor systemdict /currentgray get exec 1 exch sub
  58. 4 {4 copy} repeat
  59. grestore
  60. 1 dict begin
  61. /foureq {
  62. 4 index eq 8 1 roll
  63. 4 index eq 8 1 roll
  64. 4 index eq 8 1 roll
  65. 4 index eq 8 1 roll
  66. pop pop pop pop and and and
  67. } def
  68. 1 0 0 0 foureq {/colorplate 1 store} if
  69. 0 1 0 0 foureq {/colorplate 2 store} if
  70. 0 0 1 0 foureq {/colorplate 3 store} if
  71. 0 0 0 1 foureq {/colorplate 4 store} if
  72. 0 0 0 0 foureq {/colorplate 6 store} if
  73. end
  74. } if
  75. 0 systemdict /currenttransfer get exec exec
  76. 1 systemdict /currenttransfer get exec exec
  77. 2 copy
  78. eq
  79. {
  80. /colorplate 6 store
  81. pop
  82. /negativecolorplate exch 0.5 lt store
  83. }
  84. {
  85. gt /negativecolorplate exch store
  86. }
  87. ifelse
  88. /findcmykcustomcolor where { pop }
  89. {
  90. /findcmykcustomcolor {
  91. [ 6 1 roll ] readonly
  92. } bdef
  93. } ifelse
  94. /setoverprint where {
  95. pop
  96. }{
  97. /setoverprint {
  98. pop
  99. } bdef
  100. } ifelse
  101. /setcustomcolor where {
  102. pop
  103. }{
  104. L1? {
  105. /setcustomcolor {
  106. exch
  107. aload pop pop
  108. 4 { 4 index mul 4 1 roll } repeat
  109. 5 -1 roll pop
  110. setcmykcolor
  111. } bdef
  112. }{
  113. /setcustomcolor {
  114. exch
  115. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  116. 0 4 getinterval
  117. [ exch /dup load exch cvx {mul exch dup}
  118. /forall load /pop load dup] cvx
  119. ] setcolorspace setcolor
  120. } bdef
  121. } ifelse
  122. } ifelse
  123. /ik 0 def
  124. /iy 0 def
  125. /im 0 def
  126. /ic 0 def
  127. /imagetint {
  128. ic .3 mul
  129. im .59 mul
  130. iy .11 mul
  131. ik add add add dup
  132. 1 gt {pop 1} if
  133. } bdef
  134. /setcmykcolor where {
  135. pop
  136. }{
  137. /setcmykcolor {
  138. /ik xdef /iy xdef /im xdef /ic xdef
  139. imagetint
  140. 1 exch sub setgray
  141. } bdef
  142. } ifelse
  143. /customcolorimage where {
  144. pop
  145. }{
  146. L1? {
  147. /customcolorimage{
  148. gsave
  149. colorexists {
  150. aload pop pop
  151. /ik xdef /iy xdef /im xdef /ic xdef
  152. currentcolortransfer
  153. {ik mul ik sub 1 add} addprocs
  154. 4 1 roll {iy mul iy sub 1 add} addprocs
  155. 4 1 roll {im mul im sub 1 add} addprocs
  156. 4 1 roll {ic mul ic sub 1 add} addprocs
  157. 4 1 roll setcolortransfer
  158. /magentabuf 0 string def
  159. /yellowbuf 0 string def
  160. /blackbuf 0 string def
  161. {
  162. colorimagebuffer dup length magentabuf length ne
  163. {
  164. dup length dup dup
  165. /magentabuf exch string def
  166. /yellowbuf exch string def
  167. /blackbuf exch string def
  168. } if
  169. dup magentabuf copy yellowbuf copy
  170. blackbuf copy pop
  171. } addprocs
  172. {magentabuf}{yellowbuf}{blackbuf} true 4 colorimage
  173. }{
  174. aload pop pop /ik xdef /iy xdef /im xdef /ic xdef /tint
  175. imagetint def
  176. currenttransfer
  177. {tint mul 1 tint sub add} addprocs settransfer image
  178. } ifelse
  179. grestore
  180. } bdef
  181. }{
  182. /customcolorimage {
  183. gsave
  184. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  185. 0 4 getinterval
  186. [ exch /dup load exch cvx {mul exch dup}
  187. /forall load /pop load dup] cvx
  188. ] setcolorspace
  189. 10 dict begin
  190. /ImageType 1 def
  191. /DataSource exch def
  192. /ImageMatrix exch def
  193. /BitsPerComponent exch def
  194. /Height exch def
  195. /Width exch def
  196. /Decode [1 0] def
  197. currentdict end
  198. image
  199. grestore
  200. } bdef
  201. } ifelse
  202. } ifelse
  203. /setseparationgray where {
  204. pop
  205. }{
  206. L1? {
  207. /setseparationgray { 1 exch sub dup dup dup setcmykcolor } bdef
  208. }{
  209. /setseparationgray {
  210. [/Separation /All /DeviceCMYK {dup dup dup}] setcolorspace
  211. 1 exch sub setcolor
  212. } bdef
  213. } ifelse
  214. } ifelse
  215. /separationimage where { pop }
  216. {
  217. /separationimage {
  218. gsave
  219. 1 1 1 1 (All)
  220. findcmykcustomcolor customcolorimage
  221. grestore
  222. } bdef
  223. } ifelse
  224. currentdict readonly pop end
  225. %%EndResource
  226.