qrcode
author Jens-Uwe Grooss <j.-u.grooss@fz-juelich.de>
Fri, 03 Feb 2017 07:57:19 +0100
changeset 621 b940913e8d26
parent 588 71233aa5377b
permissions -rw-r--r--
eskp map plot update from 170203
     1 %!PS-Adobe-3.0
     2 %%Creator: (ImageMagick)
     3 %%Title: (qrcode)
     4 %%CreationDate: (2016-03-09T10:39:25+01:00)
     5 %%BoundingBox: -0 -0 1855 1176
     6 %%HiResBoundingBox: 0 0 1855 1176
     7 %%DocumentData: Clean7Bit
     8 %%LanguageLevel: 1
     9 %%Orientation: Portrait
    10 %%PageOrder: Ascend
    11 %%Pages: 1
    12 %%EndComments
    13 
    14 %%BeginDefaults
    15 %%EndDefaults
    16 
    17 %%BeginProlog
    18 %
    19 % Display a color image.  The image is displayed in color on
    20 % Postscript viewers or printers that support color, otherwise
    21 % it is displayed as grayscale.
    22 %
    23 /DirectClassPacket
    24 {
    25   %
    26   % Get a DirectClass packet.
    27   %
    28   % Parameters:
    29   %   red.
    30   %   green.
    31   %   blue.
    32   %   length: number of pixels minus one of this color (optional).
    33   %
    34   currentfile color_packet readhexstring pop pop
    35   compression 0 eq
    36   {
    37     /number_pixels 3 def
    38   }
    39   {
    40     currentfile byte readhexstring pop 0 get
    41     /number_pixels exch 1 add 3 mul def
    42   } ifelse
    43   0 3 number_pixels 1 sub
    44   {
    45     pixels exch color_packet putinterval
    46   } for
    47   pixels 0 number_pixels getinterval
    48 } bind def
    49 
    50 /DirectClassImage
    51 {
    52   %
    53   % Display a DirectClass image.
    54   %
    55   systemdict /colorimage known
    56   {
    57     columns rows 8
    58     [
    59       columns 0 0
    60       rows neg 0 rows
    61     ]
    62     { DirectClassPacket } false 3 colorimage
    63   }
    64   {
    65     %
    66     % No colorimage operator;  convert to grayscale.
    67     %
    68     columns rows 8
    69     [
    70       columns 0 0
    71       rows neg 0 rows
    72     ]
    73     { GrayDirectClassPacket } image
    74   } ifelse
    75 } bind def
    76 
    77 /GrayDirectClassPacket
    78 {
    79   %
    80   % Get a DirectClass packet;  convert to grayscale.
    81   %
    82   % Parameters:
    83   %   red
    84   %   green
    85   %   blue
    86   %   length: number of pixels minus one of this color (optional).
    87   %
    88   currentfile color_packet readhexstring pop pop
    89   color_packet 0 get 0.299 mul
    90   color_packet 1 get 0.587 mul add
    91   color_packet 2 get 0.114 mul add
    92   cvi
    93   /gray_packet exch def
    94   compression 0 eq
    95   {
    96     /number_pixels 1 def
    97   }
    98   {
    99     currentfile byte readhexstring pop 0 get
   100     /number_pixels exch 1 add def
   101   } ifelse
   102   0 1 number_pixels 1 sub
   103   {
   104     pixels exch gray_packet put
   105   } for
   106   pixels 0 number_pixels getinterval
   107 } bind def
   108 
   109 /GrayPseudoClassPacket
   110 {
   111   %
   112   % Get a PseudoClass packet;  convert to grayscale.
   113   %
   114   % Parameters:
   115   %   index: index into the colormap.
   116   %   length: number of pixels minus one of this color (optional).
   117   %
   118   currentfile byte readhexstring pop 0 get
   119   /offset exch 3 mul def
   120   /color_packet colormap offset 3 getinterval def
   121   color_packet 0 get 0.299 mul
   122   color_packet 1 get 0.587 mul add
   123   color_packet 2 get 0.114 mul add
   124   cvi
   125   /gray_packet exch def
   126   compression 0 eq
   127   {
   128     /number_pixels 1 def
   129   }
   130   {
   131     currentfile byte readhexstring pop 0 get
   132     /number_pixels exch 1 add def
   133   } ifelse
   134   0 1 number_pixels 1 sub
   135   {
   136     pixels exch gray_packet put
   137   } for
   138   pixels 0 number_pixels getinterval
   139 } bind def
   140 
   141 /PseudoClassPacket
   142 {
   143   %
   144   % Get a PseudoClass packet.
   145   %
   146   % Parameters:
   147   %   index: index into the colormap.
   148   %   length: number of pixels minus one of this color (optional).
   149   %
   150   currentfile byte readhexstring pop 0 get
   151   /offset exch 3 mul def
   152   /color_packet colormap offset 3 getinterval def
   153   compression 0 eq
   154   {
   155     /number_pixels 3 def
   156   }
   157   {
   158     currentfile byte readhexstring pop 0 get
   159     /number_pixels exch 1 add 3 mul def
   160   } ifelse
   161   0 3 number_pixels 1 sub
   162   {
   163     pixels exch color_packet putinterval
   164   } for
   165   pixels 0 number_pixels getinterval
   166 } bind def
   167 
   168 /PseudoClassImage
   169 {
   170   %
   171   % Display a PseudoClass image.
   172   %
   173   % Parameters:
   174   %   class: 0-PseudoClass or 1-Grayscale.
   175   %
   176   currentfile buffer readline pop
   177   token pop /class exch def pop
   178   class 0 gt
   179   {
   180     currentfile buffer readline pop
   181     token pop /depth exch def pop
   182     /grays columns 8 add depth sub depth mul 8 idiv string def
   183     columns rows depth
   184     [
   185       columns 0 0
   186       rows neg 0 rows
   187     ]
   188     { currentfile grays readhexstring pop } image
   189   }
   190   {
   191     %
   192     % Parameters:
   193     %   colors: number of colors in the colormap.
   194     %   colormap: red, green, blue color packets.
   195     %
   196     currentfile buffer readline pop
   197     token pop /colors exch def pop
   198     /colors colors 3 mul def
   199     /colormap colors string def
   200     currentfile colormap readhexstring pop pop
   201     systemdict /colorimage known
   202     {