From 8ea8f6cfa46f613e3f617866c8aa22d8a99b2aef Mon Sep 17 00:00:00 2001 From: Ace Date: Sat, 5 Dec 2020 00:23:09 +0100 Subject: [PATCH] Improved image handling The given image is now rotated by 90 deg when attempting to send it to the epaper. This function was initally in main, but has been shifted. --- inkycal/display/drivers/9_in_7.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inkycal/display/drivers/9_in_7.py b/inkycal/display/drivers/9_in_7.py index 545f7af..7a09650 100644 --- a/inkycal/display/drivers/9_in_7.py +++ b/inkycal/display/drivers/9_in_7.py @@ -39,9 +39,10 @@ class EPD: def getbuffer(self, image): """ad-hoc""" + image = image.rotate(90, expand=True) image.convert('RGB').save(images+'canvas.bmp', 'BMP') command = 'sudo {}IT8951/IT8951 0 0 {}'.format(driver_dir, images+'canvas.bmp') - print(command) + #print(command) return command def setup(self):