I am having a problem editing the pixels of an image using matplotlib.
Python 3.7.5 (default, Nov 14 2019, 22:26:37)
>>> import matplotlib.pyplot as plt
>>> img = plt.imread('allo.JPG')
>>> img[0][0]
array([255, 255, 255], dtype=uint8)
>>> img[0][0][1]
255
>>> img[0][0][1]=40
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: assignment destination is read-only
I've explored the error in various ways to no avail. Ideas?