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