<?xml version="1.0"?>
<!--
  Delegate command file.

  Commands which specify

    decode="in_format" encode="out_format"

  specify the rules for converting from in_format to out_format
  These rules may be used to translate directly between formats.

  Commands which specify only

    decode="in_format"

  specify the rules for converting from in_format to some format that
  GraphicsMagick will automatically recognize. These rules are used to
  decode formats.

  Commands which specify only

   encode="out_format"

  specify the rules for an "encoder" which may accept any input format.

  For delegates other than gs-color, gs-mono, and mpeg-encode
  the substitution rules are as follows:

    %i  input image filename
    %o  output image filename
    %u  unique temporary filename
    %z  secondary unique temporary filename

    %#  input image signature
    %b  image file size
    %c  input image comment
    %g  window group
    %h  image rows (height)
    %k  input image number colors
    %m  input image format
    %p  page number
    %q  input image depth
    %s  scene number
    %w  image columns (width)
    %x  input image x resolution
    %y  input image y resolution

 -->
<delegatemap>
  <delegate decode="autotrace" stealth="True" command='"@AutotraceDecodeDelegate@" -output-format svg -output-file "%o" "%i"' />
  <delegate decode="browse" stealth="True" spawn="True" command='"@BrowseDelegate@" "http://www.GraphicsMagick.org/"'  />
  <delegate decode="cgm" command='"@CGMDecodeDelegate@" -d ps < "%i" > "%o" 2>/dev/null' />
  <delegate decode="dcraw" command='"@DCRAWDecodeDelegate@" -c -w -2 "%i" > "%o"' />
  <delegate decode="dot" command='"@DOTDecodeDelegate@" -Tps "%i" -o "%o"' />
  <delegate decode="dvi" command='"@DVIDecodeDelegate@" -q -o "%o" "%i"' />
  <delegate decode="edit" stealth="True" command='"@EditorDelegate@" -title "Edit Image Comment" -e vi "%o"' />
  <delegate decode="emf" command='"@WMFDecodeDelegate@" -o "%o" "%i"' />
  <delegate decode="eps" encode="pdf" mode="bi" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPDFDevice@ -sOutputFile=%o -- "%i" -c quit' />
  <delegate decode="eps" encode="ps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPSDevice@ -sOutputFile=%o -- "%i" -c quit' />
  <delegate decode="fig" command='"@FIGDecodeDelegate@" -L ps "%i" "%o"' />
  <delegate decode="gplt" command='"@EchoDelegate@" "set size 1.25,0.62
    set terminal postscript portrait color solid; set output "%o"; load "%i"" > %u; "@GnuplotDecodeDelegate@" %u' />
  <delegate decode="gs-color" stealth="True" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSColorDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -r%s %s -sOutputFile=%s -- "%s" -c quit' />
  <delegate decode="gs-mono" stealth="True" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSMonoDevice@ -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -r%s %s -sOutputFile=%s -- "%s" -c quit' />
  <delegate decode="hpg" command='"@HPGLDecodeDelegate@" -q -m eps -f `basename "%o"` "%i"
    mv -f `basename "%o"` "%o"' />
  <delegate decode="hpgl" command='"@HPGLDecodeDelegate@" -q -m eps -f `basename "%o"` "%i"
    mv -f `basename "%o"` "%o"' />
  <delegate decode="htm" command='"@HTMLDecodeDelegate@" -U -o "%o" "%i"' />
  <delegate decode="html" command='"@HTMLDecodeDelegate@" -U -o "%o" "%i"' />
  <delegate decode="ilbm" command='"@ILBMDecodeDelegate@" "%i" > "%o"' />
  <delegate decode="man" command='"@MANDelegate@" -man -Tps "%i" > "%o"' />
  <delegate decode="mpeg" command='"@MPEGDecodeDelegate@" -q -b "%i" -f -o3 "%u%%05d"; @GMDelegate@ convert -temporary "%u*.ppm" "miff:%o" ; rm -f %u*.ppm ' />
  <delegate encode="mpeg-encode" stealth="True" command='"@MPEGEncodeDelegate@" "%i" "%o"' />
  <delegate decode="pdf" encode="eps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSEPSDevice@ -sOutputFile=%o -- "%i" -c quit' />
  <delegate decode="pdf" encode="ps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPSDevice@ -sOutputFile=%o -- "%i" -c quit' />
  <delegate decode="pnm" encode="ilbm" mode="encode" command='"@ILBMEncodeDelegate@" -24if "%i" > "%o"' />
  <delegate decode="pnm" encode="launch" mode="encode" command='"@LaunchDelegate@" "%i"' />
  <delegate decode="pnm" encode="win" mode="encode" command='"@GMDelegate@" display -immutable "%i"' />
  <delegate decode="pov" command='@POVDelegate@ "+i"%i"" +o"%o" +fn%q +w%w +h%h +a -q9 -kfi"%s" -kff"%n"
    "@GMDelegate@" convert -adjoin "%o*.png" "%o"' />
  <delegate decode="ps" encode="eps" mode="bi" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSEPSDevice@ -sOutputFile=%o -- "%i" -c quit' />
  <delegate decode="ps" encode="pdf" mode="bi" command='"@PSDelegate@" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=@GSPDFDevice@ -sOutputFile=%o -- "%i" -c quit' />
  <delegate decode="ps" encode="print" mode="encode" command='"@PrintDelegate@" "%i"' />
  <delegate decode="rad" command='"@RADDecodeDelegate@" -g 1.0 "%i" "%o"' />
  <delegate decode="rgba" encode="rle" mode="encode" command='"@GMDelegate@" mogrify -flip -size %wx%h "rgba:%i"
    "@RLEEncodeDelegate@" -w %w -h %h -n 4 -o "%o" "%i"' />
  <delegate decode="scan" command='"@SCANDecodeDelegate@" -d "%i" > "%o"' />
  <delegate decode="shtml" command='"@HTMLDecodeDelegate@" -U -o "%o" "%i"' />
  <delegate decode="txt" encode="ps" mode="bi" command='"@TXTDelegate@" -o "%o" "%i"' />
  <delegate decode="wmf" command='"@WMFDecodeDelegate@" -o "%o" "%i"' />
  <delegate encode="show" stealth="True" spawn="True" command='"@GMDelegate@" display -immutable -delay 0 -window_group %g -title "%l of %f" "tmp:%o"' />
</delegatemap>
