[Image-SIG] tif with jpeg compression not displaying correctly

Leydon, Gary gary.leydon at yale.edu
Wed Nov 24 05:17:26 CET 2010


I've got PIL 1.1.7, Python 2.6.6, Libtif, libjpg, etc. Mac OS X 10.6.5. I've got some Tiff files with JPG compression , if I do

import Image
im = Image.open('myfile.tif')
im.info['compression']
'jpeg'
im.show()

 I get the proper image but the colors are not remotely correct.

 
If I first do from the command line

tiffcp -c lzw myfile.tif lwfile.tif

python
import Image
im = image.open('lwfile.tif')
im.info['compression']
'tiff_lzw'
im.show()
The image looks fine

 Is there some keyword or option or conversion, or some other set of steps to open a jpeg compressed tiff properly and work on it with PIL?

thanks




More information about the Image-SIG mailing list