Frage

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.

War es hilfreich?

Lösung 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?

Andere Tipps

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'
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top