Skip to content

๐Ÿ’‚โ€โ™‚๏ธ Hackdoor identicon generator... in Golang!

License

Notifications You must be signed in to change notification settings

Hackdoor-io/identigo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Build

Identigo generates always the same image when given the same string.
That way, we'll be able to generate a beautiful gradient to be used as a temporary avatar for Hackdoor users.

Usage

Installation via Go Modules is encouraged:

go get github.com/Hackdoor-io/identigo

You can now use Identigo as follows:

package main

import identigo "github.com/Hackdoor-io/identigo"

func main() {
  str := "gopher"
  img := identigo.GenerateFromString(str, 256, 256)

  file, _ := os.Create(str + ".png")
  png.Encode(file, img)
}

where GenerateFromString accepts the following arguments:

Argument Type Example
text string "gopher"
width int 256
height int 256

this code generates the following image:

Examples

identigo.GenerateFromString("ada_lovelace", 256, 256)

identigo.GenerateFromString("alonzo_church", 256, 256)

identigo.GenerateFromString("johndoe", 256, 256)

License

GPLv3

Releases

No releases published

Packages

No packages published

Languages