Pregunta

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.

¿Fue útil?

Solución 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?

Otros consejos

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'
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top