本站源代码
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Mura Li d77176912b Use Go1.11 module (#5743) pirms 7 gadiem
..
.gitignore Use Go1.11 module (#5743) pirms 7 gadiem
.travis.yml Use Go1.11 module (#5743) pirms 7 gadiem
LICENSE Added all required dependencies pirms 10 gadiem
README.md Use Go1.11 module (#5743) pirms 7 gadiem
block.go Added all required dependencies pirms 10 gadiem
doc.go Added all required dependencies pirms 10 gadiem
identicon.go Added all required dependencies pirms 10 gadiem
polygon.go Added all required dependencies pirms 10 gadiem

README.md

identicon Build Status

根据用户的IP、邮箱名等任意数据为用户产生漂亮的随机头像。

screenhost.1 screenhost.4 screenhost.5 screenhost.6 screenhost.7

// 根据用户访问的IP,为其生成一张头像
img, _ := identicon.Make(128, color.NRGBA{},color.NRGBA{}, []byte("192.168.1.1"))
fi, _ := os.Create("/tmp/u1.png")
png.Encode(fi, img)
fi.Close()

// 或者
ii, _ := identicon.New(128, color.NRGBA{}, color.NRGBA{}, color.NRGBA{}, color.NRGBA{})
img := ii.Make([]byte("192.168.1.1"))
img = ii.Make([]byte("192.168.1.2"))

安装

go get github.com/issue9/identicon

文档

Go Walker GoDoc

版权

本项目采用MIT开源授权许可证,完整的授权说明可在LICENSE文件中找到。

上海开阖软件有限公司 沪ICP备12045867号-1