Management of unicode. It would be perfect to manage ASCII and unicode in the same time (so 8 bits to 32 bits caracters).

This commit is contained in:
Cédric Bonhomme 2017-03-13 09:34:43 +01:00
parent e803386361
commit 6ad140bdfb
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
4 changed files with 12 additions and 11 deletions

View file

@ -104,9 +104,9 @@ def reveal(input_image_file, generator):
generated_number = next(generator)
# color = [r, g, b]
for color in img_list[generated_number]:
buff += (color&1)<<(7-count)
buff += (color&1)<<(31-count)
count += 1
if count == 8:
if count == 32:
bitab.append(chr(buff))
buff, count = 0, 0
if bitab[-1] == ":" and limit == None: