|
|
|
|
|
|
|
|
for j in range(w): |
|
|
for j in range(w): |
|
|
c = "".join(["{}{}".format(hex(x//16).split('x')[-1], hex(x%16).split('x')[-1]) for x in list(img.getpixel((j,i)))]) |
|
|
c = "".join(["{}{}".format(hex(x//16).split('x')[-1], hex(x%16).split('x')[-1]) for x in list(img.getpixel((j,i)))]) |
|
|
d = " " |
|
|
d = " " |
|
|
if c in symbols.keys(): |
|
|
|
|
|
d = symbols[c] |
|
|
|
|
|
else: |
|
|
|
|
|
|
|
|
if c not in symbols.keys(): |
|
|
symbols[c] = characters[0] |
|
|
symbols[c] = characters[0] |
|
|
characters = characters[1:] |
|
|
characters = characters[1:] |
|
|
d = symbols[c] |
|
|
|
|
|
|
|
|
d = symbols[c] |
|
|
print(d, end="") |
|
|
print(d, end="") |
|
|
print() |
|
|
print() |