计算器Userpic代(Identicons)计算器、Userpic、Identicons

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

我的创建在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:

http://www.gravatar.com/avatar/HASH_HERE?s=128&d=identicon&r=PG

阅读全文

相关推荐

最新文章