192 |
- |
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
2 |
<!DOCTYPE delegatemap [
|
|
|
3 |
<!ELEMENT delegatemap (delegate)+>
|
|
|
4 |
<!ATTLIST delegatemap xmlns CDATA #FIXED ''>
|
|
|
5 |
<!ELEMENT delegate EMPTY>
|
|
|
6 |
<!ATTLIST delegate xmlns CDATA #FIXED '' command CDATA #REQUIRED
|
|
|
7 |
decode NMTOKEN #IMPLIED encode NMTOKEN #IMPLIED mode NMTOKEN #IMPLIED
|
|
|
8 |
spawn NMTOKEN #IMPLIED stealth NMTOKEN #IMPLIED>
|
|
|
9 |
]>
|
|
|
10 |
<!--
|
|
|
11 |
Delegate command file.
|
|
|
12 |
|
|
|
13 |
Commands which specify
|
|
|
14 |
|
|
|
15 |
decode="in_format" encode="out_format"
|
|
|
16 |
|
|
|
17 |
specify the rules for converting from in_format to out_format. Use these
|
|
|
18 |
rules to translate directly between formats.
|
|
|
19 |
|
|
|
20 |
Commands which specify only
|
|
|
21 |
|
|
|
22 |
decode="in_format"
|
|
|
23 |
|
|
|
24 |
specify the rules for converting from in_format to some format that
|
|
|
25 |
ImageMagick automatically recognizes. Use these rules to decode formats.
|
|
|
26 |
|
|
|
27 |
Commands which specify only
|
|
|
28 |
|
|
|
29 |
encode="out_format"
|
|
|
30 |
|
|
|
31 |
specify the rules for an "encoder" which may accept any input format.
|
|
|
32 |
|
|
|
33 |
The substitution rules are as follows:
|
|
|
34 |
|
|
|
35 |
%a authentication passphrase
|
|
|
36 |
%b image file size in bytes
|
|
|
37 |
%g image geometry
|
|
|
38 |
%h image rows (height)
|
|
|
39 |
%i input image filename
|
|
|
40 |
%# input image signature
|
|
|
41 |
%m input image format
|
|
|
42 |
%o output image filename
|
|
|
43 |
%p page number
|
|
|
44 |
%q input image depth
|
|
|
45 |
%s scene number
|
|
|
46 |
%u unique temporary filename
|
|
|
47 |
%w image columns (width)
|
|
|
48 |
%x input image x resolution
|
|
|
49 |
%y input image y resolution
|
|
|
50 |
|
|
|
51 |
Set option delegate:bimodal=true to process bimodal delegates otherwise they
|
|
|
52 |
are ignored.
|
|
|
53 |
|
|
|
54 |
If stealth="True" the delegate is not listed in user requested
|
|
|
55 |
"-list delegate" listings. These are typically special internal delegates.
|
|
|
56 |
|
|
|
57 |
If spawn="True", ImageMagick does not wait for the delegate to finish, nor
|
|
|
58 |
will it read any output image.
|
|
|
59 |
-->
|
|
|
60 |
<delegatemap>
|
|
|
61 |
<delegate decode="bpg" command=""bpgdec" -b 16 -o "%o.png" "%i"; /usr/bin/mv "%o.png" "%o""/>
|
|
|
62 |
<delegate decode="png" encode="bpg" command=""bpgenc" -b 12 -q "%~" -o "%o" "%i""/>
|
|
|
63 |
<delegate decode="blender" command=""blender" -b "%i" -F PNG -o "%o""\n"convert" -concatenate "%o*.png" "%o""/>
|
|
|
64 |
<delegate decode="browse" stealth="True" spawn="True" command=""xdg-open" https://imagemagick.org/; /usr/bin/rm "%i""/>
|
|
|
65 |
<delegate decode="cdr" command=""uniconvertor" "%i" "%o.svg"; /usr/bin/mv "%o.svg" "%o""/>
|
|
|
66 |
<delegate decode="cgm" command=""uniconvertor" "%i" "%o.svg"; /usr/bin/mv "%o.svg" "%o""/>
|
|
|
67 |
<delegate decode="https:decode" command=""curl" -s -k -L -o "%u.dat" "https:%M""/>
|
|
|
68 |
<delegate decode="doc" command=""libreoffice" --headless --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /usr/bin/mv "%i.pdf" "%o""/>
|
|
|
69 |
<delegate decode="docx" command=""libreoffice" --headless --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /usr/bin/mv "%i.pdf" "%o""/>
|
198 |
- |
70 |
<delegate decode="dng:decode" command=""ufraw-batch" --silent --create-id=also --out-type=png --out-depth=16 --output="%u.png" "%i""/>
|
192 |
- |
71 |
<delegate decode="dot" command='"dot" -Tsvg "%i" -o "%o"' />
|
|
|
72 |
<delegate decode="dvi" command=""dvips" -sstdout=%%stderr -o "%o" "%i""/>
|
|
|
73 |
<delegate decode="dxf" command=""uniconvertor" "%i" "%o.svg"; /usr/bin/mv "%o.svg" "%o""/>
|
|
|
74 |
<delegate decode="edit" stealth="True" command=""xterm" -title "Edit Image Comment" -e vi "%o""/>
|
|
|
75 |
<delegate decode="eps" encode="pdf" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i""/>
|
|
|
76 |
<delegate decode="eps" encode="ps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ps2write" "-sOutputFile=%o" "-f%i""/>
|
|
|
77 |
<delegate decode="fig" command=""uniconvertor" "%i" "%o.svg"; /usr/bin/mv "%o.svg" "%o""/>
|
|
|
78 |
<delegate decode="hpg" command=""hp2xx" -sstdout=%%stderr -m eps -f `basename "%o"` "%i"; /usr/bin/mv -f `basename "%o"` "%o""/>
|
|
|
79 |
<delegate decode="hpgl" command=""hp2xx" -sstdout=%%stderr -m eps -f `basename "%o"` "%i"; /usr/bin/mv -f `basename "%o"` "%o""/>
|
|
|
80 |
<delegate decode="htm" command=""html2ps" -U -o "%o" "%i""/>
|
|
|
81 |
<delegate decode="html" command=""html2ps" -U -o "%o" "%i""/>
|
|
|
82 |
<delegate decode="ilbm" command=""ilbmtoppm" "%i" > "%o""/>
|
|
|
83 |
<delegate decode="jpg" encode="lep" mode="encode" command=""lepton" "%i" "%o""/>
|
|
|
84 |
<delegate decode="jxr" command="/usr/bin/mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.pnm"; /usr/bin/mv "%i.jxr" "%i"; /usr/bin/mv "%o.pnm" "%o""/>
|
|
|
85 |
<delegate decode="lep" mode="decode" command=""lepton" "%i" "%o""/>
|
|
|
86 |
<delegate decode="miff" encode="show" spawn="True" command=""display" -immutable -delay 0 -title "%M" "%i""/>
|
|
|
87 |
<delegate decode="miff" encode="win" stealth="True" spawn="True" command=""display" -immutable -delay 0 -title "%M" "%i""/>
|
|
|
88 |
<delegate decode="odt" command=""libreoffice" --headless --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /usr/bin/mv "%i.pdf" "%o""/>
|
|
|
89 |
<delegate decode="pcl:cmyk" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
|
|
90 |
<delegate decode="pcl:color" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
|
|
91 |
<delegate decode="pcl:mono" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
|
|
92 |
<delegate decode="pdf" encode="eps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=eps2write" "-sPDFPassword=%a" "-sOutputFile=%o" "-f%i""/>
|
|
|
93 |
<delegate decode="pdf" encode="ps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ps2write" "-sPDFPassword=%a" "-sOutputFile=%o" "-f%i""/>
|
|
|
94 |
<delegate decode="pnm" encode="trace" command=""potrace" --svg --output "%o" "%i""/>
|
|
|
95 |
<delegate decode="png" encode="webp" command=""cwebp" -quiet %Q "%i" -o "%o""/>
|
|
|
96 |
<delegate decode="pnm" encode="ilbm" mode="encode" command=""ppmtoilbm" -24if "%i" > "%o""/>
|
|
|
97 |
<delegate decode="bmp" encode="jxr" command="/usr/bin/mv "%i" "%i.bmp"; "JxrEncApp" -i "%i.bmp" -o "%o.jxr"; /usr/bin/mv "%i.bmp" "%i"; /usr/bin/mv "%o.jxr" "%o""/>
|
|
|
98 |
<delegate decode="bmp" encode="wdp" command="/usr/bin/mv "%i" "%i.bmp"; "JxrEncApp" -i "%i.bmp" -o "%o.jxr"; /usr/bin/mv "%i.bmp" "%i"; /usr/bin/mv "%o.jxr" "%o""/>
|
|
|
99 |
<delegate decode="ppt" command=""libreoffice" --headless --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /usr/bin/mv "%i.pdf" "%o""/>
|
|
|
100 |
<delegate decode="pptx" command=""libreoffice" --headless --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /usr/bin/mv "%i.pdf" "%o""/>
|
|
|
101 |
<delegate decode="ps" encode="prt" command='" lpr" "%i"'/>
|
|
|
102 |
<delegate decode="ps:alpha" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
|
|
103 |
<delegate decode="ps:cmyk" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
|
|
104 |
<delegate decode="ps:color" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=png16m" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
|
|
105 |
<delegate decode="ps" encode="eps" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=eps2write" "-sOutputFile=%o" "-f%i""/>
|
|
|
106 |
<delegate decode="ps" encode="pdf" mode="bi" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i""/>
|
|
|
107 |
<delegate decode="ps" encode="print" mode="encode" command="lpr "%i""/>
|
|
|
108 |
<delegate decode="ps:mono" stealth="True" command=""gs" -sstdout=%%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
|
|
|
109 |
<delegate decode="shtml" command=""html2ps" -U -o "%o" "%i""/>
|
|
|
110 |
<delegate decode="sid" command=""mrsidgeodecode" -if sid -i "%i" -of tif -o "%o" > "%u""/>
|
|
|
111 |
<delegate decode="svg" command=""rsvg-convert" -o "%o" "%i""/>
|
|
|
112 |
<!-- Change export-filename to export-png for inkscape < 1.0 -->
|
|
|
113 |
<delegate decode="svg:decode" stealth="True" command=""inkscape" "%s" --export-filename="%s" --export-dpi="%s" --export-background="%s" --export-background-opacity="%s" > "%s" 2>&1"/>
|
|
|
114 |
<delegate decode="tiff" encode="text" command=""tesseract" "%i" "%u"; /usr/bin/mv "%u.txt" "%o""/>
|
|
|
115 |
<delegate decode="tiff" encode="launch" mode="encode" command=""gimp" "%i""/>
|
|
|
116 |
<delegate decode="wdp" command="/usr/bin/mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.bmp"; /usr/bin/mv "%i.jxr" "%i"; /usr/bin/mv "%o.bmp" "%o""/>
|
|
|
117 |
<delegate decode="webp" command=""dwebp" -pam "%i" -o "%o""/>
|
|
|
118 |
<delegate decode="xls" command=""libreoffice" --headless --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /usr/bin/mv "%i.pdf" "%o""/>
|
|
|
119 |
<delegate decode="xlsx" command=""libreoffice" --headless --convert-to pdf -outdir `dirname "%i"` "%i" 2> "%u"; /usr/bin/mv "%i.pdf" "%o""/>
|
|
|
120 |
<delegate decode="xps:cmyk" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
|
|
121 |
<delegate decode="xps:color" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
|
|
122 |
<delegate decode="xps:mono" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
|
|
|
123 |
<delegate decode="video:decode" command=""ffmpeg" -nostdin -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%u""/>
|
|
|
124 |
<delegate encode="video:encode" stealth="True" command=""ffmpeg" -nostdin -v -1 -i "%M%%d.pam" -plays %I "%u.%m" 2> "%u""/>
|
|
|
125 |
</delegatemap>
|