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

New Post: Memory leak when appending *.tif files

$
0
0
I want to combine 2 *.tif files into 1 side by side image so I made it like this:
private void button1_Click(object sender, EventArgs e)
        {
            using (MagickImageCollection images = new MagickImageCollection())
            {
                MagickImage first = new MagickImage("11.tif");
                first.Resize(1169, 1653);
                images.Add(first);

                MagickImage second = new MagickImage("22.tif");
                second.Resize(1169, 1653);
                images.Add(second);
                
                using (MagickImage result = images.AppendHorizontally())
                {                    
                    result.Write("output.tiff");                   
                }
            }

        }
The combined file is successfully created but may be it causes memory leak. I opened task manager for observing, everytime I clicked the button, the application occupied more and more memory.

I'm using Magick.NET-6.8.6.301-Q8-x86-net40-client
.NET framework 4.5

The source images("11.tif", "22.tif") attributes as follow:
Dimension: 1653x2338
Horizontal resolution: 200 dpi
Vertical resolution: 200 dpi
Bitdepth: 1
Compression: CCITT T.6
Resolution unit: 2

Thanks for any help!

Viewing all articles
Browse latest Browse all 3693

Trending Articles



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