Favatars

OK, favatars implemented, pretty much. I’ve blown them up to 40×40; not sure if this is a good idea, and I’ll remove it if I need to. But now you all get little icons next to your comment if you leave a URL, and that URL has a favicon. The “no icon” icon needs to be a lot better, but I’m in a rush right now. The whole damned site needs a redesign, I think. Nice simple little Python CGI, though. I love Python, in case you hadn’t realised.
Update: how the magic was done.

51 Responses to “Favatars”

  1. Oh, and, yes, I need to work out what’s going on with the Python Imaging Library turning transparent icon backgrounds into black. Don’t know what that’s all about.

    sil
  2. It’s weird. Wish I understood imaging stuff.

    sil
  3. Gotta have a play with this…

    Simon Willison
  4. That’s really cool :) Doesn’t like transparencies very much (it renders them black instead of white) – any way you can fix that?

    Simon Willison
  5. (reads up. feels sheepish.)

    Simon Willison
  6. Hi.

    Great idea!

    Raanan Avidor
  7. Simon: I’m working on it. Any assistance gratefully taken and used :)
    Note the update above with a link to an explanation, so you can steal the code if you prefer.

    sil
  8. Let’s try mine..

    Nice idea by the way!

    Chris Beach
  9. Damn. Now I need to get a favicon. Plus the fact that I share my site with someone else means we both have to use the same favatar….

    mrben
  10. mrben: yeah, I know. This is the problem that gravatars were meant to solve, and they do that rather neatly; I’m just not using them for reasons mentioned in posts passim. This whole favatar thing is a hack and no mistake. :)

    sil
  11. You should probably display them inline with the name, rather than above. Currently, the are perceived as grouped with the above permalink which makes them look rather out of place.

    Still nice work.

    Gary Fleming
  12. Of course that last favicon looks totally wrong because I bollocksed up my URL in an earlier comment and didn’t notice until now. At least I’ve demonstrated the power of visual stimuli.

    Gary Fleming
  13. Looks neat and cool

    Paul
  14. jsut to see it working

    Matthew
  15. Oh, my favicon has gone missing :(

    What I was going to do was a version of what Aquarion did with links in his journal to Livejournal but have favicons pulled from the linked URL in question. Been on my project list for months and now you’ve done half the work for me :)

    Paul
  16. want to see mine!

    Kevin
  17. Kevin: yours doesn’t work, apparently because the Python Imaging Library doesn’t support your favicon.ico: it says “IOError: Unsupported BMP pixel depth“. Don’t know why, sorry, but I don’t think that there’s anything that I can do about that…

    sil
  18. testing

    Mathieu 'P01' HENRI
  19. Very nice! You wrote before about the cgi script caching favicons, although the load time makes it seem like not cached. Am I seeing a lag from script execution or from remote image retrieval?

    andrew
  20. andrew: not sure. I think it’s script execution, since the caching thing works pretty quickly. Er. I think. It’s difficult to tell, because the browser caches the images as well…

    sil
  21. That’s pretty nice. I may need to borrow this idea. Not sure how easy it is to read .ico files with PHP, but we’ll see.

    Xiven
  22. It’s not that I don’t believe you, but I thought I’d better do a test and see if I’m the winner in the ‘most boring icon’ competition.

    Rob
  23. Nuts. It didn’t work.

    Rob
  24. There should be an obvious way of editing your “being rememberedness“, rather than having to “Forget Me” (which I just had to do to add a URL).

    Also, I m going to have to fudge up my URL since I’d usually give my lj there, but that doens’t have an appropriate favicon… :-)

    Senji
  25. Oh, and since most favicons are 16×16 with optional 32×32 copies then 32×32 might be a better size to blow them up to (or 64×64).

    Senji
  26. Rob: works now. Not sure what went wrong there; it obviously didn’t work for some reason and then cached the failure…

    sil
  27. Senji: good idea on the 32×32 thing, and implemented.

    sil
  28. Just wanted a go too.

    Tom
  29. This sound’s pretty cool. I’ll have a try then.

    Bryan Price
  30. Nice. I’ve got to see this in action

    Adam Rice
  31. Just testing.

    J$
  32. Neat idea

    Aquarion
  33. Aquarion: the script doesn’t currently support the inline SHORTCUT ICON link tag. Need to update it for that.

    sil
  34. testing… :-)

    Syam Kumar
  35. Rewinding a little and expanding on the idea for using autodiscovered foaf I have suggested using autodiscovery to export your chosen avatar.

    Perhaps you could check for this before going for the favicon to give everyone the choice of avatars in better formats.

    sparkes
  36. Just checking to see what favicon formats are supported.

    Lars
  37. Hm, a link relation value of “icon” doesn’t seem to be supported. How come?

    Lars
  38. Lars: laziness on my part, really. It would make parsing a bit slower if, in addition to looking for rootofserver/favicon.ico, I have to fetch the supplied URL and parse it for the rel=icon tag. I will probably do it at some point…

    sil
  39. Okay, I’ll try it. If the results are what I expect, then I’ll have to think seriously about stealing this for my own site…

    Eric
  40. Eric: looks to have worked. Steal away, although I don’t know how well the code generalises. Of course, stealing the principles and doing your own implementation is perfectly fine if the code can’t be used directly.

    sil
  41. Really neat idea! Just testing here, really.

    Eivind
  42. Cool idea.

    Nils
  43. This is a test, because my /favicon.ico is now a “303 – See Other” link, and I’m curious as to whether it works :-)

    Aquarion
  44. Aquarion: seems not. :)
    I’ll look at that :)

    sil
  45. This is only a test. I repeat: ONLY A TEST!

    ThaNerd
  46. ThaNerd: your favicon doesn’t seem to work, because the Python Imaging Library says “Unsupported BMP pixel depth“. I don’t really know what this means, I’m afraid…

    sil
  47. Great idea !

    Titus
  48. sil, my favicon uses the new icon bitdepth that was introduced with Windows XP, the 32 bits colors format (24 bits + 8 bits alpha channel)… As far as i know, it is supported on windows XP built-in, but if i don’t mistake, Firefox (which displays the icon even without bookmarking the website) supports that icon format in all operating system, even those older than Windows 2000…

    But i’m not sure, though…

    I’ll check wether image magick is able to convert from 32-bits ico to alpha png…

    ThaNerd
  49. Yan
  50. Great site, please let me know http://advanced-sql.atspace.com

    Risam Yold
  51. I will test it…

    Gringo

Leave a Reply

OpenID is a decentralised authentication system. If you use LiveJournal or Vox you already have an OpenID; just use the URL of your homepage there. See also how to get yourself an OpenID.