added bg image
This commit is contained in:
parent
0ad5f89e99
commit
0743b62eb3
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue