# pgmtopgm - copy PGM image - man(1) - [phpMan]

> **TLDR:** Copy a PGM image file.
>
- Copy PGM file from `stdin` to `stderr`:
  `pgmtopgm`
- Display version:
  `pgmtopgm -version`

*Source: tldr-pages*

---

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

## NAME
       pgmtopgm - copy PGM image


## SYNOPSIS
### pgmtopgm


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

       **pgmtopgm  **simply copies a PGM image from Standard Input to Standard Output.  This may seem an
       unnecessary duplication of **cat**, but remember that a PGM program can read a PBM image as if it
       were PGM.  So **pgmtopgm **can read either a PBM or PGM image and produce a PGM image as output.

       Even that is of limited usefulness because of the fact that almost any program to  which  you
       would  feed  the  resulting PGM image could also just take the original image directly.  How‐
       ever, sometimes you really need a true PGM image.

       When you know you have a PBM image and want a PGM image, **pbmtopgm **is a more general way to do
       that conversion.



## OPTIONS
       There are no command line options defined specifically for **pgmtopgm**, but  it  recognizes  the
       options common to all programs based on libnetpbm (See [ Common Options](index.html#commonoptions) .)


## SEE ALSO
       [**ppmtoppm**(1)](https://www.chedong.com/phpMan.php/man/ppmtoppm/1/markdown), [**pamtopam**(1)](https://www.chedong.com/phpMan.php/man/pamtopam/1/markdown), [**pamtopnm**(1)](https://www.chedong.com/phpMan.php/man/pamtopnm/1/markdown), [**pbmtopgm**(1)](https://www.chedong.com/phpMan.php/man/pbmtopgm/1/markdown), [**pbm**(1)](https://www.chedong.com/phpMan.php/man/pbm/1/markdown), [**pgm**(1)](https://www.chedong.com/phpMan.php/man/pgm/1/markdown),


## HISTORY
       This program was added to Netpbm in Release 10.9 (September 2002).

## 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/pgmtopgm.html>**

netpbm documentation                       September 2002                    _Pgmtopgm_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
