create sliding window of N rows slicing by M rows down the page; write individual images to own file