Created
November 24, 2020 18:52
-
-
Save wallentx/9a8c983f028c198f3bf1ff9dd4d3ad5f to your computer and use it in GitHub Desktop.
Write image to Inky Impression - 5.7", 7-color eInk display for the RPi
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| import sys | |
| from PIL import Image | |
| from inky.inky_uc8159 import Inky | |
| inky = Inky() | |
| saturation = 0.5 | |
| if len(sys.argv) == 1: | |
| print(""" | |
| Usage: {file} image-file | |
| """.format(file=sys.argv[0])) | |
| sys.exit(1) | |
| image = Image.open(sys.argv[1]) | |
| if len(sys.argv) > 2: | |
| saturation = float(sys.argv[2]) | |
| inky.set_image(image, saturation=saturation) | |
| inky.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment