Allow for rotations

This commit is contained in:
Remy Moll 2023-11-03 12:13:28 +01:00
parent f33d420321
commit e20b46f9c7

View File

@ -21,8 +21,10 @@ class ImageShow:
def show_image(self, image: Image) -> None:
if image.size != (self.epd.width, self.epd.height):
if image.size != (self.epd.width, self.epd.height) and image.size != (self.epd.height, self.epd.width):
raise ImageShowError("Image does not match screen size")
elif image.size == (self.epd.height, self.epd.width):
image = image.transpose(Image.ROTATE_270)
self.__init__()
# possibly include a blank image to clear screen