Skip to content

Commit

Permalink
Better support for canvas.SetImage
Browse files Browse the repository at this point in the history
  • Loading branch information
ty-porter committed Nov 4, 2021
1 parent 2e95bc5 commit f820dbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions RGBMatrixEmulator/emulators/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ def SetImage(self, image, offset_x=0, offset_y=0, *other):
pixel_index = 0
pixels = [pixel for pixel in image.getdata()]

self.Clear()
for y in range(0, self.height):
for x in range(0, self.width):
for y in range(0, image.height):
for x in range(0, image.width):
try:
self.SetPixel(x + offset_x, y + offset_y, *pixels[pixel_index])
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion RGBMatrixEmulator/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python

# package version
__version__ = '0.4.2'
__version__ = '0.4.3'
"""Installed version of RGBMatrixEmulator."""

0 comments on commit f820dbd

Please sign in to comment.