Stack Overflow Userpic generation (Identicons)

拈花ヽ惹草 提交于 2019-12-04 01:01:28

问题


i an creating a website in C# ASP.NEt and want to use a feature similar to Stack Overflow, 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)


回答1:


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

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

Edit: 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



来源:https://stackoverflow.com/questions/4509660/stack-overflow-userpic-generation-identicons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!