private MagickImage ExecuteSmushHorizontal(XmlElement element, MagickImageCollection collection) { Int32 offset_ = Variables.GetValue<Int32>(element, "offset"); return collection.SmushHorizontal(offset_); }
public void Test_Smush() { using (MagickImageCollection collection = new MagickImageCollection()) { ExceptionAssert.Throws<InvalidOperationException>(delegate () { collection.SmushHorizontal(5); }); ExceptionAssert.Throws<InvalidOperationException>(delegate () { collection.SmushVertical(6); }); collection.AddRange(Files.RoseSparkleGIF); using (MagickImage image = collection.SmushHorizontal(20)) { Assert.AreEqual((70 * 3) + (20 * 2), image.Width); Assert.AreEqual(46, image.Height); } using (MagickImage image = collection.SmushVertical(40)) { Assert.AreEqual(70, image.Width); Assert.AreEqual((46 * 3) + (40 * 2), image.Height); } } }
private MagickImage ExecuteSmushHorizontal(XmlElement element, MagickImageCollection collection) { Int32 offset_ = Variables.GetValue <Int32>(element, "offset"); return(collection.SmushHorizontal(offset_)); }