identigo

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 7 Imported by: 0

README

Identigo

This is a small project from two years ago I did to get acquainted with Go. This module allows generating identicons for a given string. You can also specify the picture's size and amount of pixels used.

Examples

64x64 with a 6px side ("rainbow") 128x128 with a 10px side ("test") 128x128with a 16px side ("test") 128x128 with a 18px side ("github")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identicon

type Identicon struct {
	// contains filtered or unexported fields
}

Identicon is a struct with picture and internal pixel grid details

func NewIdenticon

func NewIdenticon(side int, gridRowCount int, key string) *Identicon

NewIdenticon creates Identicon (side x side) with (gridRowCount x gridRowCount) squares based on (key) hash

func (*Identicon) Render

func (icon *Identicon) Render() []byte

Render method generates PNG picture

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL