Split image to several rectangles.