pil image grayscale code example
Example 1: python pil to greyscale
#PIL image
img2 = img.convert('L')
Example 2: pillow rgb to grayscale
Image.open(path).convert('LA')
#PIL image
img2 = img.convert('L')
Image.open(path).convert('LA')