本文整理汇总了C#中ImageMagick.MagickImageCollection.Merge方法的典型用法代码示例。如果您正苦于以下问题:C# MagickImageCollection.Merge方法的具体用法?C# MagickImageCollection.Merge怎么用?C# MagickImageCollection.Merge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageMagick.MagickImageCollection
的用法示例。
在下文中一共展示了MagickImageCollection.Merge方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test_Merge
public void Test_Merge()
{
using (MagickImageCollection collection = new MagickImageCollection())
{
ExceptionAssert.Throws<InvalidOperationException>(delegate ()
{
collection.Merge();
});
collection.Read(Files.RoseSparkleGIF);
using (MagickImage first = collection.Merge())
{
Assert.AreEqual(collection[0].Width, first.Width);
Assert.AreEqual(collection[0].Height, first.Height);
}
}
}
示例2: Test_Combine
public void Test_Combine()
{
using (MagickImage rose = new MagickImage(Files.Builtin.Rose))
{
using (MagickImageCollection collection = new MagickImageCollection())
{
ExceptionAssert.Throws<InvalidOperationException>(delegate ()
{
collection.Combine();
});
collection.AddRange(rose.Separate(Channels.RGB));
Assert.AreEqual(3, collection.Count);
MagickImage image = collection.Merge();
Assert.AreNotEqual(rose.TotalColors, image.TotalColors);
image.Dispose();
image = collection.Combine();
Assert.AreEqual(rose.TotalColors, image.TotalColors);
}
}
}
示例3: Test_Combine
public void Test_Combine()
{
using (MagickImage rose = new MagickImage(Files.Builtin.Rose))
{
using (MagickImageCollection collection = new MagickImageCollection(rose.Separate(Channels.RGB)))
{
Assert.AreEqual(3, collection.Count);
MagickImage image = collection.Merge();
Assert.AreNotEqual(rose.TotalColors, image.TotalColors);
image.Dispose();
image = collection.Combine();
Assert.AreEqual(rose.TotalColors, image.TotalColors);
}
}
}
示例4: Test_Merge
public void Test_Merge()
{
using (MagickImageCollection collection = new MagickImageCollection(Files.RoseSparkleGIF))
{
using (MagickImage first = collection.Merge())
{
Assert.AreEqual(collection[0].Width, first.Width);
Assert.AreEqual(collection[0].Height, first.Height);
}
}
}
示例5: ExecuteMerge
private static MagickImage ExecuteMerge(MagickImageCollection collection)
{
return collection.Merge();
}