ethereum-blockies-png
A tiny library for generating blocky identicons.
Last updated 2 years ago by petejkim .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ethereum-blockies-png 
SYNC missed versions from official npm registry.

Ethereum Blockies PNG

npm version Downloads

A tiny library for generating Ethereum-variant of blocky identicons, in PNG format.

Sample blockies image

Use

const blockies = require('ethereum-blockies-png')
const fs = require('fs')

// Generate a PNG binary
const buffer = blockies.createBuffer({ // All options are optional
  seed: '0x00d1f07af5501156a3dc81ed93f9eebd81d3e472', // ethereum address
  scale: 4  // width/height of each block in pixels, default: 4
})
fs.writeFileSync('out.png', b)

// or generate a Data URL:
const dataURL = blockies.createDataURL({ seed: '0x00d1f07af5501156a3dc81ed93f9eebd81d3e472' })
// => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgC..."

License

WTFPL

Current Tags

  • 0.1.3                                ...           latest (2 years ago)

2 Versions

  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |