4.6 PNG Script: dvi + gs

<..unix png gs..>
  G.png
  Gdvips -E -q -Ppdf -f %%1 -pp %%2 > zz%%4.ps
  Ggs -sDEVICE=pngalpha -sOutputFile=%%3 -r110x110 -dEPSCrop -dBackgroundColor=16#ffffff -dTextAlphaBits=2 -dGraphicsAlphaBits=2 -q -dbatch -dNOPAUSE zz%%4.ps -c quit
  Grm zz%%4.ps    -_-_-

A piping of the conversion as in

dvips -E -q -Ppdf -f %%1 -pp %%2 | Ggs -sDEVICE=pngalpha -sOutputFile=- ...

provides faster compilations, but error messages might get lost if they happen to be directed to the standard output stream.

<..dos png gs..>
  G.png
  Gif exist zz%%4.ps DEL zz%%4.ps >nul
  Gif exist %%3 DEL %%3 >nul
  Gdvips -E -q -Ppdf -f %%1 -pp %%2 > zz%%4.ps
  Ggswin32c -sDEVICE=pngalpha -sOutputFile=%%3 -r110x110 -dEPSCrop -dBackgroundColor=16#ffffff -dTextAlphaBits=2 -dGraphicsAlphaBits=2 -q -dbatch -dNOPAUSE zz%%4.ps -c quit
  Gif exist zz%%4.ps DEL zz%%4.ps >nul -_-_-

ImageMagic comes with an ‘identify’ utility for inspecting image files. For instance, try ‘identify -verbatim foo.png’. For additional information, try ‘identify’ or ‘man identify’.