We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70d983b commit 09f0ab0Copy full SHA for 09f0ab0
src/StreamDeck/ImageHelpers/PILHelper.py
@@ -47,9 +47,9 @@ def _to_native_format(image, image_format):
47
image = image.transpose(Image.FLIP_TOP_BOTTOM)
48
49
# We want a compressed image in a given codec, convert.
50
- compressed_image = io.BytesIO()
51
- image.save(compressed_image, image_format['format'], quality=100)
52
- return compressed_image.getbuffer()
+ with io.BytesIO() as compressed_image:
+ image.save(compressed_image, image_format['format'], quality=100)
+ return compressed_image.getvalue()
53
54
55
def create_image(deck, background='black'):
0 commit comments