Errr.... First Let's create some gifs:
dir = CreateDirectory@"D:\\lalala\\img_test";
data = RandomReal[{0, 1}, {8, 100}];
i = 0; (i++;
Export[FileNameJoin[{dir, ToString@i <> "r.gif"}], ListLinePlot@#,
ImageResolution -> 160]) & /@ data
so we have 8 *r.gif now(*character 'r' is used for easy "r.gif"s string match later *), MaxMemoryUsed[] gives 54874752, it seems fine, then ImageAssemble these *r.gif:
Export[FileNameJoin[{dir, "all.gif"}],
ImageAssemble[
Partition[Import /@ FileNames["*r.gif", dir], 2] /.
x_Image :> ImageCrop[x, {800, 512}, Padding -> Automatic]],
ImageResolution -> 160]
"all.gif" is successfully and correctly created, however, check for MaxMemoryUsed[] it gives 211305360!!!(*the {800, 512} in the code above is the max size of r.gifs in my PC *)
In my Win7 Mathematica9, the *r.gifs are around 35kB and finial all.gif is 285kB, How should ImageAssemble and Export take more than 200M memory to do this? In real problem I have even larger and more gifs to deal with, and Mathematica crashed when I tryed to "combine" and export them. Is there any way to avoid this problem? or should I turn to other picture format?