For example using
Code: Select all
convert +append
Code: Select all
convert -append
Code: Select all
int main(int argc, const char * argv[]){
MagickWand * wandG1, * wandG2, * wandG3, * wandG4;
wandG = NewMagickWand();
MagickReadImage(wandG, "lala.jpg");
wandG1 = CloneMagickWand(wandG);
wandG2 = CloneMagickWand(wandG);
wandG3 = CloneMagickWand(wandG);
MagickRollImage(wandG1, 2, 0);
MagickWriteImage(wandG1,"tile2x0.jpg");
MagickRollImage(wandG2, 4, 0);
MagickWriteImage(wandG2,"tile4x0.jpg");
MagickRollImage(wandG3, 6, 0);
MagickWriteImage(wandG3,"tile6x0.jpg");
MagickSetLastIterator(wandG);
MagickAddImage(wandG, wandG1);
MagickAddImage(wandG, wandG2);
MagickAddImage(wandG, wandG3);
MagickSetFirstIterator(wandG);
wandG4 = MagickAppendImages(wandG,MagickFalse);
MagickWriteImage(wandG4,"tile.jpg");
if(wandG)wandG = DestroyMagickWand(wandG);
if(wandG)wandG1 = DestroyMagickWand(wandG1);
if(wandG)wandG2 = DestroyMagickWand(wandG2);
if(wandG)wandG3 = DestroyMagickWand(wandG3);
MagickWandTerminus();
return 0;
}