added bg image

This commit is contained in:
phixxy 2024-02-03 00:37:10 -08:00
parent 0ad5f89e99
commit 0743b62eb3

View file

@ -34,7 +34,10 @@ class InkyScreen(commands.Cog):
async def write_to_display(self, text: list): async def write_to_display(self, text: list):
if text is not self.old_message: if text is not self.old_message:
image = Image.new("P", (self.display.WIDTH, self.display.HEIGHT), (self.display.BLACK)) try:
image = Image.open("data/inky/bg.png")
except:
image = Image.new("P", (self.display.WIDTH, self.display.HEIGHT), (self.display.BLACK))
draw = ImageDraw.Draw(image) draw = ImageDraw.Draw(image)
width = self.display.WIDTH width = self.display.WIDTH
height = self.display.HEIGHT height = self.display.HEIGHT