84 | | nbpixels = image.size[0] * image.size[1] |
85 | | black = getPercentBlack(image, nbpixels) |
86 | | rgb = getPercentRGB(image, nbpixels) |
87 | | cmy = getPercentCMY(image, nbpixels) |
88 | | cmyk = getPercentCMYK(image, nbpixels) |
89 | | print "Black : ", black |
90 | | print "RGB : ", rgb |
91 | | print "CMY : ", cmy |
92 | | print "CMYK : ", cmyk |
| 92 | try : |
| 93 | while 1 : |
| 94 | nbpixels = image.size[0] * image.size[1] |
| 95 | result.append({ "BLACK" : getPercentBlack(image, nbpixels), \ |
| 96 | "RGB" : getPercentRGB(image, nbpixels), \ |
| 97 | "CMY" : getPercentCMY(image, nbpixels), \ |
| 98 | "CMYK" : getPercentCMYK(image, nbpixels), \ |
| 99 | }) |
| 100 | index += 1 |
| 101 | image.seek(index) |
| 102 | except EOFError : |
| 103 | pass |
| 104 | return result |