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>&nbsp;<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>&nbsp;<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      &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   102      &lt;image size="400x400" &gt;
   103        &lt;read filename="image.gif" /&gt;
   104        &lt;get width="base-width" height="base-height" /&gt;
   105        &lt;resize geometry="%[dimensions]" /&gt;
   106        &lt;get width="width" height="height" /&gt;
   107        &lt;print output=
   108          "Image sized from %[base-width]x%[base-height]
   109           to %[width]x%[height].\n" /&gt;
   110        &lt;write filename="image.png" /&gt;
   111      &lt;/image&gt;
   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  &nbsp;</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>&nbsp;<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>&lt;events&gt;</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>&lt;key&gt;</i>{<i>=&lt;value&gt;</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>&lt;string&gt;</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  &nbsp;</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>&lt;image&gt;</dt>
   257  <dd>background, color, id, size</dd>
   258  <dd>
   259  Define a new image object.  <strong>&lt;/image&gt;</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      &lt;image&gt;
   267      &lt;read filename="input.png" /&gt;
   268      &lt;get width="base-width" height="base-height" /&gt;
   269      &lt;image height="base-height" width="base-width"&gt;
   270      &lt;image /&gt;
   271      &lt;write filename="output.mng" /&gt;
   272      &lt;/image&gt;
   273  </pre>
   274  </dd>
   275  <dd>
   276  <pre>
   277      &lt;image size="400x400" /&gt;
   278  </pre>
   279  </dd>
   280  <dt>&lt;group&gt;</dt>
   281  <dd>
   282  Define a new group of image objects.  By default, images are only
   283  valid for the life of their <strong>&lt;image&gt;</strong>element.
   284  </dd>
   285  <dd>
   286  <pre>
   287      &lt;image&gt;   -- creates the image
   288      .....     -- do stuff with it
   289      &lt;/image&gt;  -- 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      &lt;group&gt;                           -- start a group
   299          &lt;image&gt;                       -- create an image
   300          ....                          -- do stuff
   301          &lt;/image&gt;                      -- NOOP
   302          &lt;image&gt;                       -- create another image
   303          ....                          -- do more stuff
   304          &lt;/image&gt;                      -- NOOP
   305          &lt;write filename="image.mng" /&gt;  -- output
   306      &lt;/group&gt;                          -- dispose of both images
   307  </pre>
   308  </dd>
   309  <dt>&lt;read&gt;</dt>
   310      <dd>filename</dd>
   311  <dd>
   312  Read a new image from a disk file.
   313  </dd>
   314  <dd>
   315  <pre>
   316      &lt;read filename="image.gif" /&gt;
   317  </pre>
   318  </dd>
   319  <dd>
   320  To read two images use
   321  </dd>
   322  <dd>
   323  <pre>
   324      &lt;read filename="image.gif" /&gt;
   325      &lt;read filename="image.png /&gt;
   326  </pre>
   327  </dd>
   328  <dt>&lt;write&gt;</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       &lt;write filename=image.tiff" /&gt;
   336  </pre>
   337  <dt>&lt;get&gt;</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      &lt;get width="base-width" height="base-height" /&gt;
   344      &lt;print output="Image size is %[base-width]x%[base-height].\n" /&gt;
   345  </pre>
   346  </dd>
   347  <dt>&lt;set&gt;</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>&lt;profile&gt;</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      &lt;profile iptc="profile.iptc" generic="generic.dat" /&gt;
   359  </pre>
   360  </dd>
   361  <dd>
   362  To remove a specified profile use "!" as the filename eg
   363  </dd>
   364  <dd>
   365  <pre>
   366      &lt;profile icm="!" iptc="profile.iptc" /&gt;
   367  </pre>
   368  </dd>
   369  <dt>&lt;border&gt;</dt>
   370      <dd>fill, geometry, height, width</dd>
   371  <dt>&lt;blur&gt;</dt>
   372      <dd>radius, sigma</dd>
   373  <dt>&lt;charcoal&gt;</dt>
   374      <dd>radius, sigma</dd>
   375  <dt>&lt;chop&gt;</dt>
   376      <dd>geometry, height, width, x, y</dd>
   377  <dt>&lt;crop&gt;</dt>
   378      <dd>geometry, height, width, x, y</dd>
   379  <dt>&lt;composite&gt;</dt>
   380      <dd>compose, geometry, gravity, image, x, y</dd>
   381  <dd>
   382  <pre>
   383      &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   384      &lt;group&gt;
   385          &lt;image id="image_01"&gt;
   386              &lt;read filename="cloud3.gif"/&gt;
   387              &lt;resize geometry="250x90"/&gt;
   388          &lt;/image&gt;
   389          &lt;image id="image_02"&gt;
   390              &lt;read filename="cloud4.gif"/&gt;
   391              &lt;resize geometry="190x100"/&gt;
   392          &lt;/image&gt;
   393          &lt;image&gt;
   394              &lt;read filename="background.jpg"/&gt;
   395              &lt;composite image="image_01" geometry="+740+470"/&gt;
   396              &lt;composite image="image_02" geometry="+390+415"/&gt;
   397          &lt;/image&gt;
   398          &lt;write filename="result.png"/&gt;
   399      &lt;/group&gt;
   400  </pre>
   401  </dd>
   402  <dt>&lt;despeckle&gt;</dt>
   403  <dt>&lt;emboss&gt;</dt>
   404      <dd>radius, sigma</dd>
   405  <dt>&lt;enhance&gt;</dt>
   406  <dt>&lt;equalize&gt;</dt>
   407  <dt>&lt;edge&gt;</dt>
   408      <dd>radius</dd>
   409  <dt>&lt;flip&gt;</dt>
   410  <dt>&lt;flop&gt;</dt>
   411  <dt>&lt;frame&gt;</dt>
   412      <dd>fill, geometry, height, width, x, y, inner, outer</dd>
   413  <dt>&lt;flatten&gt;</dt>
   414  <dt>&lt;get&gt;</dt>
   415      <dd>height, width</dd>
   416  <dt>&lt;gamma&gt;</dt>
   417      <dd>red, green, blue</dd>
   418  <dt>&lt;image&gt;</dt>
   419      <dd>background, color, id, size</dd>
   420  <dt>&lt;implode&gt;</dt>
   421      <dd>amount</dd>
   422  <dt>&lt;magnify&gt;</dt>
   423  <dt>&lt;minify&gt;</dt>
   424  <dt>&lt;medianfilter&gt;</dt>
   425      <dd>radius</dd>
   426  <dt>&lt;normalize&gt;</dt>
   427  <dt>&lt;oilpaint&gt;</dt>
   428      <dd>radius</dd>
   429  <dt>&lt;print&gt;</dt>
   430      <dd>output</dd>
   431  <dt>&lt;profile&gt;</dt>
   432      <dd>[profilename]</dd>
   433  <dt>&lt;read&gt;</dt>
   434  <dt>&lt;resize&gt;</dt>
   435      <dd>blur, filter, geometry, height, width</dd>
   436  <dt>&lt;roll&gt;</dt>
   437      <dd>geometry, x, y</dd>
   438  <dt>&lt;rotate&gt;</dt>
   439      <dd>degrees</dd>
   440  <dt>&lt;reducenoise&gt;</dt>
   441      <dd>radius</dd>
   442  <dt>&lt;sample&gt;</dt>
   443      <dd>geometry, height, width</dd>
   444  <dt>&lt;scale&gt;</dt>
   445      <dd>geometry, height, width</dd>
   446  <dt>&lt;sharpen&gt;</dt>
   447      <dd>radius, sigma</dd>
   448  <dt>&lt;shave&gt;</dt>
   449      <dd>geometry, height, width</dd>
   450  <dt>&lt;shear&gt;</dt>
   451      <dd>x, y</dd>
   452  <dt>&lt;solarize&gt;</dt>
   453      <dd>threshold</dd>
   454  <dt>&lt;spread&gt;</dt>
   455      <dd>radius</dd>
   456  <dt>&lt;stegano&gt;</dt>
   457      <dd>image</dd>
   458  <dt>&lt;stereo&gt;</dt>
   459      <dd>image</dd>
   460  <dt>&lt;swirl&gt;</dt>
   461      <dd>degrees</dd>
   462  <dt>&lt;texture&gt;</dt>
   463      <dd>image</dd>
   464  <dt>&lt;threshold&gt;</dt>
   465      <dd>threshold</dd>
   466  <dt>&lt;transparent&gt;</dt>
   467      <dd>color</dd>
   468  <dt>&lt;trim&gt;</dt>
   469  </dl>
   470  </td></tr></table>