如何将jpeg转换为python中的tiff文件

问题描述 投票:0回答:1

有什么方法可以将.jpeg转换为.tiff文件?

如果是,那么该怎么做?

Python中有许多库可以将文件从一种格式转换为另一种格式。

但是,我没有发现任何有关此问题的信息。

提前感谢!

python image processing
1个回答
0
投票

see this

from PIL import Image
im = Image.open('yourImg.jpg')
im.save("pathToSave/hello.tiff", 'TIFF')

0
投票

您可以为此使用PIL (Python Imaging Library)

import Image
im = Image.open('test.jpg')
im.save('test.tiff')  # or 'test.tif'

此外,这是您在Google上遇到问题的第一个结果,请确保您首先在Google上广泛搜索。

© www.soinside.com 2019 - 2024. All rights reserved.