<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE delegatemap [
  <!ELEMENT delegatemap (delegate)+>
  <!ATTLIST delegatemap xmlns CDATA #FIXED ''>
  <!ELEMENT delegate EMPTY>
  <!ATTLIST delegate xmlns CDATA #FIXED '' command CDATA #REQUIRED
    decode NMTOKEN #IMPLIED encode NMTOKEN #IMPLIED mode NMTOKEN #IMPLIED
    spawn NMTOKEN #IMPLIED stealth NMTOKEN #IMPLIED>
]>
<!--
  Delegate command file.

  Commands which specify

    decode="in_format" encode="out_format"

  specify the rules for converting from in_format to out_format.  Use these
  rules to translate directly between formats.

  Commands which specify only

    decode="in_format"

  specify the rules for converting from in_format to some format that
  ImageMagick automatically recognizes. Use these rules to decode formats.

  Commands which specify only

   encode="out_format"

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

  The substitution rules are as follows:

    %a  authentication passphrase
    %b  image file size in bytes
    %g  image geometry
    %h  image rows (height)
    %i  input image filename
    %#  input image signature
    %m  input image format
    %o  output image filename
    %p  page number
    %q  input image depth
    %s  scene number
    %u  unique temporary filename
    %w  image columns (width)
    %x  input image x resolution
    %y  input image y resolution

  Set option delegate:bimodal=true to process bimodal delegates otherwise they
  are ignored.

  If stealth="True" the delegate is not listed in user requested
  "-list delegate" listings. These are typically special internal delegates.

  If spawn="True", ImageMagick does not wait for the delegate to finish, nor
  will it read any output image.
