Revised for TIFF image reader