Cute 3x3 images from snowflake IDs
Project description
(Note) Currently MacOS tests are failing under Python 3.9
Cute Snowflakes
Have you ever wanted cute 3x3 images from snowflake IDs? Great, because here they are!
Installation
Requires Python 3.6+
pip install cutesnowflakes
Usage:
As a command line application:
cutesnowflakes.py --encode 118999881999119725 red
cutesnowflakes.py --decode folder/my_file.png
As a library:
## CREATING A SNOWFLAKE
from cutesnowflakes import CuteSnowflakes
flake = CuteSnowflakes()
# Create the snowflake
image, meta = flake.encode("118999881999119725")
# Open it in the system photo viewer
image.show()
# Save the image with its metadata
image.save("my_image.png", pnginfo=meta)
## LOADING A SNOWFLAKE
from PIL.PngImagePlugin import PngImageFile
with PngImageFile("my_image.png") as fp:
print(flake.decode(fp))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cutesnowflakes-0.2.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for cutesnowflakes-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af18a01438947d132dba948c8889ac216c3149195c8e8c6da631fed8be372ee0 |
|
MD5 | b038b19396c5d3c8817ee40d43207d33 |
|
BLAKE2b-256 | 9e3ac99776307bc2a6a34c786eca33f638344ec65a6a0270fa400e54d1ccd7ff |