diegorep / pypng

Automatically exported from code.google.com/p/pypng
0 stars 0 forks source link

no longer works with google app engine image api #59

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
pypng worked with app engine image api sometime in the past ... version 67 
works. with the latest release, I'm getting the following error from this 
chunk of code.

        thumbnail = img.execute_transforms(output_encoding=images.PNG) 
//google api
        reader = png.Reader(file=StringIO.StringIO(thumbnail))
        width, height, pixel_array, metadata = reader.read()        
        writer = png.Writer(width, height, **metadata)
        output = StringIO.StringIO()
        writer.write_array(output, pixel_array)                
--------------error------------------------------------------
 File 
"/base/data/home/apps/likablethings/1.339545106799400754/keywords.py", line 
103, in processimage
    writer.write_array(output, pixel_array)
  File "/base/data/home/apps/likablethings/1.339545106799400754/png.py", 
line 816, in write_array
    self.write_passes(outfile, self.array_scanlines(pixels))
  File "/base/data/home/apps/likablethings/1.339545106799400754/png.py", 
line 762, in write_passes
    i,row = enumrows.next()
  File "/base/data/home/apps/likablethings/1.339545106799400754/png.py", 
line 913, in array_scanlines
    yield pixels[start:stop]
TypeError: 'itertools.imap' object is unsubscriptable

What version of the product are you using? On what operating system?
201

Original issue reported on code.google.com by luying....@gmail.com on 31 Jan 2010 at 2:22