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.
This commit is contained in:
Ace 2020-12-05 00:23:09 +01:00
parent ebe60b303b
commit 8ea8f6cfa4

View File

@ -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):