>K M conjure: ImageMagick - Image Processing and Display PackageJ R < W<8 
B

 
  &
>NAME+
>

:conjure - process a Magick Scripting Language (MSL) script

FWARNING: Conjure and MSL are in very early development and the%syntax is subject to change!
 


  &
>Contents+
>



Synopsis

Description

Options

,Magick Scripting Language

Authors

Copyright


  &
>Synopsis+
>



cconjure [ options ] script.msl_[ [ options ] script.msl ]
 


  &
>Description+
>



2The Magick scripting language (MSL) will primarilyGbenefit those that want to accomplish custom image processing tasks butBdo not wish to program, or those that do not have access to a PerlFinterpreter or a compiler. The interpreter is called conjure and hereis an example script:
 


0    <?xml version="1.0" encoding="UTF-8"?>!    <image size="400x400" >)      <read filename="image.gif" />;      <get width="base-width" height="base-height" />/      <resize geometry="%[dimensions]" />1      <get width="width" height="height" />      <print output=6        "Image sized from %[base-width]x%[base-height](         to %[width]x%[height].\n" />*      <write filename="image.png" />    </image>


invoked with
 


/    conjure -dimensions 400x400 incantation.msl


AAll operations will closely follow the key/value pairs defined in#PerlMagick, unless otherwise noted.
 


DConjure is in the early stages of development as of April 2002.
 


JThis early announcement is to allow ImageMagick users to contribute ideas Gearly in the process so when the scripting language is released it willHbe useful/stable from the get-go! If you want to contribute suggestions7about the Magick scripting language (MSL), post them to"magick-developers@imagemagick.org.
 




+Back to Contents  

  &
>Options+
>



FOptions are processed in command line order. Any option you specify onOthe command line remains in effect until it is explicitly changed by specifyingLthe option again with a different effect, or if it is changed by a statementin the scripting language.
 


@You can define your own keyword/value pairs on the command line.IThe script can then use this information when setting values by including7%[keyword] in the string. For example, if you included@"-dimensions 400x400" on the command line, as illustrated above,then any string:containing "%[dimensions]" would have 400x400 substituted.<The "%[string]" can be used either an entire string, such as9geometry="%[dimensions]" or as a part of a string such asfilename="%[basename].png".

?The keyword can be any string except for the following reservedMstrings (in any upper, lower, or mixed case variant): debug,Thelp, and verbose, whose usage is described below.

The value can be any string. If;either the keyword or the value contains white space or any=symbols that have special meanings to your shell such as "#","|",orI"%", enclose the string in quotation marks or use "\" to escape the whitespace and special symbols.

/Keywords and values are case dependent. "Key","key",and "KEY" wouldbe three different keywords.
 


3For a more detailed description of each option, see7ImageMagick(1).
 
 !

. -debug <events>+
 

enable debug printout
 !

. -help+
£

print usage instructions
 !

.; -verbose+
µ

print detailed information about the image
 !

.; -version+
«

print ImageMagick version string




+Back to Contents  

  &
>+Magick Scripting Language+
>

CThe Magick Scripting Language (MSL) presently defines the followingelements and their attributes:

<image>

Define a new image object.I</image> destroys it. Because of this, if you wish8to reference multiple "subimages" (aka pages or layers),:you can embed one image element inside ofanother. For example:


    <image>'    <read filename="input.png" />9    <get width="base-width" height="base-height" />9    <image height="base-height" width="base-width">    <image />)    <write filename="output.mng" />    </image>



"    <image size="400x400" />


<group>
(
Define a new group of image objects.1By default, images are only valid for the life of,their <image>element.


(    <image>   -- creates the image!    .....     -- do stuff with it+    </image>  -- dispose of the image


8However, in a group, all images in that group will stay !around for the life of the group:


<    <group>                           -- start a group>        <image>                       -- create an image1        ....                          -- do stuff3        </image>                      -- NOOPC        <image>                       -- create another image6        ....                          -- do more stuff3        </image>                      -- NOOP7        <write filename="image.mng" />  -- outputE    </group>                          -- dispose of both images


<read>
&
Read a new image from a disk file.


'    <read filename="image.gif" />


To read two images use


'    <read filename="image.gif" />&    <read filename="image.png />


<write>
)
Write the image(s) to disk, either as;a single multiple-image file or multiple ones if necessary.


)     <write filename=image.tiff" />

<get>
#
Get any attribute recognized byIPerlMagick's GetAttribute() and stores it as an image attribute for laterJuse. Currently only width and height are supported.


9    <get width="base-width" height="base-height" />J    <print output="Image size is %[base-width]x%[base-height].\n" />


<set>
<
background, bordercolor, clip-mask, colorspace, density,<magick, mattecolor, opacity. Set an attribute recognized by!PerlMagick's GetAttribute().

<border>
*
fill, geometry, height, width

<blur>

radius, sigma

<charcoal>

radius, sigma

<chop>
*
geometry, height, width, x, y

<crop>
*
geometry, height, width, x, y

<despeckle>

<emboss>

radius, sigma

<enhance>

<equalize>

<flip>

<flop>

<frame>
>
fill, geometry, height, width, x, y, inner, outer

<get>

height, width

<image>
(
background, color, id, size

<magnify>

<minify>

<normalize>

<print>

output

<read>

<resize>
2
blur, filter, geometry, height, width

<roll>

geometry, x, y

<rotate>

degrees

<sample>
$
geometry, height, width

<scale>
$
geometry, height, width

<sharpen>

radius, sigma

<shave>
$
geometry, height, width

<shear>

x, y

<solarize>

threshold

<spread>

radius

<stegano>

image

<stereo>

image

<swirl>

degrees

<texture>

image

<threshold>

threshold

<transparent>

color

<trim>


  &
>Authors+
>



 John Cristy,Omagick-users@imagemagick.org,ImageMagick Studio LLC,
Glenn Randers-Pehrson,=randeg@alum.rpi.edu,ImageMagick Studio LLC,
Leonard Rosenthol,Ileonardr@lazerware.com,ImageMagick Studio LLC.

 




+Back to Contents  

  &
>Copyright+
>



6Copyright (C) 2002 ImageMagick Studio

MPermission is hereby granted, free of charge, to any person obtainingKa copy of this software and associated documentation files ("ImageMagick"),Hto deal in ImageMagick without restriction, including without limitationHthe rights to use, copy, modify, merge, publish, distribute, sublicense,Pand/or sell copies of ImageMagick, and to permit persons to whom the ImageMagickDis furnished to do so, subject to the following conditions:

OThe above copyright notice and this permission notice shall be included>in all copies or substantial portions of ImageMagick.

OThe software is provided "as is", without warranty of any kind, expressKor implied, including but not limited to the warranties of merchantability,Ffitness for a particular purpose and noninfringement.In no event shallGImageMagick Studio be liable for any claim, damages or other liability,Fwhether in an action of contract, tort or otherwise, arising from, outDof or in connection with ImageMagick or the use or other dealings inImageMagick.

;Except as contained in this notice, the name of theGImageMagick Studio LLC shall not be used in advertising or otherwise toLpromote the sale, use or other dealings in ImageMagick without prior written3authorization from the ImageMagick Studio.



+Back to Contents  


>

9Image manipulation software that works like magic.