Montage

Tile images into a grid, automatically calculating the grid cell size from the largest image:

montage *.jpg -geometry +0 +0 result.jpg