extract chars from lines in target image file