private void ExecuteResample(XmlElement element, MagickImage image)
{
Hashtable arguments = new Hashtable();
foreach (XmlAttribute attribute in element.Attributes)
{
if (attribute.Name == "density")
arguments["density"] = Variables.GetValue<PointD>(attribute);
else if (attribute.Name == "resolutionX")
arguments["resolutionX"] = Variables.GetValue<double>(attribute);
else if (attribute.Name == "resolutionY")
arguments["resolutionY"] = Variables.GetValue<double>(attribute);
}
if (OnlyContains(arguments, "density"))
image.Resample((PointD)arguments["density"]);
else if (OnlyContains(arguments, "resolutionX", "resolutionY"))
image.Resample((double)arguments["resolutionX"], (double)arguments["resolutionY"]);
else
throw new ArgumentException("Invalid argument combination for 'resample', allowed combinations are: [density] [resolutionX, resolutionY]");
}
private void ExecuteResize(XmlElement element, MagickImage image)