add a set of images into a single image using a box packing algorithm