action
All checks were successful
Deploy WebSocket Server / deploy (push) Successful in 4s

This commit is contained in:
jeremygan2021
2026-03-05 21:09:37 +08:00
parent a784c88c60
commit 1b2c55afc7
5 changed files with 73 additions and 360 deletions

View File

@@ -57,10 +57,9 @@ def image_to_tspl_commands(image_path):
# 逻辑修正:
# 我们希望 黑色像素(0) -> 打印(1)
# 白色像素(255) -> 不打印(0)
# 使用 < 128 判定,增加容错性,防止像素值偏移
should_print = False
if pixel < 128: # Black or Dark Gray
if pixel == 0: # Black
should_print = True
if should_print: