Jeff Atwood posted up a C# implementation of Identicons the other day. While I do not see them being all that useful, they are pretty neat. I whipped up a little [csl] Add-on that can display an Identicon.

The code is more or less right from Jeff; I modified image caching to use [cs] caching rather than the straight up HttpRuntime Cache. 

I currently use this as a replacement link for the comments permalink in my blog (it used to use '#'). To see an example of these in action, just make a comment on this blog post. Once your comment appears you should have your unique Identicon!

This [cs] Add-On is packaged up into the CarKnee Bundle.

Comments (9) -

Dave Burke

I want an identicon, too!!!

Thomas Freudenberg

Sean, nice work. However, I tried to add it to my site, but couldn't get it working. The value of the img's src is always "/". Inspecting your assembly with Reflector, I noticed that the result of String.Format is never used.

Sean Kearney

Thomas,
That is what happens when you make a change as your walking out the door. lol. I put up a fresh copy this morning that should take care of the bug.
Thanks,
Sean

Thomas Freudenberg

[;)] Yeah, it works much better now. Thanks Sean.

Sean Kearney

For people who do not run CS in the root, the file has been fixed.

Jeff Atwood

Very nice! I do think you should go for a larger size, though..16x16 is just so very small. 32x32 is only about 100-200 bytes more data (PNG compressed).

Sean Kearney

Thanks Jeff.
I was thinking the same thing earlier.

Comments are closed