-->
<delegatemap>
  <delegate decode="bpg" command="&apos;bpgdec&apos; -b 16 -o &apos;%o.png&apos; &apos;%i&apos;; /usr/bin/mv &apos;%o.png&apos; &apos;%o&apos;"/>
  <delegate decode="png" encode="bpg" command="&apos;bpgenc&apos; -b 12 -o &apos;%o&apos; &apos;%i&apos;"/>
  <delegate decode="blender" command="&apos;blender&apos; -b &apos;%i&apos; -F PNG -o &apos;%o&apos;&apos;\n&apos;magick&apos; convert -concatenate &apos;%o*.png&apos; &apos;%o&apos;"/>
  <delegate decode="browse" stealth="True" spawn="True" command="&apos;xdg-open&apos; http://www.imagemagick.org/; /usr/bin/rm &apos;%i&apos;"/>
  <delegate decode="cdr" command="&apos;uniconvertor&apos; &apos;%i&apos; &apos;%o.svg&apos;; /usr/bin/mv &apos;%o.svg&apos; &apos;%o&apos;"/>
  <delegate decode="cgm" command="&apos;uniconvertor&apos; &apos;%i&apos; &apos;%o.svg&apos;; /usr/bin/mv &apos;%o.svg&apos; &apos;%o&apos;"/>
  <delegate decode="https" command="&apos;curl&apos; -s -k -L -o &apos;%o&apos; &apos;https:%M&apos;"/>
  <delegate decode="doc" command="&apos;soffice&apos; --convert-to pdf -outdir `dirname &apos;%i&apos;` &apos;%i&apos; 2&gt; &apos;%u&apos;; /usr/bin/mv &apos;%i.pdf&apos; &apos;%o&apos;"/>
  <delegate decode="docx" command="&apos;soffice&apos; --convert-to pdf -outdir `dirname &apos;%i&apos;` &apos;%i&apos; 2&gt; &apos;%u&apos;; /usr/bin/mv &apos;%i.pdf&apos; &apos;%o&apos;"/>
  <delegate decode="dng:decode" command="&apos;ufraw-batch&apos; --silent --create-id=also --out-type=png --out-depth=16 &apos;--output=%u.png&apos; &apos;%i&apos;"/>
  <delegate decode="dot" command='&apos;dot&apos; -Tsvg &apos;%i&apos; -o &apos;%o&apos;' />
  <delegate decode="dvi" command="&apos;dvips&apos; -sstdout=%%stderr -o &apos;%o&apos; &apos;%i&apos;"/>
  <delegate decode="dxf" command="&apos;uniconvertor&apos; &apos;%i&apos; &apos;%o.svg&apos;; /usr/bin/mv &apos;%o.svg&apos; &apos;%o&apos;"/>
  <delegate decode="edit" stealth="True" command="&apos;xterm&apos; -title &apos;Edit Image Comment&apos; -e vi &apos;%o&apos;"/>
  <delegate decode="eps" encode="pdf" mode="bi" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 &apos;-sDEVICE=pdfwrite&apos; &apos;-sOutputFile=%o&apos; &apos;-f%i&apos;"/>
  <delegate decode="eps" encode="ps" mode="bi" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=ps2write&apos; &apos;-sOutputFile=%o&apos; &apos;-f%i&apos;"/>
  <delegate decode="fig" command="&apos;uniconvertor&apos; &apos;%i&apos; &apos;%o.svg&apos;; /usr/bin/mv &apos;%o.svg&apos; &apos;%o&apos;"/>
  <delegate decode="hpg" command="&apos;hp2xx&apos; -sstdout=%%stderr -m eps -f `basename &apos;%o&apos;` &apos;%i&apos;;     /usr/bin/mv -f `basename &apos;%o&apos;` &apos;%o&apos;"/>
  <delegate decode="hpgl" command="&apos;hp2xx&apos; -sstdout=%%stderr -m eps -f `basename &apos;%o&apos;` &apos;%i&apos;;     /usr/bin/mv -f `basename &apos;%o&apos;` &apos;%o&apos;"/>
  <delegate decode="htm" command="&apos;html2ps&apos; -U -o &apos;%o&apos; &apos;%i&apos;"/>
  <delegate decode="html" command="&apos;html2ps&apos; -U -o &apos;%o&apos; &apos;%i&apos;"/>
  <delegate decode="ilbm" command="&apos;ilbmtoppm&apos; &apos;%i&apos; &gt; &apos;%o&apos;"/>
  <delegate decode="jpg" encode="lep" mode="encode" command="&apos;lepton&apos; &apos;%i&apos; &apos;%o&apos;"/>
  <delegate decode="jxr" command="/usr/bin/mv &apos;%i&apos; &apos;%i.jxr&apos;; &apos;JxrDecApp&apos; -i &apos;%i.jxr&apos; -o &apos;%o.pnm&apos;; /usr/bin/mv &apos;%i.jxr&apos; &apos;%i&apos;; /usr/bin/mv &apos;%o.pnm&apos; &apos;%o&apos;"/>
  <delegate decode="lep" mode="decode" command="&apos;lepton&apos; &apos;%i&apos; &apos;%o&apos;"/>
  <delegate decode="miff" encode="show" spawn="True" command="&apos;magick&apos; display -immutable -delay 0 -title &apos;%M&apos; &apos;%i&apos;"/>
  <delegate decode="miff" encode="win" stealth="True" spawn="True" command="&apos;magick&apos; display -immutable -delay 0 -title &apos;%M&apos; &apos;%i&apos;"/>
  <delegate decode="video:decode" command="&apos;ffmpeg&apos; -nostdin -v -1 -i &apos;%i&apos; -vframes %S -vcodec pam -an -f rawvideo -y &apos;%u.pam&apos; 2&gt; &apos;%u&apos;"/>
  <delegate decode="odt" command="&apos;soffice&apos; --convert-to pdf -outdir `dirname &apos;%i&apos;` &apos;%i&apos; 2&gt; &apos;%u&apos;; /usr/bin/mv &apos;%i.pdf&apos; &apos;%o&apos;"/>
  <delegate decode="pcl:cmyk" stealth="True" command="&apos;pcl6&apos; -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pamcmyk32&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;%s&apos;"/>
  <delegate decode="pcl:color" stealth="True" command="&apos;pcl6&apos; -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=ppmraw&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;%s&apos;"/>
  <delegate decode="pcl:mono" stealth="True" command="&apos;pcl6&apos; -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pbmraw&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;%s&apos;"/>
  <delegate decode="pdf" encode="eps" mode="bi" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sPDFPassword=&apos;%a&apos; &apos;-sDEVICE=eps2write&apos; &apos;-sOutputFile=%o&apos; &apos;-f%i&apos;"/>
  <delegate decode="pdf" encode="ps" mode="bi" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=ps2write&apos; -sPDFPassword=&apos;%a&apos; &apos;-sOutputFile=%o&apos; &apos;-f%i&apos;"/>
  <delegate decode="png" encode="webp" command="&apos;cwebp&apos; -quiet %Q &apos;%i&apos; -o &apos;%o&apos;"/>
  <delegate decode="pnm" encode="ilbm" mode="encode" command="&apos;ppmtoilbm&apos; -24if &apos;%i&apos; &gt; &apos;%o&apos;"/>
  <delegate decode="bmp" encode="jxr" command="/usr/bin/mv &apos;%i&apos; &apos;%i.bmp&apos;; &apos;JxrEncApp&apos; -i &apos;%i.bmp&apos; -o &apos;%o.jxr&apos;; /usr/bin/mv &apos;%i.bmp&apos; &apos;%i&apos;; /usr/bin/mv &apos;%o.jxr&apos; &apos;%o&apos;"/>
  <delegate decode="bmp" encode="wdp" command="/usr/bin/mv &apos;%i&apos; &apos;%i.bmp&apos;; &apos;JxrEncApp&apos; -i &apos;%i.bmp&apos; -o &apos;%o.jxr&apos;; /usr/bin/mv &apos;%i.bmp&apos; &apos;%i&apos;; /usr/bin/mv &apos;%o.jxr&apos; &apos;%o&apos;"/>
  <delegate decode="ppt" command="&apos;soffice&apos; --convert-to pdf -outdir `dirname &apos;%i&apos;` &apos;%i&apos; 2&gt; &apos;%u&apos;; /usr/bin/mv &apos;%i.pdf&apos; &apos;%o&apos;"/>
  <delegate decode="pptx" command="&apos;soffice&apos; --convert-to pdf -outdir `dirname &apos;%i&apos;` &apos;%i&apos; 2&gt; &apos;%u&apos;; /usr/bin/mv &apos;%i.pdf&apos; &apos;%o&apos;"/>
  <delegate decode="ps" encode="prt" command='&apos;/usr/bin/lpr&apos; &apos;%i&apos;'/>
  <delegate decode="ps:alpha" stealth="True" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pngalpha&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;-f%s&apos; &apos;-f%s&apos;"/>
  <delegate decode="ps:cmyk" stealth="True" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pamcmyk32&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;-f%s&apos; &apos;-f%s&apos;"/>
  <delegate decode="ps:color" stealth="True" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pnmraw&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;-f%s&apos; &apos;-f%s&apos;"/>
  <delegate decode="ps" encode="eps" mode="bi" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=eps2write&apos; &apos;-sOutputFile=%o&apos; &apos;-f%i&apos;"/>
  <delegate decode="ps" encode="pdf" mode="bi" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pdfwrite&apos; &apos;-sOutputFile=%o&apos; &apos;-f%i&apos;"/>
  <delegate decode="ps" encode="print" mode="encode" command="lpr &apos;%i&apos;"/>
  <delegate decode="ps:mono" stealth="True" command="&apos;gs&apos; -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pbmraw&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;-f%s&apos; &apos;-f%s&apos;"/>
  <delegate decode="shtml" command="&apos;html2ps&apos; -U -o &apos;%o&apos; &apos;%i&apos;"/>
  <delegate decode="sid" command="&apos;mrsidgeodecode&apos; -if sid -i &apos;%i&apos; -of tif -o &apos;%o&apos; &gt; &apos;%u&apos;"/>
  <delegate decode="svg" command="&apos;rsvg-convert&apos; -o &apos;%o&apos; &apos;%i&apos;"/>
  <!-- Change export-file to export-png for inkscape < 1.0 -->
  <delegate decode="svg:decode" stealth="True" command="&apos;inkscape&apos; &apos;%s&apos; --export-file=&apos;%s&apos; --export-dpi=&apos;%s&apos; --export-background=&apos;%s&apos; --export-background-opacity=&apos;%s&apos; &gt; &apos;%s&apos; 2&gt;&amp;1"/>
  <delegate decode="tiff" encode="launch" mode="encode" command="&apos;gimp&apos; &apos;%i&apos;"/>
  <delegate decode="wdp" command="/usr/bin/mv &apos;%i&apos; &apos;%i.jxr&apos;; &apos;JxrDecApp&apos; -i &apos;%i.jxr&apos; -o &apos;%o.bmp&apos;; /usr/bin/mv &apos;%i.jxr&apos; &apos;%i&apos;; /usr/bin/mv &apos;%o.bmp&apos; &apos;%o&apos;"/>
  <delegate decode="webp" command="&apos;dwebp&apos; -pam &apos;%i&apos; -o &apos;%o&apos;"/>
  <delegate decode="xls" command="&apos;soffice&apos; --convert-to pdf -outdir `dirname &apos;%i&apos;` &apos;%i&apos; 2&gt; &apos;%u&apos;; /usr/bin/mv &apos;%i.pdf&apos; &apos;%o&apos;"/>
  <delegate decode="xlsx" command="&apos;soffice&apos; --convert-to pdf -outdir `dirname &apos;%i&apos;` &apos;%i&apos; 2&gt; &apos;%u&apos;; /usr/bin/mv &apos;%i.pdf&apos; &apos;%o&apos;"/>
  <delegate decode="xps:cmyk" stealth="True" command="&apos;gxps&apos; -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=bmpsep8&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;%s&apos;"/>
  <delegate decode="xps:color" stealth="True" command="&apos;gxps&apos; -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=ppmraw&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;%s&apos;"/>
  <delegate decode="xps:mono" stealth="True" command="&apos;gxps&apos; -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &apos;-sDEVICE=pbmraw&apos; -dTextAlphaBits=%u -dGraphicsAlphaBits=%u &apos;-r%s&apos; %s &apos;-sOutputFile=%s&apos; &apos;%s&apos;"/>
  <delegate encode="video:encode" stealth="True" command="&apos;ffmpeg&apos; -nostdin -v -1 -i &apos;%M%%d.jpg&apos; &apos;%u.%m&apos; 2&gt; &apos;%u&apos;"/>
</delegatemap>
