private void ExecuteBlur(XmlElement element, MagickImage image)
{
Hashtable arguments = new Hashtable();
foreach (XmlAttribute attribute in element.Attributes)
{
if (attribute.Name == "channels")
arguments["channels"] = Variables.GetValue<Channels>(attribute);
else if (attribute.Name == "radius")
arguments["radius"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "sigma")
arguments["sigma"] = Variables.GetValue<double>(attribute);
}
if (arguments.Count == 0)
image.Blur();
else if (OnlyContains(arguments, "channels"))
image.Blur((Channels)arguments["channels"]);
else if (OnlyContains(arguments, "radius", "sigma"))
image.Blur((double)arguments["radius"], (double)arguments["sigma"]);
else if (OnlyContains(arguments, "radius", "sigma", "channels"))
image.Blur((double)arguments["radius"], (double)arguments["sigma"], (Channels)arguments["channels"]);
else
throw new ArgumentException("Invalid argument combination for 'blur', allowed combinations are: [] [channels] [radius, sigma] [radius, sigma, channels]");
}
private void ExecuteBorder(XmlElement element, MagickImage image)