implemented loading of pages from tiff