[Image-SIG] PIL - Tiff problems

Andrew agagne at genome.med.harvard.edu
Mon May 4 19:44:38 CEST 2009

In reality the tif will be ~7 mb, but i was able to use pil to shrink 
the image size. The problem comes with converting to a png.

I open the tif then call

im = im.convert("L")
im = im.convert("P")

To view the tif, I would generally use irfanview.


Fredrik Lundh wrote:
> On Mon, May 4, 2009 at 4:08 PM, Andrew <agagne at genome.med.harvard.edu> wrote:
>> I've been having a problem with my tiff. When converting to a PNG or a JPEG
>> the colors get messed up (black becomes white). I belive it has todo with
>> the tiff being little endian. I noticed that in 1.1.7 the following was
>> added to the change log.
>>   Added limited support for I;16L mode (explicit little endian).
>> Would someone be able to assist me in utilizing this? I've installed 1.1.7
>> but am unsure of how to utilize this feature.
> Can you provide a sample in some way??  (you can mail it directly to
> me if you don't want everyone to have access to the file; I never
> redistribute sample files without permission).
> </F>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.png
Type: image/png
Size: 9362 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090504/121b05d1/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.tif
Type: image/tiff
Size: 18266 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090504/121b05d1/attachment-0001.tif>

More information about the Image-SIG mailing list