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