Memory leak when appending *.tif files

Jul 16, 2013 at 9:32 AM
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!
Coordinator
Jul 16, 2013 at 5:51 PM
I can reproduce this and the problem is not specifically for .tiff files it also happens with other formats. I will create a work item to fix this bug in the MagickImageCollection.
Coordinator
Jul 16, 2013 at 5:53 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.