public static void MergeMultipleImages() { using (MagickImageCollection images = new MagickImageCollection()) { // Add the first image MagickImage first = new MagickImage(SampleFiles.SnakewarePng); images.Add(first); // Add the second image MagickImage second = new MagickImage(SampleFiles.SnakewarePng); images.Add(second); // Create a mosaic from both images using (MagickImage result = images.Mosaic()) { // Save the result result.Write(SampleFiles.OutputDirectory + "Mosaic.png"); } } }
private static MagickImage ExecuteMosaic(MagickImageCollection collection) { return collection.Mosaic(); }
public void Test_Mosaic() { using (MagickImageCollection collection = new MagickImageCollection()) { ExceptionAssert.Throws<InvalidOperationException>(delegate () { collection.Mosaic(); }); collection.Add(Files.SnakewarePNG); collection.Add(Files.ImageMagickJPG); using (MagickImage mosaic = collection.Mosaic()) { Assert.AreEqual(286, mosaic.Width); Assert.AreEqual(118, mosaic.Height); } } }
private static MagickImage ExecuteMosaic(MagickImageCollection collection) { return(collection.Mosaic()); }