root/branches/uploadr/3.2/MacUploadr.app/Contents/lib/GraphicsMagick-1.3.5/config/delegates.mgk

Revision 641, 7.5 kB (checked in by jdecq, 5 months ago)

new temporary build, additional command line handler modification to retrieve frob, GM version matching site...

Line 
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="autotrace" stealth="True" command='"autotrace" -output-format svg -output-file "%o" "%i"' />
74   <delegate decode="browse" stealth="True" command='"mozilla" "http://www.GraphicsMagick.org/" &'  />
75   <delegate decode="cgm" command='"ralcgm" -d ps < "%i" > "%o" 2>/dev/null' />
76   <delegate decode="dcraw" command='"dcraw" -c -w "%i" > "%o"' />
77   <delegate decode="dot" command='"dot" -Tps "%i" -o "%o"' />
78   <delegate decode="dvi" command='"dvips" -q -o "%o" "%i"' />
79   <delegate decode="edit" stealth="True" command='"xterm" -title "Edit Image Comment" -e vi "%o"' />
80   <delegate decode="emf" command='"wmf2eps" -o "%o" "%i"' />
81   <delegate decode="eps" encode="pdf" mode="bi" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pdfwrite "-sOutputFile=%o" -- "%i" -c quit' />
82   <delegate decode="eps" encode="ps" mode="bi" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pswrite "-sOutputFile=%o" -- "%i" -c quit' />
83   <delegate decode="fig" command='"fig2dev" -L ps "%i" "%o"' />
84   <delegate decode="gplt" command='"echo" "set size 1.25,0.62; set terminal postscript portrait color solid; set output "%o"; load "%i"" > "%u"; "gnuplot" "%u"' />
85
86   <!-- Read monochrome Postscript, EPS, and PDF  -->
87   <delegate decode="gs-mono" stealth="True" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pbmraw -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
88
89   <!-- Read grayscale Postscript, EPS, and PDF  -->
90   <delegate decode="gs-gray" stealth="True" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pgmraw -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -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 -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=ppmraw -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -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 -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pngalpha -dTextAlphaBits=%u -dGraphicsAlphaBits=%u -g%s -r%s %s "-sOutputFile=%s" -- "%s" -c quit' />
97
98   <delegate decode="hpg" command='"hp2xx" -q -m eps -f `basename "%o"` "%i" && mv -f `basename "%o"` "%o"' />
99   <delegate decode="hpgl" command='"hp2xx" -q -m eps -f `basename "%o"` "%i" && mv -f `basename "%o"` "%o"' />
100   <!-- Read HTML file  -->
101   <delegate decode="htm" command='"html2ps" -U -o "%o" "%i"' />
102   <!-- Read HTML file  -->
103   <delegate decode="html" command='"html2ps" -U -o "%o" "%i"' />
104   <delegate decode="ilbm" command='"ilbmtoppm" "%i" > "%o"' />
105   <!-- Read UNIX manual page  -->
106   <delegate decode="man" command='"groff" -man -Tps "%i" > "%o"' />
107   <!-- Read MPEG file using mpeg2decode  -->
108   <delegate decode="mpeg" command='"mpeg2decode" -q -b "%i" -f -o3 "%u%%05d"; gm convert -temporary "%u*.ppm" "miff:%o" ; rm -f "%u"*.ppm ' />
109   <!-- Write MPEG file using mpeg2encode -->
110   <delegate encode="mpeg-encode" stealth="True" command='"mpeg2encode" "%i" "%o"' />
111   <!-- Convert PDF to Encapsulated Poscript using Ghostscript -->
112   <delegate decode="pdf" encode="eps" mode="bi" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=epswrite "-sOutputFile=%o" -- "%i" -c quit' />
113   <!-- Convert PDF to Postcript using Ghostscript -->
114   <delegate decode="pdf" encode="ps" mode="bi" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pswrite "-sOutputFile=%o" -- "%i" -c quit' />
115   <!-- Convert PNM file to ILBM format using ppmtoilbm -->
116   <delegate decode="pnm" encode="ilbm" mode="encode" command='"ppmtoilbm" -24if "%i" > "%o"' />
117   <delegate decode="pnm" encode="launch" mode="encode" command='"gimp" "%i"' />
118   <delegate decode="pnm" encode="win" mode="encode" command='"gm" display -immutable "%i"' />
119   <!-- Read Persistance Of Vision file using povray  -->
120   <delegate decode="pov" command='povray "+i"%i"" +o"%o" +fn%q +w%w +h%h +a -q9 -kfi"%s" -kff"%n"
121     "gm" convert -adjoin "%o*.png" "%o"' />
122   <delegate decode="ps" encode="eps" mode="bi" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=epswrite "-sOutputFile=%o" -- "%i" -c quit' />
123   <delegate decode="ps" encode="pdf" mode="bi" command='"gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pdfwrite "-sOutputFile=%o" -- "%i" -c quit' />
124   <delegate decode="ps" encode="print" mode="encode" command='"/usr/bin/lpr" "%i"' />
125   <!-- Read Radiance file using ra_ppm -->
126   <delegate decode="rad" command='"ra_ppm" -g 1.0 "%i" "%o"' />
127   <!-- Convert RGBA file to URT RLE using rawtorle -->
128   <delegate decode="rgba" encode="rle" mode="encode" command='"gm" mogrify -flip -size %wx%h "rgba:%i"
129     "rawtorle" -w %w -h %h -n 4 -o "%o" "%i"' />
130    <!-- Scan an image using Sane's scanimage -->
131   <delegate decode="scan" command='"scanimage" -d "%i" > "%o"' />
132   <!-- Read HTML file  -->
133   <delegate decode="shtml" command='"html2ps" -U -o "%o" "%i"' />
134   <!-- Convert ASCII text to Postscript using 'enscript' command -->
135   <delegate decode="txt" encode="ps" mode="bi" command='"enscript" -o "%o" "%i"' />
136   <!-- Render WMF file using wmf2eps (fallback in case libwmf not available) -->
137   <delegate decode="wmf" command='"wmf2eps" -o "%o" "%i"' />
138   <delegate encode="show" stealth="True" command='"gm" display -immutable -delay 0 -window_group %g -title "%l of %f" "tmp:%o" &' />
139 </delegatemap>
Note: See TracBrowser for help on using the browser.