# phpman > man > PNMTORLE(1)

> **TLDR:** Convert a PNM file to an Utah Raster Tools RLE image file.
>
- Convert a PNM image to an RLE image:
  `pnmtorle {{path/to/input.pnm}} > {{path/to/output.rle}}`
- Print PNM header information to `stdout`:
  `pnmtorle {{-verb|-verbose}} {{path/to/input.pnm}} > {{path/to/output.rle}}`
- Include a transparency channel in the output image in which every black pixel is set to fully transparent and every other pixel is set to fully opaque:
  `pnmtorle {{-a|-alpha}} {{path/to/input.pnm}} > {{path/to/output.rle}}`

*Source: tldr-pages*

---

[PNMTORLE(1)](https://www.chedong.com/phpMan.php/man/PNMTORLE/1/markdown)                            General Commands Manual                           [PNMTORLE(1)](https://www.chedong.com/phpMan.php/man/PNMTORLE/1/markdown)



## NAME
       pnmtorle - convert a Netpbm image file into an RLE image file.

## SYNOPSIS
       **pnmtorle** [ **-h** ] [ **-v** ] [ **-a** ] [ **-o** _outfile_ ] [ _pnmfile_ ]

## DESCRIPTION
       This  program  converts  Netpbm image files into Utah [**RLE**(5)](https://www.chedong.com/phpMan.php/man/RLE/5/markdown) image files.  You can include an
       alpha mask.  If the input is a multiple image file, the output consists of  several  concate‐
       nated RLE images.

       The  RLE  file  will contain either a three channel color image (24 bits) or a single channel
       grayscale image (8 bits) depending upon the pnm file depth.  If a converted ppm is  displayed
       on  an 8 bit display, the image must be dithered.  In order to produce a better looking image
       (on 8 bit displays), it is recommended that the image be quantizing (to 8 bit  mapped  color)
       prior  to  its  display.  This may be done by piping the output of this program into the Utah
       [**mcut**(1)](https://www.chedong.com/phpMan.php/man/mcut/1/markdown) or [**rlequant**(1)](https://www.chedong.com/phpMan.php/man/rlequant/1/markdown) utilities.  An example of this is shown later.

## OPTIONS
### -v
              written  to  "stderr".   Actually,  there  is  not much header information stored in a
              Netpbm file, so this information is minimal.

### -h
              converting the file.  It is equivalent to using the -v option except that no file con‐
              version takes place.

### -a
              pha channel is based on the image:  Wherever a pixel is black, the corresponding alpha
              value is transparent.  Everywhere else, the alpha value is fully opaque.

### -o
              If specified, the output will be written to this file.  If _outfile_ is "-", or if it is
              not specified, the output will be written to the standard output stream.

       _pnmfile_
              The  name  of  the Netpbm image data file to be converted.  If not specified, standard
              input is assumed.

## EXAMPLES
       pnmtorle -v file.ppm -o file.rle
              While running in verbose mode, convert file.ppm to RLE format and store resulting data
              in file.rle.

       pnmtorle -h file.pgm
              Dump the header information of the Netpbm file called file.pgm.

## SEE ALSO
       [**rletopnm**(1)](https://www.chedong.com/phpMan.php/man/rletopnm/1/markdown), [**urt**(1)](https://www.chedong.com/phpMan.php/man/urt/1/markdown), [**RLE**(5)](https://www.chedong.com/phpMan.php/man/RLE/5/markdown).

## AUTHOR
       Wes Barris
       Army High Performance Computing Research Center (AHPCRC)
       Minnesota Supercomputer Center, Inc.



1                                          March 31, 1994                                [PNMTORLE(1)](https://www.chedong.com/phpMan.php/man/PNMTORLE/1/markdown)
