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