identicon:受GitHub头像启发的开源头像生成器

时间:2021-05-10 15:43:47
【文件属性】:
文件名称:identicon:受GitHub头像启发的开源头像生成器
文件大小:38KB
文件格式:ZIP
更新时间:2021-05-10 15:43:47
golang avatar image identity-icon Go 身份图标 IdentIcon是一个受GitHub头像启发的开源头像生成器。 IdentIcon使用确定性算法,通过基于文本(通常是用户名,电子邮件或随机字符串)对哈希进行散列并遍历摘要的字节以选择是否绘制点,从而生成基于图像(使用Golang的stdlib图像编码器)的图像,选择一种颜色或选择下一步。 IdentIcon的Generator可以创建自定义图形:(NxN大小,点密度,自定义调色板)以及多种导出格式,以防开发人员想要生成自己的图像。 安装 $ go get github.com/nullrocks/identicon 用法 import ( "os" "github.com/nullrocks/identicon" ) // New Generator: Rehuse ig , err := identicon . New ( "github"
【文件预览】:
identicon-master
----hsl_test.go(2KB)
----canvas_test.go(6KB)
----generator_test.go(4KB)
----hsl.go(2KB)
----image.go(2KB)
----identicon_internal_test.go(3KB)
----image_test.go(8KB)
----canvas.go(3KB)
----examples()
--------5x5()
--------main.go(827B)
--------7x7()
--------10x10()
----config.yml(269B)
----identicon_test.go(1KB)
----LICENSE(1KB)
----README.md(5KB)
----svg.go(2KB)
----generator.go(4KB)
----.gitignore(390B)
----_config.yml(26B)
----identicon.go(10KB)
----generator_internal_test.go(2KB)

网友评论