rawtopgm(1)                                           rawtopgm(1)

NAME
       rawtopgm  -  convert  raw  grayscale bytes into a portable
       graymap

SYNOPSIS
       rawtopgm [-headerskip  N]  [-rowskip  N]  [-tb|-topbottom]
       [width height] [imagedata]

DESCRIPTION
       Reads  raw  grayscale bytes as input.  Produces a portable
       graymap as output.   The  input  file  is  just  grayscale
       bytes.   If  you don't specify the width and height on the
       command line, the program will check the size of the image
       and try to make a quadratic image of it. It is an error to
       supply a non quadratic image without specifying width  and
       height.  The maxval is assumed to be 255.

OPTIONS
       -headerskip
              If  the file has a header, you can use this flag to
              skip over it.

       -rowskip
              If there is padding at the ends of  the  rows,  you
              can  skip it with this flag.  Note that rowskip can
              be a real number.  Amazingly, I once had  an  image
              with  0.376  bytes of padding per row.  This turned
              out to be due to a file-transfer problem, but I was
              still able to read the image.

       -tb -topbottom
              Flips  the image upside down.  The first pixel in a
              pgm file is in the lower left corner of the  image.
              For  conversion from images with the first pixel in
              the upper left corner (e.g. the Molecular  Dynamics
              and  Leica  confocal  formats) this flips the image
              right.  This is equivalent  to  rawtopgm  [file]  |
              pnmflip -tb .

BUGS
       If  you don't specify the image width and height, the pro-
       gram will try to read the entire image to a memory buffer.
       If  you get a message that states that you are out of mem-
       ory, try to specify the width and height  on  the  command
       line. Also, the -tb option consumes much memory.

SEE ALSO
       pgm(5), rawtoppm(1), pnmflip(1)

AUTHORS
       Copyright (C) 1989 by Jef Poskanzer.
       Modified June 1993 by Oliver Trepte, oliver@fysik4.kth.se

                           15 June 1993                         1