How to read the RGB value of a given pixel in Python?
问题 If I open an image with open("image.jpg") , how can I get the RGB values of a pixel assuming I have the coordinates of the pixel? Then, how can I do the reverse of this? Starting with a blank graphic, 'write' a pixel with a certain RGB value? I would prefer if I didn't have to download any additional libraries. 回答1: It's probably best to use the Python Image Library to do this which I'm afraid is a separate download. The easiest way to do what you want is via the load() method on the Image