public static void ReadWriteEvents()
{
// Load crop script
MagickScript script = new MagickScript(SampleFiles.CropMsl);
// Event that will be raised when the script wants to read a file
script.Read += OnScriptRead;
// Event that will be raised when the script wants to write a file
script.Write += OnScriptWrite;
// Execute the script
script.Execute();
}