[FEATURE] Split in rows and columns

The gallery must have rows and columns with images

This patch adds this feature. The calculation of the images is currently very simple. It does not take border, colspace etc. into account