Read and write a tiff format