home *** CD-ROM | disk | FTP | other *** search
/ Apollo 18: The Moon Missions / 990125_1647.ISO / Acrobat / WIN95 / ARCHIVE.Z / AcroRd32.exe / PSPROCSET / 13 < prev    next >
Text File  |  1997-06-16  |  5KB  |  230 lines

  1. %%BeginFile: sep_ops.prc
  2. %%Copyright: Copyright 1987-1996 Adobe Systems Incorporated. All Rights Reserved.
  3. %%Title: (Separation Procs)
  4. %%Version: 1.03
  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 pop 0.5 lt store
  83. }
  84. {
  85. gt /negativecolorplate exch store
  86. }
  87. ifelse
  88. /MakeReadOnlyArray {
  89. /packedarray where {
  90. pop packedarray
  91. }{
  92. array astore readonly
  93. } ifelse
  94. } bdef
  95. /findcmykcustomcolor where {
  96. pop
  97. }{
  98. /findcmykcustomcolor {
  99. 5 MakeReadOnlyArray
  100. } bdef
  101. } ifelse
  102. /setoverprint where {
  103. pop
  104. }{
  105. /setoverprint {
  106. pop
  107. } bdef
  108. } ifelse
  109. /setcustomcolor where {
  110. pop
  111. }{
  112. L1? {
  113. /setcustomcolor {
  114. exch
  115. aload pop pop
  116. 4 { 4 index mul 4 1 roll } repeat
  117. 5 -1 roll pop
  118. setcmykcolor
  119. } bdef
  120. }{
  121. /setcustomcolor {
  122. exch
  123. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  124. 0 4 getinterval
  125. [ exch /dup load exch cvx {mul exch dup}
  126. /forall load /pop load dup] cvx
  127. ] setcolorspace setcolor
  128. } bdef
  129. } ifelse
  130. } ifelse
  131. /ik 0 def /iy 0 def /im 0 def /ic 0 def
  132. /imagetint {
  133. ic .3 mul
  134. im .59 mul
  135. iy .11 mul
  136. ik add add add dup
  137. 1 gt{pop 1}if
  138. } bdef
  139. /setcmykcolor where {
  140. pop
  141. }{
  142. /setcmykcolor {
  143. /ik xdef /iy xdef /im xdef /ic xdef
  144. imagetint
  145. 1 exch sub setgray
  146. } bdef
  147. } ifelse
  148. /customcolorimage where {
  149. pop
  150. }{
  151. L1? {
  152. /customcolorimage{
  153. gsave
  154. colorexists {
  155. aload pop pop
  156. /ik xdef /iy xdef /im xdef /ic xdef
  157. currentcolortransfer
  158. {ik mul ik sub 1 add} addprocs
  159. 4 1 roll {iy mul iy sub 1 add} addprocs
  160. 4 1 roll{im mul im sub 1 add} addprocs
  161. 4 1 roll{ic mul ic sub 1 add} addprocs
  162. 4 1 roll setcolortransfer
  163. /magentabuf 0 string def
  164. /yellowbuf 0 string def
  165. /blackbuf 0 string def
  166. {
  167. colorimagebuffer dup length magentabuf length ne{
  168. dup length dup dup
  169. /magentabuf exch string def
  170. /yellowbuf exch string def
  171. /blackbuf exch string def
  172. }if
  173. dup magentabuf copy yellowbuf copy
  174. blackbuf copy pop
  175. } addprocs
  176. {magentabuf}{yellowbuf}{blackbuf} true 4 colorimage
  177. }{
  178. aload pop pop /ik xdef /iy xdef /im xdef /ic xdef /tint
  179. imagetint def
  180. currenttransfer
  181. {tint mul 1 tint sub add} addprocs settransfer image
  182. }ifelse
  183. grestore
  184. } bdef
  185. }{
  186. /customcolorimage {
  187. gsave
  188. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  189. 0 4 getinterval
  190. [ exch /dup load exch cvx {mul exch dup}
  191. /forall load /pop load dup] cvx
  192. ] setcolorspace
  193. 10 dict begin
  194. /ImageType 1 def
  195. /DataSource exch def
  196. /ImageMatrix exch def
  197. /BitsPerComponent exch def
  198. /Height exch def
  199. /Width exch def
  200. /Decode [1 0] def
  201. currentdict end
  202. image
  203. grestore
  204. } bdef
  205. } ifelse
  206. } ifelse
  207. /setseparationgray where {
  208. pop
  209. }{
  210. L1? {
  211. /setseparationgray { 1 exch sub dup dup dup setcmykcolor } bdef
  212. }{
  213. /setseparationgray { [/Separation /All /DeviceCMYK
  214. {dup dup dup}] setcolorspace 1 exch sub setcolor
  215. } bdef
  216. } ifelse
  217. } ifelse
  218. /separationimage where {
  219. pop
  220. }{
  221. /separationimage {
  222. gsave
  223. 1 1 1 1 (All)
  224. findcmykcustomcolor customcolorimage
  225. grestore
  226. } bdef
  227. } ifelse
  228. currentdict readonly pop end
  229. %%EndFile
  230.