🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

github.com/issue9/identicon

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/issue9/identicon

v1.2.1
Version published
Created

identicon

Go codecov PkgGoDev Go version License

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

screenshot.1 screenshot.4 screenshot.5 screenshot.6 screenshot.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

版权

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

FAQs

Package last updated on 24 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts