Added functionality to split image into smaller ones