pyvips
pyvips copied to clipboard
Struggling to keep the tone depth of an rgb tiff image using tiffsave
I having trouble to keep the tone depth of an rgb tiff image. What am I missing? The output tiff file appears darker over the whole tone range...
i = py.Image.new_from_file(image_r, access="sequential")
cr = i[0]
crl = cr.tolist()
n = np.array(crl)
ni = py.Image.new_from_array(n, interpretation='srgb')
ni.tiffsave(image_w, compression='lzw', xres=i.xres, yres=i.yres)
Input and output in this zip file: example.zip