What is MagickScript?

MagickScript is a class that uses an xml file to perform multiple operations on an image. When a script is loaded it will be validated with the MagickScript.xsd file that can be downloaded
here. With thexsi:noNamespaceSchemaLocation attribute you will get code completion in Visual Studio. Below is an example script that resizes an image to half its size.

Reuse the same script.

When you want to execute the same script with multiple images you should not specify the
fileName attribute in the read element. You should provide the image as the first argument of the
Execute method. And because you probably don't want to write to the same file every time you should not specify the
write element. Below is an example.

Write multiple output files.

With the clone element you can create a clone of an image while you are executing a script. Below is an example that reads one input file and writes two output files.

Clone.msl:

<mslxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="MagickScript.xsd"><readfileName="Snakeware.jpg"><clone><cropwidth="100"height="100"/><writefileName="Snakeware.cropped.jpg"/></clone><!-- When you specify zero for the height it will be calculated.--><resizewidth="300"height="0"/><writefileName="Snakeware.resized.jpg"/></read></msl>