开发者

Creating a multi-page TIFF with Python

开发者 https://www.devze.com 2023-01-05 23:21 出处:网络
This has already been asked here, but I was looking for a solution that wo开发者_Python百科uld work on Linux.. Is tiffcp the only way?Looks like ImageMagick can do it.The solution is essentially the s

This has already been asked here, but I was looking for a solution that wo开发者_Python百科uld work on Linux.. Is tiffcp the only way?


Looks like ImageMagick can do it. The solution is essentially the same; call it from the command line.

Specifically, you want the -adjoin option (which is on by default). The command will look something like:

convert *.tiff my_combined_file.tiff


Haven't tried it, but there is pylibtiff, a python wrapper for the libtiff library on which tiffcp is implemented.


I know this is an old question, but convert has the drawback that it recompresses the images. You can use the python tifftools package to do this without recompressing the images: tifftools merge *.tiff combined_file.tiff.

Disclaimer: I am the author of the tifftools package.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号