pyvips icon indicating copy to clipboard operation
pyvips copied to clipboard

Struggling to keep the tone depth of an rgb tiff image using tiffsave

Open MAJAQA opened this issue 1 year ago • 9 comments

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

MAJAQA avatar Sep 07 '23 11:09 MAJAQA