Allow for rotations
This commit is contained in:
parent
f33d420321
commit
e20b46f9c7
@ -21,8 +21,10 @@ class ImageShow:
|
|||||||
|
|
||||||
|
|
||||||
def show_image(self, image: Image) -> None:
|
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")
|
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__()
|
self.__init__()
|
||||||
# possibly include a blank image to clear screen
|
# possibly include a blank image to clear screen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user