private void ExecuteSpread(XmlElement element, MagickImage image)
{
Hashtable arguments = new Hashtable();
foreach (XmlAttribute attribute in element.Attributes)
{
if (attribute.Name == "method")
arguments["method"] = Variables.GetValue<PixelInterpolateMethod>(attribute);
else if (attribute.Name == "radius")
arguments["radius"] = Variables.GetValue<double>(attribute);
}
if (arguments.Count == 0)
image.Spread();
else if (OnlyContains(arguments, "method", "radius"))
image.Spread((PixelInterpolateMethod)arguments["method"], (double)arguments["radius"]);
else if (OnlyContains(arguments, "radius"))
image.Spread((double)arguments["radius"]);
else
throw new ArgumentException("Invalid argument combination for 'spread', allowed combinations are: [] [method, radius] [radius]");
}
private void ExecuteStatistic(XmlElement element, MagickImage image)