Skip to content

Commit

Permalink
Inky: remove unecessary canvas paste.
Browse files Browse the repository at this point in the history
The image is resized to the display width/height, what was this even for?
  • Loading branch information
Gadgetoid committed Sep 6, 2024
1 parent 87b48d0 commit 0135ce3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions inky/inky.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,7 @@ def set_image(self, image):
image.load()
image = image.im.convert("P", True, palette_image.im)

canvas = Image.new("P", (self.rows, self.cols))
width, height = image.size
canvas.paste(image, (0, 0, width, height))
self.buf = numpy.array(canvas, dtype=numpy.uint8).reshape((self.cols, self.rows))
self.buf = numpy.array(image, dtype=numpy.uint8).reshape((self.cols, self.rows))

def _spi_write(self, dc, values):
"""Write values over SPI.
Expand Down

0 comments on commit 0135ce3

Please sign in to comment.