new method for tiff stack writing