1
0
Fork 0

Ignore the bottom right pixel

This commit is contained in:
Casey 2023-10-15 04:45:49 +03:00
parent 3ad3535b67
commit 2ed6749c87
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
3 changed files with 10 additions and 6 deletions

View File

@ -21,8 +21,8 @@ with open(argv[1], "wb") as fp:
for ox, bi in enumerate(l):
if img.getpixel((x * 2 + ox, y * 3 + oy)):
val |= bi
if img.getpixel((x * 2 + 1, y * 3 + 2)):
val ^= 0x9f
# if img.getpixel((x * 2 + 1, y * 3 + 2)):
# val ^= 0x9f
line.append(val)
fp.write(line)
print(f"wrote {i + 1} / {len(argv) - 2}")

Binary file not shown.

View File

@ -6,16 +6,20 @@ mon.setTextScale(1)
local w, h = string.byte(tape.read(2), 1, 2)
local b = ""
for _ = 1, w do b = b .. "0" end
local f = b
repeat
for y = 1, h do
mon.setCursorPos(1, y)
local buf = { string.byte(tape.read(w), 1, -1) }
local s, f, b = "", "", ""
local s = "" -- , f, b = "", "", ""
for x = 1, w do
s = s .. string.char(0x80 + bit32.band(0x7F, buf[x]))
local inv = bit32.band(0x80, buf[x])
f = f .. (inv and "f" or "0")
b = b .. (inv and "0" or "f")
-- local inv = bit32.band(0x80, buf[x])
-- f = f .. (inv and "f" or "0")
-- b = b .. (inv and "0" or "f")
end
mon.blit(s, f, b)
end