计算器Userpic代(Identicons) [英] StackOverflow Userpic generation (Identicons)

查看:151
本文介绍了计算器Userpic代(Identicons)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的创建在C#ASP.NEt一个网站,并想用类似于计算器功能, 在StackOverflow.com新用户注册,他被分配了一个默认的用户画面,直到他拥有的gravatar每一次,现在每一个画面是从previous的不一致,所以很肯定它会产生,我想知道如何可以在C#这样做。

i an creating a website in C# ASP.NEt and want to use a feature similar to StackOverflow , Every time a new user registers on the StackOverflow.com he is assigned a default user picture until he has a gravatar, Now every picture is different from the previous one, so it is sure it is generated, i want to know how can this be done in C#.

注:(我不认为这是一个元问题,所以请不要动它存在)

Note: (I don't think it is a meta question so please don't move it there)

推荐答案

这就是所谓的 Identicions 。他们是通过某种哈希生成的图像,通常在一个用户名或电子邮件。

It's called Identicions. They are images generated by some kind of hash, usually on a username or email.

有一个很好的,开放源码库,在codePLEX产生Identicons。更多信息这里

There is a nice, open source library, on Codeplex for generating Identicons. More info here.

编辑:实际上,你可以使用的gravatar产生Identicons。构建一个URL是这样的:

You can actually use gravatar to generate Identicons. Construct a URL like this:

<一个href="http://www.gravatar.com/avatar/HASH_HERE?s=128&d=identicon&r=PG">http://www.gravatar.com/avatar/HASH_HERE?s=128&d=identicon&r=PG

这篇关于计算器Userpic代(Identicons)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