Re: Help! PNG file upload error...

2009-04-16 Thread higer
Can anyone tell me why does this problem occur? On Apr 12, 2:13 pm, higer wrote: > Thanks for your suggestion. But Python 2.5 already has zlib moudle. > To png file,I wrote lines of code to save it first on disk and then > handled the saved copy,then that works. > I do not why t

Re: Help! PNG file upload error...

2009-04-11 Thread higer
image I can not make sure whether the problem is caused by Django. Because what my code tells is that PIL can handle the png file from a disk,but can not handle a png file from a Django response(you can see my code in the first message and compare with the code above). On Apr 10, 9:46 pm, Brian N

Re: Help! PNG file upload error...

2009-04-10 Thread higer
same as views.py. Thus,I think there may be a problem in Django. On Apr 9, 2:41 pm, Kushal Das wrote: > On Thu, Apr 9, 2009 at 11:15 AM, higer wrote: > > > When I upload a PNG file and usePILto handle it,there will be an > > error occured: > > 'NoneType' object

Help! PNG file upload error...

2009-04-08 Thread higer
When I upload a PNG file and use PIL to handle it,there will be an error occured: 'NoneType' object is unsubscriptable I do not know why and other formats(BMP GIF JPG JPEG) are all ok. The following is my code in my views.py: f = request.FILES["imagefile"] fileExt = (f.name).split(".")[-1].lowe