[Image-SIG] Image.resize problem
David Dahl
david at ddahl.com
Sun Sep 11 06:40:16 CEST 2005
Ah, yes... I am a python newbie, so it's takes a little time ot get
used to.
That worked, Thanks!
d
On 10 Sep 2005, at 23:28, Steve Holden wrote:
> David Dahl wrote:
>
>> For some reason Image.resize will not work for me. Here is my method:
>> import Image
>> def resize_image(self,infile,outfile):
>> im = Image.open(infile)
>> size = 800, 600
>> im.resize(size)
>> im.save(outfile,'JPEG' )
>> The files is written, but it is the same size as the original
>> file. The thumbnail function works fine, maybe that is all I
>> need? What is the real difference between resize() and thumbnail()?
>>
> The problem is occurring because im.resize() isn't an in-place
> update: it returns a new image!
>
> Try
>
> im = im.resize(size)
>
> and see if that improves things.
>
> regards
> Steve
> --
> Steve Holden +44 150 684 7255 +1 800 494 3119
> Holden Web LLC http://www.holdenweb.com/
>
More information about the Image-SIG
mailing list