Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Unique Image (GUID to Image)

Tags:

jquery

c#

asp.net

I'd like to do something like SO does with profile pictures of new users. It seems to create a unique image based on a value.

How can I repeatedly create the same unique image from a GUID?

I'm open to doing this on the server, but would prefer a client side solution to create it on the fly.

Something like these:

enter image description hereenter image description hereenter image description here

Edit: How can I repeatedly create the same unique "nice looking" image from a GUID?

like image 831
Greg Avatar asked Mar 09 '12 17:03

Greg


2 Answers

What you are looking for is called an Identicon.

I think this post might either give you want you want or give you some sample code to look at in order to generate your own images.

http://www.puls200.de/?p=316

like image 106
Brian Dishaw Avatar answered Oct 15 '22 20:10

Brian Dishaw


GUID is byte array - so it is already a raw data for an image if you treat the same data as bitmap.

If your question is "how to create nice image" it is different story.

like image 24
Alexei Levenkov Avatar answered Oct 15 '22 20:10

Alexei Levenkov