home *** CD-ROM | disk | FTP | other *** search
/ The See Clearly Method / TheSeeClearlyMethod.iso / Media / Acrobat / reader.exe / PSPROCSET / 10 < prev    next >
Text File  |  2000-01-27  |  4KB  |  173 lines

  1. %%BeginResource: pdfimg1c.prc
  2. %%Copyright: Copyright 1987-1993 Adobe Systems Incorporated. All Rights Reserved.
  3. PDF /PDFImage get begin
  4. Level2? not StartLoad {
  5. /DeviceRGB [ 3
  6. {
  7. Width Height BitsPerComponent ImageMatrix ImageFilter 3
  8. ColorImage
  9. } bind
  10. ] InstallImage
  11. /DeviceCMYK [ 4
  12. {
  13. Width Height BitsPerComponent ImageMatrix ImageFilter 4
  14. ColorImage
  15. } bind
  16. ] InstallImage
  17. /ColorImage? /colorimage where { pop true } { false } ifelse def
  18. ColorImage? StartLoad {
  19. /ColorImage { false exch colorimage } bd
  20. } EndLoad
  21. ColorImage? not StartLoad {
  22. /SetupColorImage {
  23. /CIConv 255 2 BitsPerComponent exp 1 sub div pv
  24. /CIMask 0 not BitsPerComponent bitshift not pv
  25. /CIBSelect BitsPerComponent 1 sub not 7 and pv
  26. /CIBufferExp CIWidth string pv
  27. } bd
  28. /rgbtogray {
  29. 0.11 mul exch 0.59 mul add exch 0.3 mul add round cvi
  30. } bd
  31. /cmyktogray {
  32. exch 0.11 mul add exch 0.59 mul add exch 0.3 mul add round cvi
  33. dup 255 gt { pop 255 } if
  34. 255 exch sub
  35. } bd
  36. /FastRGB {
  37. CIDataProc dup
  38. 0 3 2 index length 3 sub
  39. {
  40. dup 3 idiv
  41. 2 index 2 index get
  42. 3 index 3 index 1 add get
  43. 4 index 4 index 2 add get
  44. rgbtogray
  45. 3 -1 roll pop put dup
  46. } for
  47. 0 exch length 3 idiv getinterval
  48. } bd
  49. /FastCMYK {
  50. CIDataProc dup
  51. 0 4 2 index length 4 sub {
  52. dup 4 idiv
  53. 2 index 2 index get
  54. 3 index 3 index 1 add get
  55. 4 index 4 index 2 add get
  56. 5 index 5 index 3 add get
  57. cmyktogray
  58. 3 -1 roll pop put dup
  59. } for
  60. 0 exch length 4 idiv getinterval
  61. } bd
  62. /SlowRGB {
  63. CIDataProc pop
  64. 0 1 CIWidth 1 sub {
  65. 0 1 2 {
  66. 1 index 3 mul add CIBPC mul
  67. CIBSelect 1 index 1 index and sub
  68. exch 8 idiv
  69. CIBuffer exch get
  70. exch neg bitshift CIMask and CIConv mul exch
  71. } for
  72. 4 1 roll rgbtogray
  73. CIBufferExp 3 1 roll put
  74. } for
  75. CIBufferExp
  76. } bd
  77. /SlowCMYK {
  78. CIDataProc pop
  79. 0 1 CIWidth 1 sub {
  80. 0 1 3 {
  81. 1 index 4 mul add CIBPC mul
  82. CIBSelect 1 index 1 index and sub
  83. exch 8 idiv
  84. CIBuffer exch get
  85. exch neg bitshift CIMask and CIConv mul exch
  86. } for
  87. 5 1 roll cmyktogray
  88. CIBufferExp 3 1 roll put
  89. } for
  90. CIBufferExp
  91. } bd
  92. /ColorImage {
  93. /CINumComps exch pv
  94. /CIDataProc exch pv
  95. /CIIMatrix exch pv
  96. /CIBPC exch pv
  97. /CIHeight exch pv
  98. /CIWidth exch pv
  99. CIWidth CIHeight 8 CIIMatrix
  100. CINumComps 1 eq { /CIDataProc } {
  101. CINumComps 3 eq {
  102. CIBPC 8 eq { /FastRGB
  103. } { SetupColorImage /SlowRGB } ifelse
  104. } {
  105. CIBPC 8 eq { /FastCMYK
  106. } { SetupColorImage /SlowCMYK } ifelse
  107. } ifelse
  108. } ifelse
  109. load image
  110. } bd
  111. } EndLoad
  112. } EndLoad
  113. _ColorSep5044? {
  114. /paintimage
  115. {
  116. colorplate 0 eq
  117. {
  118. { {currentfile cyanstr readstring pop}
  119. {currentfile magentastr readstring pop}
  120. {currentfile yellowstr readstring pop}
  121. {currentfile blackstr readstring pop
  122. currentfile graystr readstring pop pop}
  123. }
  124. { {currentfile cyanstr readhexstring pop}
  125. {currentfile magentastr readhexstring pop}
  126. {currentfile yellowstr readhexstring pop}
  127. {currentfile blackstr readhexstring pop
  128. currentfile graystr readhexstring pop pop}
  129. } ifelse
  130. true 4 colorimage
  131. }
  132. {
  133. 3 dict begin
  134. /binaryOK exch def
  135. [
  136. 1 1 5 {
  137. dup
  138. /currentfile cvx
  139. [ /cyanstr /magentastr /yellowstr /blackstr /graystr ]
  140. 3 -1 roll 1 sub get cvx
  141. binaryOK { /readstring } { /readhexstring } ifelse cvx
  142. /pop cvx
  143. 5 -1 roll
  144. colorplate dup 5 gt { pop 5 } if
  145. eq not { /pop cvx } if
  146. } for
  147. ] cvx bind
  148. end
  149. [
  150. colorplate 6 eq {
  151. /pop cvx
  152. negativecolorplate { 0 } { 1 } ifelse
  153. } if
  154. colorplate 4 le
  155. {
  156. 1 /exch cvx /sub cvx
  157. } if
  158. colorplate 6 ne
  159. {
  160. systemdict /currenttransfer get exec
  161. aload pop
  162. } if
  163. ] cvx
  164. gsave
  165. systemdict /settransfer get exec
  166. systemdict /image get exec
  167. grestore
  168. } ifelse
  169. } bd
  170. } if
  171. end
  172. %%EndResource
  173.