[Image-SIG] possible PIL bug?

Dmitry (Dima) Strakovsky dima at shiftingplanes.org
Fri Oct 21 04:44:45 CEST 2005


Thank for your reply Chris,

Chris Cogdon wrote:

>
> On Oct 19, 2005, at 9:02 PM, Dmitry (Dima) Strakovsky wrote:
>
>> Here is a possible PIL bug. I appologise in advance if I am doing
>> something silly python-wise.
>>
>> When using resize method and using BILINEAR, BICUBIC or NEAREST  
>> arguments
>>
>> For example: ImageName.resize((200,300),ANTIALIAS)
>>
>> interpreter tells me that the global name "ANTIALIAS" is not defined
>>
>> the globals are definately defined in image.py Shouldn't they be
>> imported as a part of
>> "import Image" routine?
>>
>> Anyways, entering numeric values:  ImageName.resize((200,300),1)
>> obviously solves the problem, but makes things a bit harder to read  
>> down
>> the line
>
>
> Try Image.ANTIALIAS
>
>
> Python won't 'flood' your namespace with variables unless you  
> explicitly ask it to.
>
That actually seems like a great language feature. Thank you for 
explaining it.

                                     d



-- 
<name>Dmitry (Dima) Strakovsky</name>
<email>dima at shiftingplanes.org</email>
<website>www.shiftingplanes.org</website>



More information about the Image-SIG mailing list