Python JPG to TIFF Conversion: A Simple Guide
You can use the Python Pillow library to convert JPG images to TIFF format. Here's an example code:
from PIL import Image
# Open the JPG image
jpg_image = Image.open('test.jpg')
# Convert to TIFF format
tiff_image = jpg_image.convert('TIFF')
# Save the TIFF image
tiff_image.save('test.tif')
In the above code, we first open the JPG image using the Image.open() method. Then, we convert it to TIFF format using the convert() method. Finally, we save the TIFF image using the save() method.
AI 优化版
原文地址:https://www.cveoy.top/t/topic/ncRJ 著作权归作者所有。请勿转载和采集!