ç¨Python读åTIFFæ件ï¼å¯éç¨ä»¥ä¸ä»£ç
framedim = [2048,2048]
nb_elem = framedim[0]*framedim[1]
offset = 4096
formatdata = np.uint16
f = open(path, 'rb')
f.seek(offset)#TODO: only header size for tiff !!
d = np.fromfile(f, dtype=formatdata, count=nb_elem).reshape(framedim)
åå
¥TIFFæ件ï¼åéè¦pylibtiffåº
ä¾å¦
from libtiff import TIFF
tif = TIFF.open(path, 'w')
tif.write_image(image)
image为äºç»´ndarray
温馨提示:答案为网友推荐,仅供参考