我尝试裁剪 16 位(浮点)/波段 TIFF 图像,但生成的图像是 8 位(字节)/波段。有什么我应该做的吗?
from vipsCC import *
input_file_path = 'input.tiff'
output_file_path = 'output.tiff'
bands = 4
bg = VImage.VImage.black(width,height,bands)
im = VImage.VImage(input_file_path) # Giving 16bits(float)/band TIFF image...
im_frag = im.extract_area(dx,dy,width,height)
bg.insertplace(im_frag,0,0)
bg.write(output_file_path) # Results 8bits(byte)/band ...