impl reading .hdr file