github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/lib/GraphicsMagick-1.3.35/config/delegates.mgk (about)

     1  <?xml version="1.0"?>
     2  <!--
     3    Delegate command file.
     4  
     5    Commands which specify
     6  
     7      decode="in_format" encode="out_format"
     8  
     9    specify the rules for converting from in_format to out_format
    10    These rules may be used to translate directly between formats.
    11  
    12    Commands which specify only
    13  
    14      decode="in_format"
    15  
    16    specify the rules for converting from in_format to some format that
    17    GraphicsMagick will automatically recognize. These rules are used to
    18    decode formats.
    19  
    20    Commands which specify only
    21  
    22     encode="out_format"
    23  
    24    specify the rules for an "encoder" which may accept any input format.
    25  
    26    For delegates other than gs-color, gs-mono, and mpeg-encode
    27    the substitution rules are as follows:
    28  
    29      %i  input image filename
    30      %o  output image filename
    31      %u  unique temporary filename
    32      %z  secondary unique temporary filename
    33  
    34      %#  input image signature
    35      %b  image file size
    36      %c  input image comment
    37      %d  original filename directory part
    38      %e  original filename extension part
    39      %f  original filename
    40      %t  original filename top (base) part
    41      %g  window group
    42      %h  image rows (height)
    43      %k  input image number colors
    44      %l  input image label
    45      %m  input image format ("magick")
    46      %n  input image number of scenes
    47      %p  page number
    48      %q  input image depth
    49      %r  input image storage class, colorspace, and matte
    50      %s  scene number
    51      %w  image columns (width)
    52      %x  input image x resolution
    53      %y  input image y resolution
    54      %[  input image attribute (e.g. "%[EXIF:Orientation]")
    55      %%  pass through literal %
    56  
    57    Under Unix, all text (non-numeric) substitutions should be
    58    surrounded with double quotes for the purpose of security, and
    59    because any double quotes occuring within the substituted text will
    60    be escaped using a backslash.
    61  
    62    Commands (excluding file names) containing one or more of the
    63    special characters ";&|><" (requiring that multiple processes be
    64    executed) are executed via the Unix shell with text substitutions
    65    carefully excaped to avoid possible compromise.  Otherwise, commands
    66    are executed directly without use of the Unix shell.
    67  
    68    Use 'gm convert -list delegates' to verify how the contents of this
    69    file has been parsed.
    70  
    71   -->
    72  <delegatemap>
    73    <delegate decode="browse" stealth="True" command='"xdg-open" "http://www.GraphicsMagick.org/" &'  />
    74    <delegate decode="cgm" command='"ralcgm" -d ps < "%i" > "%o" 2>/dev/null' />
    75    <delegate decode="dcraw" command='"dcraw" -c -w -T "%i" > "%o"' />
    76    <delegate decode="dot" command='"dot" -Tps "%i" -o "%o"' />
    77    <delegate decode="dvi" command='"dvips" -q -o "%o" "%i"' />
    78    <delegate decode="edit" stealth="True" command='"xterm" -title "Edit Image Comment" -e vi "%o"' />
    79    <delegate decode="eps" encode="pdf" mode="bi" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pdfwrite "-sOutputFile=%o" -- "%i" -c quit' />
    80    <delegate decode="eps" encode="ps" mode="bi" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pswrite "-sOutputFile=%o" -- "%i" -c quit' />
    81    <delegate decode="fig" command='"fig2dev" -L ps "%i" "%o"' />
    82  
    83    <!-- Read monochrome Postscript, EPS, and PDF  -->
    84    <delegate decode="gs-mono" stealth="True" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pbmraw -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
    85  
    86    <!-- Read grayscale Postscript, EPS, and PDF  -->
    87    <delegate decode="gs-gray" stealth="True" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pgmraw -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
    88  
    89    <!-- Read colormapped Postscript, EPS, and PDF  -->
    90    <delegate decode="gs-palette" stealth="True" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pcx256 -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
    91  
    92    <!-- Read color Postscript, EPS, and PDF  -->
    93    <delegate decode="gs-color" stealth="True" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=ppmraw -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
    94  
    95    <!-- Read color+alpha Postscript, EPS, and PDF  -->
    96    <delegate decode="gs-color+alpha" stealth="True" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pngalpha -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
    97  
    98    <!-- Read CMYK Postscript, EPS, and PDF  -->
    99    <delegate decode="gs-cmyk" stealth="True" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE= -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
   100  
   101    <!-- Read monochrome PDF using Poppler's pdftoppm -->
   102    <delegate decode="poppler-mono" stealth="True" command='"pdftoppm" "-mono" "-freetype" "yes" "-aa" "yes" "-aaVector" "yes" "-rx" "72" "-ry" "72" "%s" ">" "%s"' />
   103  
   104    <!-- Read grayscale PDF using Poppler's pdftoppm -->
   105    <delegate decode="poppler-grey" stealth="True" command='"pdftoppm" "-gray" "-freetype" "yes" "-aa" "yes" "-aaVector" "yes" "-rx" "72" "-ry" "72" "%s" ">" "%s"' />
   106  
   107    <!-- Read color PDF using Poppler's pdftoppm -->
   108    <delegate decode="poppler-color" stealth="True" command='"pdftoppm" "-freetype" "yes" "-rx" "-aa" "yes" "-aaVector" "yes" "72" "-ry" "72" "%s" ">" "%s"' />
   109  
   110    <delegate decode="hpg" command='"hp2xx" -q -m eps -f `basename "%o"` "%i" && /usr/bin/mv -f `basename "%o"` "%o"' />
   111    <delegate decode="hpgl" command='"hp2xx" -q -m eps -f `basename "%o"` "%i" && /usr/bin/mv -f `basename "%o"` "%o"' />
   112    <!-- Read HTML file  -->
   113    <delegate decode="htm" command='"html2ps" -U -o "%o" "%i"' />
   114    <!-- Read HTML file  -->
   115    <delegate decode="html" command='"html2ps" -U -o "%o" "%i"' />
   116    <!-- Read IFF ILBM file -->
   117    <delegate decode="ilbm" command='"ilbmtoppm" "%i" > "%o"' />
   118    <!-- Read MPEG file using mpeg2decode  -->
   119    <delegate decode="mpeg" command='"mpeg2decode" -q -b "%i" -f -o3 "%u%%05d"; gm convert -temporary "%u*.ppm" "miff:%o" ; rm -f "%u"*.ppm ' />
   120    <!-- Write MPEG file using mpeg2encode -->
   121    <delegate encode="mpeg-encode" stealth="True" command='"mpeg2encode" "%i" "%o"' />
   122    <!-- Convert PDF to Encapsulated Poscript using Ghostscript -->
   123    <delegate decode="pdf" encode="eps" mode="bi" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=epswrite "-sOutputFile=%o" -- "%i" -c quit' />
   124    <!-- Convert PDF to Postcript using Ghostscript -->
   125    <delegate decode="pdf" encode="ps" mode="bi" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pswrite "-sOutputFile=%o" -- "%i" -c quit' />
   126    <!-- Convert PNM file to IFF ILBM format using ppmtoilbm -->
   127    <delegate decode="pnm" encode="ilbm" mode="encode" command='"ppmtoilbm" -24if "%i" > "%o"' />
   128    <delegate decode="pnm" encode="launch" mode="encode" command='"gimp" "%i"' />
   129    <delegate decode="pnm" encode="win" mode="encode" command='"gm" display -immutable "%i"' />
   130    <delegate decode="ps" encode="eps" mode="bi" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=epswrite "-sOutputFile=%o" -- "%i" -c quit' />
   131    <delegate decode="ps" encode="pdf" mode="bi" command='"gs" -q -dBATCH -dSAFER -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pdfwrite "-sOutputFile=%o" -- "%i" -c quit' />
   132    <delegate decode="ps" encode="print" mode="encode" command='"no -c -s" "%i"' />
   133    <!-- Read HTML file  -->
   134    <delegate decode="shtml" command='"html2ps" -U -o "%o" "%i"' />
   135    <delegate encode="show" stealth="True" command='"gm" display -immutable -delay 0 -window_group %g -title "%l of %f" "%o" &' />
   136  </delegatemap>