[Image-SIG] colorshift while converting png to gif

Henryk Gerlach hgerlach at compals.com
Sun Feb 6 18:59:21 CET 2005

Hi list,

I experience the following problem:

I have a small 10x10 Image named 'white.png', which is just a plain white 
square (generated with GIMP). 

After I ran this code
#Versions of rpm-packages
#  python-imaging-1.1.4-106
#  python-2.3-52

import Image, ImageDraw
im = Image.open('white.png')

f = open("white-converted.gif","wb")
im.save(f, "GIF")

f = open("white-converted.png","wb")
im.save(f, "png")

the  GIF image is no longer white, but light gray (#fcfcfc) while the png 
stays white (#ffffff).

What am I doing wrong? 
Is there some way to keep the GIF white?

This also happens with more complex pictures.

Any ideas?

Best regards,
  Henryk Gerlach

More information about the Image-SIG mailing list