PIL Gotcha maybe?

Robin Becker robin at jessikat.fsnet.co.uk
Wed May 2 12:31:33 EDT 2001


In article <3AF02E83.844FA376 at alcyone.com>, Erik Max Francis
<max at alcyone.com> writes
>Robin Becker wrote:
>
>> I'm trying to use PIL as a pixmap output of an image stored as a
>> string
>> and get strange artefacts.
>       ...
>> so that the buffer has certainly got into PIL ok. However, the GIF
>> made from the
>> image isn't quite right, the green square isn't a uniform colour.
>> 
>> see  http://www.reportlab.com/images/test_renderPM_002.gif
>
>It looks dithered.  I presume that by default the GIF PIL plugin uses
>the Web palette; your color isn't exactly represented in that palette,
>so it's dithering it in the output.
>
I thought so too, but dithering isn't done to BMP, TIFF etc and I've no
idea how to turn it off. 

I've looked at http://www.pythonware.com/library/pil/handbook/image.htm,
but can't see anything obvious about the Gif format.
-- 
Robin Becker



More information about the Python-list mailing list