Add a function that merges multi-images and split naturally again