103 | | while 1 : |
104 | | nbpixels = image.size[0] * image.size[1] |
105 | | result.append(computation(image, nbpixels)) |
106 | | index += 1 |
107 | | image.seek(index) |
108 | | except EOFError : |
109 | | pass |
110 | | return (colorspace, result) |
| 104 | image = Image.open(fname) |
| 105 | except IOError, msg : |
| 106 | raise pdlparser.PDLParserError, "%s (%s)" % (msg, fname) |
| 107 | else : |
| 108 | try : |
| 109 | while 1 : |
| 110 | nbpixels = image.size[0] * image.size[1] |
| 111 | result.append(computation(image, nbpixels)) |
| 112 | index += 1 |
| 113 | image.seek(index) |
| 114 | except EOFError : |
| 115 | pass |
| 116 | return (colorspace, result) |