Answers for "how to convert to grayscale in python"

2

python image to grayscale

from PIL import Image
img = Image.open("image.jpg")
img.convert("L").save("result.jpg")
Posted by: Guest on March-18-2021
0

rgb to grayscale python

from PIL import Image
img = Image.open('image.png').convert('LA')
img.save('greyscale.png')
Posted by: Guest on March-20-2021

Code answers related to "how to convert to grayscale in python"

Python Answers by Framework

Browse Popular Code Answers by Language