python read grayscale pixels from image code example
Example: python image to grayscale
from PIL import Image
img = Image.open("image.jpg")
img.convert("L").save("result.jpg")
from PIL import Image
img = Image.open("image.jpg")
img.convert("L").save("result.jpg")