As user snibgo said, we need you to post any pair of input images (in particular the ones you used to make your posted image) and your resulting output (posted image) from the pair of inputs. We need to use your images, so we can test with them to be sure they are not corrupt or have some other issue.
Also it would be better if your example used the exact names of the input images and output image rather than variables. Can you try without the variables using the exact images, to be sure something did not get fouled up in your code. Something like
Code: Select all
convert path2/image1 path2/image2 -gravity center -composite path2/result
or better put these images in your working directory so you do not need paths
Code: Select all
convert image1 image2 -gravity center -composite result
Also it is always a good idea to list your version of IM and platform.