copy arbitrary ranges of image lines