Transcode text with PNGs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



PNGify, or pngify, is a python module that uses Pillow to transcode text as a PNG.

This repo includes the source for both the module, and an example program.

Here's what the text of this README becomes:



PNGify requires Pillow for manipulating image data, and brotli for compressing data.

$ pip install Pillow

$ pip install brotlipy

$ pip install bencoder


$ ./ -h

The Beauty of Text Files

So the beautiful thing about text files is that to get their contents, it's just a simple call to read(). Well, because PNGify just opens and calls read() on whatever file you specify, you can really encode just about anything into the PNGs data. For example, to encode an mp3 you can simply use the call ./ -i song.mp3 -o song.png, to encode the mp3, and use ./ -i song.png -o song.mp3 to get that mp3 back!

Cheers for simple text files!


usage: [-h] [-i FILE] [-s STRING] [-o FILE]

Transcode text between PNGs

optional arguments:
  -h, --help            show this help message and exit
  -i FILE, --input FILE
                        The text or image file to transcode
  -s STRING, --string STRING
                        The string to transcode into an image
  -o FILE, --output FILE
                        The file to output the result into (whether it be an
                        image, or text file)

Found a bug?

Please, please, please report it!

I threw this script together pretty quickly, so there could easily be quite a few bugs.

Wishing PNGify had feature x, that could do y?

Submit a pull request, or open an issue, and we'd gladly take a look into it!

© Samuel Steele & Ben Poile, under the MIT license