def render(self, array: np.ndarray, filename: str):
    with tifffile.TiffWriter(filename, bigtiff=self.bigtiff) as tif:
        tif.save(self._tiles(array), dtype='uint8', shape=(array.shape[0], array.shape[1], self.channels), tile=self.tile_size, photometric=('rgb' if self.rgb else 'minisblack'), extrasamples=('ASSOCALPHA',))
def render(self, array: np.ndarray, filename: str):
    with tifffile.TiffWriter(filename, bigtiff=self.bigtiff) as tif:
        tif.save(self._tiles(array), dtype='uint8', shape=(array.shape[0], array.shape[1], self.channels), tile=self.tile_size, photometric=('rgb' if self.rgb else 'minisblack'), extrasamples=('ASSOCALPHA',))