private void ExecuteOrderedDither(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 == "thresholdMap")
arguments["thresholdMap"] = Variables.GetValue<String>(attribute);
}
if (OnlyContains(arguments, "thresholdMap"))
image.OrderedDither((String)arguments["thresholdMap"]);
else if (OnlyContains(arguments, "thresholdMap", "channels"))
image.OrderedDither((String)arguments["thresholdMap"], (Channels)arguments["channels"]);
else
throw new ArgumentException("Invalid argument combination for 'orderedDither', allowed combinations are: [thresholdMap] [thresholdMap, channels]");
}
private void ExecutePerceptible(XmlElement element, MagickImage image)