github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/share/doc/GraphicsMagick/www/conjure.html (about) 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3 <html> 4 <head> 5 <meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=us-ascii"> 6 <title>GraphicsMagick GM Utility</title> 7 <style type=text/css> 8 <!-- 9 @page { size: 8.5in 11in } 10 TD P { color: #000000; font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-size: 12pt } 11 P { color: #000000; font-family: "Verdana", "Arial", "Helvetica", sans-serif; font-size: 12pt } 12 A:link { color: #00B04F } 13 A:visited { color: #007B37 } 14 --> 15 </style> 16 17 </head> 18 <body LANG="en-US" TEXT="#000000" LINK="#00B04F" VLINK="#007B37" BGCOLOR="#ffffff"> 19 <a name="top"></a> 20 <table border=0 cellpadding=10 cellspacing=0 style="margin-top:-17px" width="100%"><tr><td> 21 <br> <br> 22 <table BORDER=0 WIDTH="100%"> 23 <tr> 24 <td ALIGN=LEFT bgcolor="#FFFFFF"><img 25 SRC="images/right_triangle.png" ALT=">" BORDER=0 26 height=14 width=15><b><font face="Helvetica, Arial"><font 27 color="#00B04F"><font size="+1"> 28 <a NAME="conjure"></a>gm conjure 29 </font></font></font></b></td></tr></table> 30 <table width="94%" border="0" cellspacing="0" cellpadding="8"> 31 <tr><td width="3%"><br></td><td> 32 <table BORDER=0 WIDTH="100%"> 33 <tr> 34 <td ALIGN=LEFT bgcolor="#FFFFFF"><img 35 SRC="images/right_triangle.png" ALT=">" BORDER=0 36 height=14 width=15><b><font face="Helvetica, Arial"><font 37 color="#00B04F"><font size="+1"> 38 <a NAME="conj-top"></a>NAME 39 </font></font></font></b></td></tr></table> 40 <table width="94%" border="0" cellspacing="0" cellpadding="8"> 41 <tr><td width="3%"><br></td><td> 42 conjure - process a Magick Scripting Language (MSL) script 43 </td></tr></table> 44 <table BORDER=0 WIDTH="100%"> 45 <tr> 46 <td ALIGN=LEFT bgcolor="#FFFFFF"><img 47 SRC="images/right_triangle.png" ALT=">" BORDER=0 48 height=14 width=15><b><font face="Helvetica, Arial"><font 49 color="#00B04F"><font size="+1"> 50 <a NAME="conj-contents"></a>Contents 51 </font></font></font></b></td></tr></table> 52 <table width="94%" border="0" cellspacing="0" cellpadding="8"> 53 <tr><td width="3%"><br></td><td> 54 <dl> 55 <dt> 56 <a href="#conj-syno">Synopsis</a> 57 </dt> 58 <dt> 59 <a href="#conj-desc">Description</a> 60 </dt> 61 <dt> 62 <a href="#conj-opti">Options</a> 63 </dt> 64 <dt> 65 <a href="#conj-msl">Magick Scripting Language</a> 66 </dt> 67 </dl> 68 </td></tr></table> 69 <table BORDER=0 WIDTH="100%"> 70 <tr> 71 <td ALIGN=LEFT bgcolor="#FFFFFF"><img 72 SRC="images/right_triangle.png" ALT=">" BORDER=0 73 height=14 width=15><b><font face="Helvetica, Arial"><font 74 color="#00B04F"><font size="+1"> 75 <a NAME="conj-syno"></a>Synopsis 76 </font></font></font></b></td></tr></table> 77 <table width="94%" border="0" cellspacing="0" cellpadding="8"> 78 <tr><td width="3%"><br></td><td> 79 <p> 80 <strong>gm conjure</strong> <strong>[</strong> <em>options</em> <strong>]</strong> <em>script.msl</em> 81 <strong>[ [</strong> <em>options</em> <strong>]</strong> <em>script.msl</em> <strong>]</strong> 82 <br> <br> 83 </td></tr></table> 84 <table BORDER=0 WIDTH="100%"> 85 <tr> 86 <td ALIGN=LEFT bgcolor="#FFFFFF"><img 87 SRC="images/right_triangle.png" ALT=">" BORDER=0 88 height=14 width=15><b><font face="Helvetica, Arial"><font 89 color="#00B04F"><font size="+1"> 90 <a NAME="conj-desc"></a>Description 91 </font></font></font></b></td></tr></table> 92 <table width="94%" border="0" cellspacing="0" cellpadding="8"> 93 <tr><td width="3%"><br></td><td> 94 <p> 95 The Magick scripting language (MSL) will primarily benefit those that 96 want to accomplish custom image processing tasks but do not wish to 97 program, or those that do not have access to a Perl interpreter or a 98 compiler. The interpreter is called conjure and here is an example 99 script: 100 <pre> 101 <?xml version="1.0" encoding="UTF-8"?> 102 <image size="400x400" > 103 <read filename="image.gif" /> 104 <get width="base-width" height="base-height" /> 105 <resize geometry="%[dimensions]" /> 106 <get width="width" height="height" /> 107 <print output= 108 "Image sized from %[base-width]x%[base-height] 109 to %[width]x%[height].\n" /> 110 <write filename="image.png" /> 111 </image> 112 </pre> 113 <p> 114 invoked with 115 <pre> 116 gm conjure -dimensions 400x400 incantation.msl 117 </pre> 118 <p> 119 All operations will closely follow the key/value pairs defined in 120 PerlMagick, unless otherwise noted. 121 </td></tr></table> 122 <p> 123 <i><a href="#top">Back to Contents</a></i> 124 </p> 125 <table BORDER=0 WIDTH="100%"> 126 <tr> 127 <td ALIGN=LEFT bgcolor="#FFFFFF"><img 128 SRC="images/right_triangle.png" ALT=">" BORDER=0 129 height=14 width=15><b><font face="Helvetica, Arial"><font 130 color="#00B04F"><font size="+1"> 131 <a NAME="conj-opti"></a>Options 132 </font></font></font></b></td></tr></table> 133 <table width="94%" border="0" cellspacing="0" cellpadding="8"> 134 <tr><td width="3%"><br></td><td> 135 <p> 136 Options are processed in command line order. Any option you specify on 137 the command line remains in effect until it is explicitly changed by specifying 138 the option again with a different effect, or if it is changed by a statement 139 in the scripting language. 140 <p> 141 You can define your own keyword/value pairs on the command line. 142 The script can then use this information when setting values by including 143 %[keyword] in the string. For example, if you included 144 "-dimensions 400x400" on the command line, as illustrated above, 145 then any string 146 containing "%[dimensions]" would have 400x400 substituted. 147 The "%[string]" can be used either an entire string, such as 148 geometry="%[dimensions]" or as a part of a string such as 149 filename="%[basename].png". 150 <p> 151 The keyword can be any string except for the following reserved 152 strings (in any upper, lower, or mixed case variant): <strong>debug</strong>, 153 <strong>help</strong>, and <strong>verbose</strong>, whose usage is described below. 154 <p> 155 The value can be any string. If 156 either the keyword or the value contains white space or any 157 symbols that have special meanings to your shell such as "#", 158 "|", 159 or 160 "%", enclose the string in quotation marks or use "\" to escape the white 161 space and special symbols. 162 <p> 163 Keywords and values are case dependent. "Key", 164 "key", 165 and "KEY" would 166 be three different keywords. 167 <p> 168 For a more detailed description of each option, see 169 Options, above. 170 <a href="GraphicsMagick.html"><em>GraphicsMagick(1)</em></a>. 171 <br> <br> 172 <table BORDER=0 WIDTH="94%"> 173 <tr> 174 <td width="3%"><br></td> 175 <td ALIGN=LEFT BGCOLOR="#FFFFFF"> 176 <img SRC="images/right_triangle_option.png" 177 ALT=">" BORDER=0 height=14 178 width=15><b><font face="Helvetica, Arial" 179 ><font color="#00B04F"><font size="+1"> 180 -debug <i><events></i> 181 </font></font></font></b></td></tr></table> 182 <table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>enable debug printout</td></tr></table> 183 <table BORDER=0 WIDTH="94%"> 184 <tr> 185 <td width="3%"><br></td> 186 <td ALIGN=LEFT BGCOLOR="#FFFFFF"> 187 <img SRC="images/right_triangle_option.png" 188 ALT=">" BORDER=0 height=14 189 width=15><b><font face="Helvetica, Arial" 190 ><font color="#00B04F"><font size="+1"> 191 <a href="GraphicsMagick.html#details-define">-define</a> <i><key></i>{<i>=<value></i>}<i>,...</i> 192 </font></font></font></b></td></tr></table> 193 <table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>add coder/decoder specific options</td></tr></table> 194 <table BORDER=0 WIDTH="94%"> 195 <tr> 196 <td width="3%"><br></td> 197 <td ALIGN=LEFT BGCOLOR="#FFFFFF"> 198 <img SRC="images/right_triangle_option.png" 199 ALT=">" BORDER=0 height=14 200 width=15><b><font face="Helvetica, Arial" 201 ><font color="#00B04F"><font size="+1"> 202 -help 203 </font></font></font></b></td></tr></table> 204 <table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print usage instructions</td></tr></table> 205 <table BORDER=0 WIDTH="94%"> 206 <tr> 207 <td width="3%"><br></td> 208 <td ALIGN=LEFT BGCOLOR="#FFFFFF"> 209 <img SRC="images/right_triangle_option.png" 210 ALT=">" BORDER=0 height=14 211 width=15><b><font face="Helvetica, Arial" 212 ><font color="#00B04F"><font size="+1"> 213 <a href="GraphicsMagick.html#details-log">-log</a> <i><string></i> 214 </font></font></font></b></td></tr></table> 215 <table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>Specify format for debug log</td></tr></table> 216 <table BORDER=0 WIDTH="94%"> 217 <tr> 218 <td width="3%"><br></td> 219 <td ALIGN=LEFT BGCOLOR="#FFFFFF"> 220 <img SRC="images/right_triangle_option.png" 221 ALT=">" BORDER=0 height=14 222 width=15><b><font face="Helvetica, Arial" 223 ><font color="#00B04F"><font size="+1"> 224 <a href="GraphicsMagick.html#details-verbose">-verbose</a> 225 </font></font></font></b></td></tr></table> 226 <table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print detailed information about the image</td></tr></table> 227 <table BORDER=0 WIDTH="94%"> 228 <tr> 229 <td width="3%"><br></td> 230 <td ALIGN=LEFT BGCOLOR="#FFFFFF"> 231 <img SRC="images/right_triangle_option.png" 232 ALT=">" BORDER=0 height=14 233 width=15><b><font face="Helvetica, Arial" 234 ><font color="#00B04F"><font size="+1"> 235 <a href="GraphicsMagick.html#details-version">-version</a> 236 </font></font></font></b></td></tr></table> 237 <table width="90%" border="0" cellspacing="0" cellpadding="8"> <tr><td width="6%"><br></td><td>print GraphicsMagick version string</td></tr></table> 238 </td></tr></table> 239 <p> 240 <i><a href="#top">Back to Contents</a></i> 241 </p> 242 <table BORDER=0 WIDTH="100%"> 243 <tr> 244 <td ALIGN=LEFT bgcolor="#FFFFFF"><img 245 SRC="images/right_triangle.png" ALT=">" BORDER=0 246 height=14 width=15><b><font face="Helvetica, Arial"><font 247 color="#00B04F"><font size="+1"> 248 <a NAME="conj-msl"></a>Magick Scripting Language 249 </font></font></font></b></td></tr></table> 250 <table width="94%" border="0" cellspacing="0" cellpadding="8"> 251 <tr><td width="3%"><br></td><td> 252 <p> 253 The Magick Scripting Language (MSL) presently defines the following 254 elements and their attributes: 255 <dl> 256 <dt><image></dt> 257 <dd>background, color, id, size</dd> 258 <dd> 259 Define a new image object. <strong></image></strong> destroys it. Because of 260 this, if you wish to reference multiple "subimages" (aka pages or 261 layers), you can embed one <strong>image</strong> element inside of another. For 262 example: 263 </dd> 264 <dd> 265 <pre> 266 <image> 267 <read filename="input.png" /> 268 <get width="base-width" height="base-height" /> 269 <image height="base-height" width="base-width"> 270 <image /> 271 <write filename="output.mng" /> 272 </image> 273 </pre> 274 </dd> 275 <dd> 276 <pre> 277 <image size="400x400" /> 278 </pre> 279 </dd> 280 <dt><group></dt> 281 <dd> 282 Define a new group of image objects. By default, images are only 283 valid for the life of their <strong><image></strong>element. 284 </dd> 285 <dd> 286 <pre> 287 <image> -- creates the image 288 ..... -- do stuff with it 289 </image> -- dispose of the image 290 </pre> 291 </dd> 292 <dd> 293 However, in a group, all images in that group will stay around for the 294 life of the group: 295 </dd> 296 <dd> 297 <pre> 298 <group> -- start a group 299 <image> -- create an image 300 .... -- do stuff 301 </image> -- NOOP 302 <image> -- create another image 303 .... -- do more stuff 304 </image> -- NOOP 305 <write filename="image.mng" /> -- output 306 </group> -- dispose of both images 307 </pre> 308 </dd> 309 <dt><read></dt> 310 <dd>filename</dd> 311 <dd> 312 Read a new image from a disk file. 313 </dd> 314 <dd> 315 <pre> 316 <read filename="image.gif" /> 317 </pre> 318 </dd> 319 <dd> 320 To read two images use 321 </dd> 322 <dd> 323 <pre> 324 <read filename="image.gif" /> 325 <read filename="image.png /> 326 </pre> 327 </dd> 328 <dt><write></dt> 329 <dd>filename</dd> 330 <dd>Write the image(s) to disk, either as 331 a single multiple-image file or multiple ones if necessary. 332 </dd> 333 <dd> 334 <pre> 335 <write filename=image.tiff" /> 336 </pre> 337 <dt><get></dt> 338 <dd>Get any attribute recognized by 339 PerlMagick's GetAttribute() and stores it as an image attribute for later 340 use. Currently only <em>width</em> and <em>height</em> are supported.</dd> 341 <dd> 342 <pre> 343 <get width="base-width" height="base-height" /> 344 <print output="Image size is %[base-width]x%[base-height].\n" /> 345 </pre> 346 </dd> 347 <dt><set></dt> 348 <dd>background, bordercolor, clip-mask, colorspace, density, 349 magick, mattecolor, opacity. Set an attribute recognized by 350 PerlMagick's GetAttribute().</dd> 351 <dt><profile></dt> 352 <dd>[profilename]</dd> 353 <dd> 354 Read one or more IPTC, ICC or generic profiles from file and assign to image 355 </dd> 356 <dd> 357 <pre> 358 <profile iptc="profile.iptc" generic="generic.dat" /> 359 </pre> 360 </dd> 361 <dd> 362 To remove a specified profile use "!" as the filename eg 363 </dd> 364 <dd> 365 <pre> 366 <profile icm="!" iptc="profile.iptc" /> 367 </pre> 368 </dd> 369 <dt><border></dt> 370 <dd>fill, geometry, height, width</dd> 371 <dt><blur></dt> 372 <dd>radius, sigma</dd> 373 <dt><charcoal></dt> 374 <dd>radius, sigma</dd> 375 <dt><chop></dt> 376 <dd>geometry, height, width, x, y</dd> 377 <dt><crop></dt> 378 <dd>geometry, height, width, x, y</dd> 379 <dt><composite></dt> 380 <dd>compose, geometry, gravity, image, x, y</dd> 381 <dd> 382 <pre> 383 <?xml version="1.0" encoding="UTF-8"?> 384 <group> 385 <image id="image_01"> 386 <read filename="cloud3.gif"/> 387 <resize geometry="250x90"/> 388 </image> 389 <image id="image_02"> 390 <read filename="cloud4.gif"/> 391 <resize geometry="190x100"/> 392 </image> 393 <image> 394 <read filename="background.jpg"/> 395 <composite image="image_01" geometry="+740+470"/> 396 <composite image="image_02" geometry="+390+415"/> 397 </image> 398 <write filename="result.png"/> 399 </group> 400 </pre> 401 </dd> 402 <dt><despeckle></dt> 403 <dt><emboss></dt> 404 <dd>radius, sigma</dd> 405 <dt><enhance></dt> 406 <dt><equalize></dt> 407 <dt><edge></dt> 408 <dd>radius</dd> 409 <dt><flip></dt> 410 <dt><flop></dt> 411 <dt><frame></dt> 412 <dd>fill, geometry, height, width, x, y, inner, outer</dd> 413 <dt><flatten></dt> 414 <dt><get></dt> 415 <dd>height, width</dd> 416 <dt><gamma></dt> 417 <dd>red, green, blue</dd> 418 <dt><image></dt> 419 <dd>background, color, id, size</dd> 420 <dt><implode></dt> 421 <dd>amount</dd> 422 <dt><magnify></dt> 423 <dt><minify></dt> 424 <dt><medianfilter></dt> 425 <dd>radius</dd> 426 <dt><normalize></dt> 427 <dt><oilpaint></dt> 428 <dd>radius</dd> 429 <dt><print></dt> 430 <dd>output</dd> 431 <dt><profile></dt> 432 <dd>[profilename]</dd> 433 <dt><read></dt> 434 <dt><resize></dt> 435 <dd>blur, filter, geometry, height, width</dd> 436 <dt><roll></dt> 437 <dd>geometry, x, y</dd> 438 <dt><rotate></dt> 439 <dd>degrees</dd> 440 <dt><reducenoise></dt> 441 <dd>radius</dd> 442 <dt><sample></dt> 443 <dd>geometry, height, width</dd> 444 <dt><scale></dt> 445 <dd>geometry, height, width</dd> 446 <dt><sharpen></dt> 447 <dd>radius, sigma</dd> 448 <dt><shave></dt> 449 <dd>geometry, height, width</dd> 450 <dt><shear></dt> 451 <dd>x, y</dd> 452 <dt><solarize></dt> 453 <dd>threshold</dd> 454 <dt><spread></dt> 455 <dd>radius</dd> 456 <dt><stegano></dt> 457 <dd>image</dd> 458 <dt><stereo></dt> 459 <dd>image</dd> 460 <dt><swirl></dt> 461 <dd>degrees</dd> 462 <dt><texture></dt> 463 <dd>image</dd> 464 <dt><threshold></dt> 465 <dd>threshold</dd> 466 <dt><transparent></dt> 467 <dd>color</dd> 468 <dt><trim></dt> 469 </dl> 470 </td></tr></table>