A PIL Question

Cyril Bazin cyril.bazin at gmail.com
Sun Aug 14 14:46:09 EDT 2005


Try Image.new in place of Image.Image if you want to build a new image.

At which level are you?

Cyril

On 14 Aug 2005 10:34:38 -0700, Ray <ray_usenet at yahoo.com> wrote:
> 
> Hello,
> 
> I'm using latest PIL version with Python 2.4.1. (for solving a level in
> Python Challenge actually...). Anyway, I'm trying to draw a picture. My
> question is, why is it that putdata() won't work? Even this won't run:
> 
> import Image
> 
> im = Image.open("something.jpg")
> seq = im.getdata()
> 
> image = Image.Image()
> image.putdata(seq)
> 
> image.show()
> 
> I always get:
> 
> Traceback (most recent call last):
> File "Script1.py", line 31, in ?
> image.putdata(seq)
> File "D:\Development\Python24\Lib\site-packages\PIL\Image.py", line
> 1120, in putdata
> self.im.putdata(data, scale, offset)
> AttributeError: 'NoneType' object has no attribute 'putdata'
> 
> Anybody has any idea why this is the case?
> 
> Thanks,
> Ray
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050814/7265ffe4/attachment.html>


More information about the Python-list mailing list