Python Image Library problems with Tiff file using JPEG compression

"Leydon, Gary" <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <0D987CAB8161A74F8DCA52B5E95A98624800665900@XVS2-CLUSTER.yu.yale.edu>
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 some other set of steps to open a jpeg compressed tiff properly and work on it with PIL?

thanks


Gary Leydon
Systems Administrator
Dept of Neurobiology/Yale University School of Medicine
333 Cedar St.
New Haven, Ct. 06520-8001

[email protected]
ph:203-785-5736
fax:203-785-5263

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.