Added option to rotate images instead spliting.