# man > pnmtorast(1)

> **TLDR:** Convert a PNM file to a Sun rasterfile.
>
- Convert a PNM image to a RAST image:
  `pnmtorast {{path/to/input.pnm}} > {{path/to/output.rast}}`
- Force either `RT_STANDARD` or `RT_BYTE_ENCODED` form for the output:
  `pnmtorast -{{standard|rle}} {{path/to/input.pnm}} > {{path/to/output.rast}}`

*Source: tldr-pages*

---

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

## NAME
       pnmtorast - convert a PPM into a Sun rasterfile


## SYNOPSIS
       **pnmtorast **[**-standard**|**-rle**] [_pnmfile_]


## DESCRIPTION
       This program is part of [**Netpbm**(1)](https://www.chedong.com/phpMan.php/man/Netpbm/1/markdown).

       **pnmtorast**reads a PPM image as input and produces a Sun rasterfile as output.

       Color  values  in  Sun rasterfiles are eight bits wide, so **pnmtorast **will automatically scale
       colors to have a maxval of 255.  An extra **pamdepth **step is not necessary.


## OPTIONS
       In addition to the options common to all programs based on libnetpbm  (most  notably  **-quiet**,
       see ]8;;index.html#commonoptions\ Common Options]8;;\ ), **pnmtorast **recognizes the following command line options:

       All options can be abbreviated to their shortest unique prefix.



### -standard

              Forces the result to be in RT_STANDARD form.


### -rle

              Forces the result to be in RT_BYTE_ENCODED, which is smaller but, well, less standard.

              The default is **-rle**.




## SEE ALSO
       [**rasttopnm**(1)](https://www.chedong.com/phpMan.php/man/rasttopnm/1/markdown), [**pnm**(1)](https://www.chedong.com/phpMan.php/man/pnm/1/markdown)


## AUTHOR
       Copyright (C) 1989, 1991 by Jef Poskanzer.

## DOCUMENT SOURCE
       This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master
       documentation is at

              **<http://netpbm.sourceforge.net/doc/pnmtorast.html>**

netpbm documentation                       12 January 1991                  _Pnmtorast_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
