eeeeeric / png-encode

Encode arbitrary data as a PNG image with Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

png-encode

Encode arbitrary data as a PNG image. Works with both python2 and python3.

>>> from pngencode import *
>>> encoded = PNGEncode(b'Hello, world!')
>>> decoded = PNGDecode(encoded)
>>> print(decoded)
b'Hello, world!'

Both the encoder and decoder functions input and output bytes.

In the case the decoder fails, it returns None.

About

Encode arbitrary data as a PNG image with Python.

License:MIT License


Languages

Language:Python 100.0%