Expand description

Generates 19-circle identicons in png and in svg format from &[u8] input slice. Slice length could be arbitrary, as identicon generation starts with input hashing. Typical input is a public key.

Identicon example:

The identicon color scheme and elements arrangement follow the published javascript code for polkadot identicon generation. This crate is intended mainly for use by Signer.

Crate also supports generation of identicon-like images with pre-set colors in RGBA format, mainly for test purposes.

Feature "pix" supports generation of png images, feature "vec" - generation of svg images. Both are made available by default.

Re-exports

pub use colors::Color;

Modules

Enums

Errors in png identicon generation

Constants

Static 30x30 transparent png, for rare cases when the identicon generation fails or when the data to generate identicon is unavailable

Functions

Polkadot identicon png data in u8 vector format, from &[u8] input slice

Data for small-sized identicon png, from &[u8] input slice, larger image is generated first and then scaled down to fit the required size

Data for small-sized identicon png, with given colors, larger image is generated first and then scaled down to fit the required size

Data for small-sized identicon png, from &[u8] input slice, with default settings used for Signer app

Polkadot identicon png data in u8 vector format, with given colors

Identicon svg::Document data, from &[u8] input slice

Identicon svg::Document data, with given colors