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

New Post: Having trouble trying to replicate a ImageMagic montage command

$
0
0
Hi,

Im trying to move some batch code image generation over to Magick.net to run it on an ASP.NET webpage. All of my image generation code is working but having trouble trying to get the below to work.

Im trying to replicate the following
montage -mode concatenate -tile 1x red.png orange.png yellow.png green.png yellow.png red.png out.jpg
using (MagickImageCollection images = new MagickImageCollection())
            {
                // Add the first image
                MagickImage first = new MagickImage("blue.png");
                images.Add(first);

                // Add the second image
                MagickImage second = new MagickImage("yellow.png");
                images.Add(second);

                images.Add(first);
                images.Add(first);

                MontageSettings montage_settings = new MontageSettings();

                montage_settings.TileGeometry = new MagickGeometry(1, 4);

                // Create a mosaic from both images
                using (MagickImage result = images.Montage(montage_settings))
                {
                    // Save the result
                    result.Write("out.png");
                }
            }
This gets me one column with four images in it, but each of the images are surrounded by a white border. Cant for the life of me work out how to get rid of that.

Any ideas?

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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