This project has moved. For the latest updates, please go here.

combining 2 tif files very slow on win 7 32

Jan 28, 2016 at 6:30 AM

I’m using version Q8 to combine 2 tif files in a single page. Both images are 17518x12193 pixels with 720 dpi and LZW.

My sample code is:
  string[] stFiles = { "input1.tif", "input2.tif" };
  using (MagickImageCollection collection = new MagickImageCollection())
            for (int i = 0; i < stFiles.Count(); i++)
                    MagickImage img= null;
                    img = new MagickImage(stFiles[i]);

            using (MagickImage mosaic = collection.Mosaic())

Those are times to get the output image:
  • on windows 7 64bit, I7, 4GB, the output file is created in 1 minute and 11 seconds.
  • on windows 7 32bit, I5, 8GB, the output file is created in 6 minutes and 35 seconds.
I will appreciate it if someone can help me to improve the speed on windows 32 bit!
Thank you very much!
Jan 28, 2016 at 10:54 AM
Edited Jan 28, 2016 at 10:57 AM
I think you are running into a memory limit on Windows in the 32-bit mode. When ImageMagick cannot allocate an image it will swap to disk instead. And that will cause a major decrease in performance.

The only solution for this issue is to use 64-bit or use images with smaller dimensions.
Jan 28, 2016 at 3:57 PM
Thanks a lot for your answer!

Unfortunately I can’t change images size!
On both pc’s I have fast SSD so I imagine it will not affect too much the speed.

It is any way to see when magick start swap to disk ?
Jan 28, 2016 at 6:18 PM
You should see files called magick* in your %TEMP% directory. Or you could enable debug logging (see the documentation) to see when that happens.