Hi,
Here is an example of the code generating the file :
//------------------------------------
import numpy as np
import tifffile
# Generate 2D array of shape (2000, 3000) with int32 type
# this example generates random values from -1500 to 1500
labels_table = np.random.randint(
low=-1500,
high=1500,
size=(2000, 3000),
dtype=np.int32,
)
# Write to TIFF file
tifffile.imwrite(
"labels.tif",
labels_table,
dtype=np.int32,
photometric="minisblack",
metadata=None,
)
//------------------------------------
ep