join multiple png images Often I find myself needing to take many PNG images and join them into a larger image.

Specifically, in this particular case, I'd like to take 2 PNGs of roughly equal width (±2px) and different heights and create a new PNG where the first is above the other. E.g.



The join should be seamless.

Is there a command line tool/app that does this? Best would be if Preview offers a solution.
ImageMagick can do this:

convert 1.png 2.png -append result.png


Alignment options can be (optionally) specified using the -gravity switch,


-gravity East align the right edges
-gravity West align the left edges
-gravity center align the centers


Note: using +append instead of -append will stitch the images together horizontally, i.e. side-by-side rather than one above the other.