# grap2graph(1) - man - phpMan

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



## NAME
       grap2graph - convert a GRAP diagram into a cropped image

## SYNOPSIS
       **grap2graph** [**-unsafe**] [**-format** _output-format_] [_convert-arguments_]

### grap2graph --help

### grap2graph -v
### grap2graph --version

## DESCRIPTION
       _grap2graph_  reads  a [_grap_(1)](https://www.chedong.com/phpMan.php/man/grap/1/markdown) program from the standard input and writes an image file, by de‐
       fault in Portable Network Graphics (PNG) format, to the standard output.

       The input GRAP code should _not_ be wrapped with the **.G1** and **.G2** macros that normally guard  it
       within [_groff_(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown) documents.

       Arguments  not  recognized by _grap2graph_ are passed to the ImageMagick or GraphicsMagick pro‐
       gram [_convert_(1)](https://www.chedong.com/phpMan.php/man/convert/1/markdown).  By specifying these, you can give your image  a  border,  set  the  image's
       pixel density, or perform other useful transformations.

       The  output  image  is clipped using _convert_'s **-trim** option to the smallest possible bounding
       box that contains all the black pixels.

## OPTIONS
### -format
              Write the image in _output-format_, which must be understood by _convert_; the default  is
              PNG.

       **--help** Display a usage message and exit.

### -unsafe
              Run  _groff_ in _unsafe_ mode, enabling the PIC command **sh** to execute arbitrary Unix shell
              commands.  The _groff_ default is to forbid this.

### -v
### --version
              Display version information and exit.

## ENVIRONMENT
       _GROFF_TMPDIR_
       _TMPDIR_
       _TMP_
       _TEMP_   These environment variables are searched in the given order to determine the directory
              where temporary files will be created.  If none are set, _/tmp_ is used.

## AUTHORS
       **grap2graph**  was  written  by  Eric  S.  Raymond  ⟨<esr@thyrsus.com>⟩,  based  on  a  recipe for
       [_pic2graph_(1)](https://www.chedong.com/phpMan.php/man/pic2graph/1/markdown), by W. Richard Stevens.

## SEE ALSO
       [_pic2graph_(1)](https://www.chedong.com/phpMan.php/man/pic2graph/1/markdown), [_eqn2graph_(1)](https://www.chedong.com/phpMan.php/man/eqn2graph/1/markdown), [_grap_(1)](https://www.chedong.com/phpMan.php/man/grap/1/markdown), [_pic_(1)](https://www.chedong.com/phpMan.php/man/pic/1/markdown), [_groff_(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown), [_convert_(1)](https://www.chedong.com/phpMan.php/man/convert/1/markdown)



groff 1.22.4                                23 March 2022                              [GRAP2GRAPH(1)](https://www.chedong.com/phpMan.php/man/GRAP2GRAPH/1/markdown)
