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