This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user