PyLibTiff 介绍
PyLibTIff 是 Python 用来处理 TIFF 图像的开发包,示例代码:
from libtiff import TIFF
to open a tiff file for reading:
tif = TIFF.open(‘filename.tif’, mode=’r’)
to read an image in the currect TIFF directory and return it as numpy
array:
image = tif.read_image()to read all images in a TIFF file:
for image in tif.iter_images(): # do stuff with image
to open a tiff file for writing:
tif = TIFF.open(‘filename.tif’, mode=’w’)
to write a image to tiff file
tif.write_image(image)
PyLibTiff 官网
http://code.google.com/p/pylibtiff/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。