Skip to content

Instantly share code, notes, and snippets.

@yuliji
Created December 30, 2020 05:27
Show Gist options
  • Save yuliji/c8a0a9287adb8042b1dd7ddd91546bad to your computer and use it in GitHub Desktop.
Save yuliji/c8a0a9287adb8042b1dd7ddd91546bad to your computer and use it in GitHub Desktop.
convert image to grey scale
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