mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 12:01:45 +00:00
bugfix: corrected comment content
This commit is contained in:
parent
10d61d17ee
commit
0ff0f2ecad
@ -293,7 +293,7 @@ class Matrix(SampleBase):
|
|||||||
def set_image(self, url: str):
|
def set_image(self, url: str):
|
||||||
self.image = Image.open(requests.get(url, stream=True).raw)
|
self.image = Image.open(requests.get(url, stream=True).raw)
|
||||||
|
|
||||||
# display rectangle at position with dimensions in current color
|
# display image at position with dimensions in current color
|
||||||
def display_image(self, x: int, y: int, w: int|None = None, h: int|None = None):
|
def display_image(self, x: int, y: int, w: int|None = None, h: int|None = None):
|
||||||
# resize image to specified or max size
|
# resize image to specified or max size
|
||||||
self.image.resize((w or self.matrix.width, h or self.matrix.height), Image.ANTIALIAS)
|
self.image.resize((w or self.matrix.width, h or self.matrix.height), Image.ANTIALIAS)
|
||||||
|
Loading…
Reference in New Issue
Block a user