GithubHelp home page GithubHelp logo

mcpo / identicon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flavono123/identicon

0.0 2.0 0.0 29 KB

A Python library for generating Github-like identicons ๐Ÿ‘พ

License: MIT License

Python 100.00%

identicon's Introduction

Identicon

https://camo.githubusercontent.com/3c4eee845db4fa6af1d93b1c33b30074a9b0333f/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f363130342f3936313733302f61336334653261302d303464662d313165332d383234632d3733373865363535303730372e706e67

A Python library for generating GitHub-like symmetrical 5x5 identicons.

https://travis-ci.org/flavono123/identicon.svg?branch=master

Installation

pip install Identicon

Usage

Pass a string to Identicon.render(). It will return the PNG formatted byte stream:

identicon = Identicon.render('Python')
# b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\xfa\x00\x00\x00...'

You can write to file:

with open('identicon.png', 'wb') as f:
    f.write(identicon)

or get as PIL.Image:

import io
from PIL import Image

image = Image.open(io.BytesIO(identicon))

identicon's People

Contributors

flavono123 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.