extract lines from target image file