I am using image magic in the Java (I am using im4java) project where I need to create really big image (16050x30000) - it is a table, representation, so wide can't change much, but height is basically unlimited. What I am doing:
1. creating image pieces of the table with max size 4500x3000 px; This piece has png format, 2 colors palette - black and white and depth 8. Resulting size is around 400KB - 500KB
2. reducing image size two times to have about 2500x1500px piece. Image size is reduced to about 200-300KB.
Syntax:
Code: Select all
img.png -colorspace sRGB -adaptive-resize 2500x1500 -colorspace RGB img-tmp.png
4. When all horizontal image pieces (with reduced size from step 2) of specific height are created I am appending them to each other to create one vertical piece.
Syntax:
Code: Select all
img-tmp.png img2-tmp.png img3-tmp.png img4-tmp.png +append v_1.png
5. After all vertical pieces are created, I am appending them to create the whole table representation.
Syntax:
Code: Select all
v_1.png v_2.png v_3.png v_4.png v_5.png -append table.png
If possible I would like to escape step 2 at all, since it is not very efficient, but currently it is not (because of above-mentioned issue). So, how to increase appending speed?
I have tried appending without java by using command line with the same images, but the result was still the same: 1.5GB of RAM and forever process. It seems like I am doing something wrong or is this really such a big deal for IM to work with such big images?
Any help would be much appreciated. Thank you in advance.