Changeset ce5244e for src/gnuboat/device/bin/gnuboat-splashscreen
- Timestamp:
- Aug 22, 2020, 5:31:37 PM (6 years ago)
- Branches:
- debian/bullseye
- Children:
- 056d644
- Parents:
- 8fd7454 (diff), 265ba2b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
src/gnuboat/device/bin/gnuboat-splashscreen (moved) (moved from src/python/bin/gnuboat-splashscreen ) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/gnuboat/device/bin/gnuboat-splashscreen
r8fd7454 rce5244e 1 1 #!/usr/bin/python 2 2 ''' 3 Copyright (C) 2016 EngSaS - Engineering Solutions and ServicesLangenbach. All rights reserved.3 Copyright (C) 2016 EngSaS - Langenbach. All rights reserved. 4 4 5 5 This program is free software: you can redistribute it and/or modify … … 24 24 from PIL import ImageOps 25 25 from EPD import EPD 26 epd Enabled = True26 epd_enabled = True 27 27 except: 28 epd Enabled = False28 epd_enabled = False 29 29 30 30 31 def display Image(epd, imageFilePath):31 def display_image(epd, imageFilePath): 32 32 image = Image.open(imageFilePath) 33 33 image = ImageOps.grayscale(image) 34 image Resized = image.resize((epd.width, epd.height))35 imageBlackWhite = image Resized.convert("1", dither=Image.FLOYDSTEINBERG)34 image_resized = image.resize((epd.width, epd.height)) 35 imageBlackWhite = image_resized.convert("1", dither=Image.FLOYDSTEINBERG) 36 36 epd.display(imageBlackWhite) 37 37 epd.update() … … 69 69 sys.exit(2) 70 70 71 if not epd Enabled:71 if not epd_enabled: 72 72 print("Could not initialize EPD or PIL python packages") 73 73 sys.exit(2) … … 75 75 epd = EPD() 76 76 epd.clear() 77 displayImage(epd, image) 77 display_image(epd, image) 78 78 79 79 80 if __name__ == "__main__":
Note:
See TracChangeset
for help on using the changeset viewer.
