home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 September / PCWK996.iso / sharewar / 95 / narzedzi / ambra / ambr32a1.exe / FILE / ARCHIVE.Z / ACROBAT / VIEWER32.EXE / PSPROCSET / 11 < prev    next >
Text File  |  1996-02-22  |  2KB  |  85 lines

  1. %%BeginFile: pdfimg2.prc
  2. %%Copyright: Copyright 1987-1993 Adobe Systems Incorporated. All Rights Reserved.
  3. % PDF Image Operators for Level 2
  4.  
  5. PDF /PDFImage get begin
  6.  
  7. Level2? StartLoad {
  8.  
  9. % Image data
  10. /ID {                        % Image Node Contents
  11.     5 counttomark 2 idiv     % Number of key value pairs
  12.     dup 3 1 roll add        % Additional entries requested
  13.     dict begin                % Create the dictionary
  14.     { def } repeat            % Def the key-value pairs into dict
  15.     cleartomark             % Get rid of the mark
  16.     currentdict             % Put the dictionary on the stack
  17.     end
  18.  
  19.     begin
  20.         % Establish default attributes if necessary
  21.         /ImageType 1 def
  22.         /ImageMatrix [ Width 0 0 Height neg 0 Height ] def
  23.         /ImageMask here { not } { true } ifelse 
  24.             { /ImageMask false def } if
  25.         % Establish the current colorspace
  26.         ImageMask not { ColorSpace setcolorspace } if
  27.         /Intent here { ri } if
  28.         
  29.         % Check the decode array
  30.         /Decode here { pop } {
  31.             /Decode [
  32.                 ImageMask {
  33.                     0 1
  34.                 } {
  35.                     currentcolorspace 0 get /Indexed eq {
  36.                         % 2^n-1 where n = bpc
  37.                         0 2 BitsPerComponent exp 1 sub
  38.                     } {
  39.                         % Determine the number of color components
  40.                         mark currentcolor counttomark 
  41.                         dup 2 add 1 roll cleartomark
  42.                         { 0 1 } repeat 
  43.                     } ifelse
  44.                 } ifelse
  45.             ] def
  46.         } ifelse
  47.  
  48.         /DataSource here { pop } {
  49.             % If Filter is not specified then the default is no filter,
  50.             % which indicates binary data. The /Filter may or may not
  51.             % be in an array of filters
  52.             /DataSource     
  53.                 currentfile    
  54.                 /Filter here {                    % currentfile filter
  55.                     dup type /arraytype eq { length } { pop 1 } ifelse
  56.                     1 sub 0 1 3 -1 roll {         % source loopidx
  57.                         /DecodeParms here {        % source loopidx decodeparms
  58.                             dup type /arraytype eq {
  59.                                 1 index get     % source loopidx decodeparm
  60.                             } if
  61.                             dup null eq { pop } { exch } ifelse 
  62.                             % source [dp] loopidx
  63.                         } if
  64.                         Filter dup type /arraytype eq 
  65.                         { exch get } { exch pop } ifelse
  66.                         filter
  67.                     } for 
  68.                 } if
  69.             def
  70.         } ifelse
  71.  
  72.         currentdict
  73.         /ImageMask here not { false } if
  74.         % set Illustrator fill color for imagemask
  75.         { sfc imagemask } { image } ifelse
  76.     end
  77. } bd
  78.  
  79. currentdict readonly pop
  80.  
  81. } EndLoad % Level2?
  82.  
  83. end % PDFImage
  84. %%EndFile
  85.