문제

Is there a python library to convert jpgs to multipage tiffs? The best I could find is FreeImagePy but the documentation is really bad.

Thanks.

도움이 되었습니까?

해결책 2

I figured out how to do this using the FreeImagePy libary.

import FreeImagePy as FIPY
F = FIPY.Image()
F.new(multiBitmap = "multipage.tiff")
F.appendPage("test1.jpg")
F.appendPage("test2.jpg")
F.deletePage(0)
F.close()

The output file is a multipage tiff file.

EDIT: I am having a problem with unusually large file sizes. Does anyone know how to compress the resulting multipage tiff file when the file is being generated?

다른 팁

You can also try Python Imaging Library (PIL)( This Tutorial contains good explanation ). Can use it as

import Image
im = Image.open('test.jpg')
im.save('test.tiff')  # or 'test.tif'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top