Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Precisely placing multiple overlapping images

$
0
0
How do I precisely place multiple overlapping images? Below is the code I have so far. It overlaps the images at their top left corner. See example below.
string[] files = Directory.GetFiles(".", "*.png", SearchOption.TopDirectoryOnly);
MagickImageCollection collection = new MagickImageCollection();
for (int i = 0; i < files.Length; i++) {
    collection.Add(files[i]);
}
MagickImage result = collection.Mosaic();
result.Write(@"output\output.png");
Image

Background: My code will intelligently merge multiple images into one so they overlap where the pixels are identical. I'm creating 10 to 20 random screen shots zoomed into paused games and I need to combine them into one large picture. Each picture could be a different width and height. I don't want any distortion of the original images so photo panoramic software will not work for me.

How do I position each image anywhere I want by specifying either an absolute or relative top and left?

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>