# sgitopnm - convert a SGI image file to PNM - man(1) - [phpMan]

> **TLDR:** Convert an SGI file to a PNM file.
>
- Convert an SGI image to a PNM file:
  `sgitopnm {{path/to/input.sgi}} > {{path/to/output.pnm}}`
- Display information about the SGI file:
  `sgitopnm {{-verb|-verbose}} {{path/to/input.sgi}} > {{path/to/output.pnm}}`
- Extract channel n of the SGI file:
  `sgitopnm {{-c|-channel}} {{n}} {{path/to/input.sgi}} > {{path/to/output.pnm}}`

*Source: tldr-pages*

---

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

## NAME
       sgitopnm - convert a SGI image file to PNM


## SYNOPSIS
### sgitopnm

       [**-verbose**]

       [**-channel _**c_]

       [_SgiFileName_]



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

       **sgitopnm **reads an SGI image file as input and produces a PGM image for a 2-dimensional (1- or
       2-channel) input file, and a PPM image for a 3-dimensional (3 or more channels) input file.

       Alternatively, the program produces a PGM image of any one of the channels in the input file.

       Before Netpbm 10.67 (June 2014), **sgitopnm **does not work on 2-channel SGI images.  It fails if
       you try.

       If you don't specify the _SgiFileName_ argument, input is from Standard Input.

       Before  Netpbm  10.67  (June 2014), **sgitopnm **requires its input to be a seekable file, so for
       example you can't feed it from a pipe.



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



### -verbose
              Give some information about the SGI image file.


### -channel _
              Extract channel _n_ of the image as a PGM image.

              Without  this option, **sgitopnm **extracts the first 3 channels as a PPM image or, if the
              input has 1 or 2 channels, extracts the first channel as a PGM image.

              A 2-channel image is grayscale plus transparency, so you can get the transparency  in‐
              formation with **-channel=2**.  You could then combine them into a PAM image of tuple type
              GRAYSCALE_ALPHA with **pamstack**.




## REFERENCES
       The  SGI image format specification version 1.0 is at ftp://ftp.sgi.com/graphics/grafica/sgi‐
       image.html .

       There is an example SGI file at <https://github.com/ZaaLabs/ZaaIL-TestImages/tree/master/SGI> .



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



## AUTHOR
       Copyright (C) 1994 by Ingo Wilken ( <_Ingo.Wilken@informatik.uni-oldenburg.de_>)

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

netpbm documentation                        25 April 2014                    _Sgitopnm_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
