add function for split and assamble image from rectangles