else
textpixel
This commit is contained in:
parent
2a0017371e
commit
3845147531
3 changed files with 10 additions and 0 deletions
|
@ -5,11 +5,21 @@ Encode / Decode between strings and PNG images. Can be imported or used on the c
|
|||
|
||||
One channel is used to store the character, and the other two are randomized, so the output looks different every time.
|
||||
|
||||
When used from the commandline, encoding and decoding looks like this:
|
||||
|
||||
> textpixel.py encode text filename
|
||||
> textpixel.py decode filename
|
||||
|
||||
In the commandline, the parameter `text` can be the filename of a .txt file, and its contents will become the text. This is not the case for python usage.
|
||||
|
||||
python example:
|
||||
|
||||
encoded_string = textpixel.encode_string('Wow, look!')
|
||||
textpixel.write_pixels(encoded_string, 'wowlook.png')
|
||||
|
||||
decoded_string = textpixel.decode_image('wowlook.png')
|
||||
print(decoded_string)
|
||||
|
||||
|
||||
commandline example:
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 95 B |
BIN
TextPixel/wowlook.png
Normal file
BIN
TextPixel/wowlook.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 107 B |
Loading…
Reference in a new issue