Page 1 of 1

Tiling/Montaging Huge Images

Posted: 2018-11-03T06:37:14-07:00
by nick18
Platform: Ubuntu 16
ImageMagick Version: 6.7.8-9

I have several large images i need to turn into one gigantic image.

Currently i've been testing the montage command with 4x 40,000 x 40,000 Images tiles in a 2x2 grid (so resulting output is 80,000px square) using the command:

Code: Select all

montage image1.jpg image2.jpg image3.jpg image4.jpg -tile 2x2 -geometry +0+0 tiled_output.jpg
I have 27GB of RAM on the AWS instance i'm working with, and IM seems to top out at 90.6% usage of this with low CPU usage (6-10%). It's been working for about 2 hours now.

Is there a better and faster way to achieve this?

Many thanks for your time

Re: Tiling/Montaging Huge Images

Posted: 2018-11-03T07:02:10-07:00
by snibgo
You don't have enough memory, so IM will cache pixels on disk, which is slow.

Your images are 8 bits/channel, so you don't need Q16 IM. If you are not using Q8, I suggest you do so, as that will halve memory usage.

I expect v7 would be better still, not storing the alpha channel.

More specialist tools may be quicker, eg jpegtran then pnmcat.

Re: Tiling/Montaging Huge Images

Posted: 2018-11-04T01:11:30-07:00
by nick18
Thank you very much! I'll test out these options and update with further details.