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

New Post: Merge huge images into one.

$
0
0
Hello, I'm new in using Magick.NET.
And I need merge several huge images(each 29000x14500). I tried next sample:
static void Main(string[] args)
        {
            try
            {
                 using (MagickImageCollection images = new MagickImageCollection())
                {
                    // Add the first image
                    MagickImage first = new MagickImage(@"C:\Images\item1.jpg");
                    images.Add(first);

                    // Add the second image
                    MagickImage second = new MagickImage(@"C:\Images\item2.jpg");
                    images.Add(second);

                    // Add the second image
                    MagickImage third = new MagickImage(@"C:\Images\item3.jpg");
                    images.Add(third);
                    // Create a mosaic from both images
                    using (MagickImage result = images.Mosaic())
                    {
                        
                        // Save the result
                        result.Write(@"E:\itemresult.jpg");
                    }
                }
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message);
            }
        }
And have next error:
HugeImageMerger.vshost.exe: Insufficient memory (case 4) `E:\itemresult.jpg' @ error/jpeg.c/JPEGErrorHandler/336

What wrong did I do?
Thanks in advance!

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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