PIL problem

Peter Otten __peter__ at web.de
Wed Oct 8 11:56:42 EDT 2008


bfrederi wrote:

>> > image.crop((x1,y1,x2,y2))
>>
>> This doesn't change `image` but creates and returns a new cropped image
>> which you simply ignore.
>>
>> > image.save(file_name, "JPEG")
>>
>> Ciao,
>> Marc 'BlackJack' Rintsch
> 
> How do I output it to an actual file then? Or overwrite the existing
> file?

cropped_image = image.crop(...)
cropped_image.save(...)

Peter



More information about the Python-list mailing list