[Image-SIG] Fixes to PIL for handling XPM files.

Tom Heathcote tom.heathcote at petris.com
Mon Nov 13 17:17:18 CET 2006


Fredrik Lundh wrote:
>
>> *Fix:* Changed _save() in GifImagePlugin.py.   The code was looking in 
>> the wrong dictionary for the transparency value.
>>     
>> *Fix:* Changed _save() in PngImagePlugin.py.  The code was looking in 
>> the wrong dictionary for the transparency value.
>>     
>
> the "info" dictionary is a free-form dictionary used to return in- 
> formation from plugin loaders.  its content is not standardized,
> is dropped by most image operations, and is therefore not used by "save".
>
> instead, you have to use an explicit option when saving an image:
>
>      im.save(filename, transparency=value)
>
> (that you had to change all plugins should have told you that maybe you 
> weren't using the API in the intended way, don't you think? ;-)
>
>   
Yes... in retrospect it seems quite obvious :)   I can only imagine that 
I was not quite on top form when I was doing this work...

I will examine my code and submit a new patch with these incorrect 
changes removed. 

Sorry for the delay in replying. I tried to send this message to the 
list several times, and it was getting blocked because of some quirk in 
my company's mail server setup.  It took me a while to notice that it 
finally got through.

-- 
Tom Heathcote              Petris Technology
tom.heathcote at petris.com   154 Brent Street
Tel +44 20 8202 2433       London  NW4 2DR
Fax +44 20 8202 2287       England

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/image-sig/attachments/20061113/5c38a809/attachment.html 


More information about the Image-SIG mailing list