from PIL import Image
for i in range(1,15):
im = Image.open('star%d.png'%i)
black = []
black_pixels=0
for pixel in im.getdata():
if pixel == (0, 0, 0):
black_pixels += 1
black.append(black_pixels)
print(black_pixels)
print(black)
I want to check black pixel's number for 14 images, but Google colab print like this:
IOPub data rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_data_rate_limit`.
'''
'''
Current values:
NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec)
NotebookApp.rate_limit_window=3.0 (secs)
regardless of the number of images, Google colab always prints like that when it counts last image's pixel
How can I solve this problem? (I'm sorry about my low level of English)