PIL: resize vs. thumbnail return values

Dinu C. Gherman gherman at darwin.in-berlin.de
Wed May 17 17:06:09 EDT 2000


I wonder what the reasoning is behind making a difference 
in the return value of Image.resize() and Image.thumbnail()? 
resize() returns self while thumbnail returns None. 

Being as it is, in the following example the second line 
cannot be written deriving it by analogy from the first:

  Image.open(fileName1).resize((a, a)).save(fileName2)
  Image.open(fileName1).thumbnail((a, a)).save(fileName2)

Is there any mysterious reason behind this incongruence?
Or did I misunderstand something important?

Just curious,

Dinu

-- 
Dinu C. Gherman
................................................................
"The only possible values [for quality] are 'excellent' and 'in-
sanely excellent', depending on whether lives are at stake or 
not. Otherwise you don't enjoy your work, you don't work well, 
and the project goes down the drain." 
                    (Kent Beck, "Extreme Programming Explained")



More information about the Python-list mailing list