Created
December 30, 2020 05:27
-
-
Save yuliji/c8a0a9287adb8042b1dd7ddd91546bad to your computer and use it in GitHub Desktop.
convert image to grey scale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
img = Image.open('image.png').convert('LA') | |
img.save('greyscale.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment