mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-29 04:09:58 -07:00
u2f over nfc
https://github.com/flipperdevices/flipperzero-firmware/pull/1755 from @devsnek may need more testing
This commit is contained in:
@@ -60,7 +60,10 @@ class ImageTools:
|
||||
with Image.open(file) as im:
|
||||
with io.BytesIO() as output:
|
||||
bw = im.convert("1")
|
||||
bw = ImageOps.invert(bw)
|
||||
try:
|
||||
bw = ImageOps.invert(bw)
|
||||
except OSError:
|
||||
bw = bw.point(lambda x: 255 - x)
|
||||
bw.save(output, format="XBM")
|
||||
return output.getvalue()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user