  Color correction for pnm2ppa
  The pnm2ppa project team ppa-rpms@users.sourceforge.net
  v0.3, July 11,  2000

  Information and instructions for color correction of pnm2ppa color
  printing.  http://sourceforge.net/projects/pnm2ppa (Updated for
  pnm2ppa-1.0 and later.)

   OOvveerrvviieeww ooff CCoolloorr ccoorrrreeccttiioonn..

  Color Pixmap input to pnm2ppa (ppm format, produced by the ghostscript
  output devices ppmraw or ppm) specifies the color of a pixel  as three
  coordinates (Red, Green, Blue) in the range 0-255.   The program
  pnm2ppa converts these to relative amounts of Cyan, Magenta and Yellow
  ink drops printed on the page.

  CCoolloorr ccoorrrreeccttiioonn allows the user to attempt to match the printed
  colors to some reference colors, such as those displayed on the
  terminal, or those printed on a different printer,  or those printed
  on the same printer  with a different driver (such as the Win9x
  drivers supplied by HP with their PPA printers).


  The color output from pnm2ppa can be controlled in two ways:

  +o  by a color correction "gamma" file , which by default is
     /etc/pnm2ppa.gamma, but which may also be specified with the
     pnm2ppa option
      pnm2ppa ... -F gammafile ... .

  +o  in the absence of such a file (or if the pnm2ppa option
      pnm2ppa ... --noGamma ...  is used), by  three values specified by
     keywords RedGammaIdx, BlueGammaIdx, GreenGammaIdx in the pnm2ppa
     configuration file.


  Color correction is specified by three color intensity functions
  (curves), one for each of Red, Green, and Blue.    In their simplest
  form, these curves have a standard form controlled by a single "gamma"
  parameter such as RedGammaIdx.  The more sophisticated correction, in
  the file pnm2ppa.gamma, specifies these curves more generally as a set
  of values that are interpolated between.


  Note that, in principle, different color corrections are needed for
  different print quality settings, and for different brands and
  qualities of paper!

  At present the methods for constructing a  color correction for
  pnm2ppa are not very user-friendly.  If you can improve them, please
  help!.

  CCoolloorr ccoorrrreeccttiioonn wwiitthh ""ggaammmmaa"" vvaalluueess iinn tthhee ccoonnffiigguurraattiioonn ffiillee..



  +o  NNoottee:: tthhiiss mmeetthhoodd wwaasstteess qquuiittee aa lloott ooff iinnkk,, aanndd mmaannyy uusseerrss ffiinndd iitt
     lleessss eeffffeeccttiivvee tthhaann tthhee sseeccoonndd mmeetthhoodd!!



  You must first use pnm2ppa to produce a file gamma.ppm.  To do this,
  type



  pnm2ppa -g -i - -o /dev/lp0




  (replace /dev/lp0 by whatever printer device your PPA printer uses, or
  use  ... -o - | lpr -l , etc.).   Note also that as pnm2ppa is not
  receiving any ghostscript input to tell it the paper size, this must
  be correctly specified by a configuration file entry or, e.g., a   -s
  a4  option, if the default US Letter paper is not being used.   This
  procedure will both print a color calibration page, and create a file
  gamma.ppm in the current directory.

  The printed output is an array of sets of three colored bands, red,
  blue and green, each of which increases in brightness from left to
  right.   The topmost set of bands should be referrred to as bands "0",
  the next ones as "1", etc.

  To color-correct the printer so that its colors match those on the
  terminal screen, you should now attempt to view the file gamma.ppm
  using some application (such as the GNU image manipulation program
  gimp) that can view .ppm files.    For each color, identify the
  printed band (0, 1, 2, ... etc) that most closely corresponds to the
  brightness profile shown on the screen.    The default values are:


       RedGammaIdx 6
       GreenGammaIdx 3
       BlueGammaIdx 3




  Enter your modified values for these in the pnm2ppa configuration file
  (usually /etc/pnm2ppa.conf).

  To color-correct with respect to another printer (or the Win9x
  drivers), you must manage to print gamma.ppm on that other device,
  then make the comparison.

  CCoolloorr ccoorrrreeccttiioonn uussiinngg aa ""ggaammmmaa ffiillee""..

  A "gamma correction file" is a text file containg three lines of 16
  hexadecimal numbers in the range 00 - ff  (decimal 0-255), e.g.,


        20 28 30 40 50 60 70 a0 b0 c0 c8 d0 e0 ea f0 ff
        20 28 30 40 50 60 68 70 78 80 90 b0 c0 d0 e0 ff
        10 20 28 38 40 48 60 70 80 90 a0 c0 d0 e0 f0 ff




  which are the interpolation functions for red green and blue color
  intensities.

  The program pnm2ppa will use a default correction file
  /etc/pnm2ppa.gamma if it exists, unless the --noGamma  option is used.
  The default correction file location can be changed by using the
  pnm2ppa option  -F gammafile , where "gammafile" is the name
  (including the full path) of the gamma correction file to be used.


  Currently, there are two available tools for constructing a gamma
  correction file:

  +o  A graphical utility ppagammacorrect is available in the PPA Color
     Correction Utilities section of the pnm2ppa web page
     http://sourceforge.net/projects/pnm2ppa, (but this is in early
     stages of development, with little documentation,  and may not be
     fully functional)

  +o  A working procedure is given in
     http://download.sourceforge.net/pnm2ppa/color-calibrate-1.0.tar.gz,
     which is made available by Klamer Schutte.  TThhiiss iiss tthhee mmeetthhoodd
     rreeccoommmmeennddeedd bbyy mmaannyy uusseerrss..
























































