Esempio n. 1
0
        private MagickImage ExecuteMorph(XmlElement element, MagickImageCollection collection)
        {
            Int32 frames_ = Variables.GetValue <Int32>(element, "frames");

            collection.Morph(frames_);
            return(null);
        }
    public void Test_Morph()
    {
      using (MagickImageCollection collection = new MagickImageCollection())
      {
        ExceptionAssert.Throws<InvalidOperationException>(delegate ()
        {
          collection.Morph(10);
        });

        collection.Add(Files.Builtin.Logo);

        ExceptionAssert.Throws<InvalidOperationException>(delegate ()
        {
          collection.Morph(10);
        });

        collection.AddRange(Files.Builtin.Wizard);

        collection.Morph(4);
        Assert.AreEqual(6, collection.Count);
      }
    }
    public void Test_Morph()
    {
      using (MagickImageCollection collection = new MagickImageCollection(Files.RoseSparkleGIF))
      {
        Assert.AreEqual(3, collection.Count);

        using (MagickImageCollection morphed = collection.Morph(2))
        {
          Assert.AreEqual(7, morphed.Count);
        }
      }
    }
 private MagickImage ExecuteMorph(XmlElement element, MagickImageCollection collection)
 {
   Int32 frames_ = Variables.GetValue<Int32>(element, "frames");
   collection.Morph(frames_);
   return null;
 }