Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stack Overflow Userpic generation (Identicons)

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)

like image 977
Shekhar_Pro Avatar asked Dec 22 '10 13:12

Shekhar_Pro


1 Answers

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

like image 51
alexn Avatar answered Oct 11 '22 19:10

alexn