public void Test_TrimBounds()
    {
      using (MagickImageCollection collection = new MagickImageCollection())
      {
        ExceptionAssert.Throws<InvalidOperationException>(delegate ()
        {
          collection.TrimBounds();
        });

        collection.Add(Files.Builtin.Logo);
        collection.Add(Files.Builtin.Wizard);
        collection.TrimBounds();

        Assert.AreEqual(640, collection[0].Page.Width);
        Assert.AreEqual(640, collection[0].Page.Height);
        Assert.AreEqual(0, collection[0].Page.X);
        Assert.AreEqual(0, collection[0].Page.Y);

        Assert.AreEqual(640, collection[1].Page.Width);
        Assert.AreEqual(640, collection[1].Page.Height);
        Assert.AreEqual(0, collection[0].Page.X);
        Assert.AreEqual(0, collection[0].Page.Y);
      }
    }
Ejemplo n.º 2
0
 private static MagickImage ExecuteTrimBounds(MagickImageCollection collection)
 {
     collection.TrimBounds();
     return(null);
 }
Ejemplo n.º 3
0
 private static MagickImage ExecuteTrimBounds(MagickImageCollection collection)
 {
   return collection.TrimBounds();
 }
Ejemplo n.º 4
0
 private static MagickImage ExecuteTrimBounds(MagickImageCollection collection)
 {
     return(collection.TrimBounds());
 }