This is as days pass by, by Stuart Langridge

And this is Favatars, written , and concerning Web

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.

Comments

sil

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

It’s weird. Wish I understood imaging stuff.

Simon Willison

Gotta have a play with this…

Simon Willison

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

(reads up. feels sheepish.)

Raanan Avidor

Hi.

Great idea!

sil

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.

Chris Beach

Let’s try mine..

Nice idea by the way!

mrben

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….

sil

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. :)

Gary Fleming

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

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.

Paul

Looks neat and cool

Matthew

jsut to see it working

Paul

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

Kevin

want to see mine!

sil

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…

Mathieu 'P01' HENRI

testing

andrew

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?

sil

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…

Xiven

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.

Rob

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

Nuts. It didn’t work.

Senji

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

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).

sil

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

sil

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

Tom

Just wanted a go too.

Bryan Price

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

Adam Rice

Nice. I’ve got to see this in action

J$

Just testing.

Aquarion

Neat idea

sil

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

Syam Kumar

testing… :-)

sparkes

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.

Lars

Just checking to see what favicon formats are supported.

Lars

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

sil

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…

Eric

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…

sil

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.

Eivind

Really neat idea! Just testing here, really.

Nils

Cool idea.

Aquarion

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

sil

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

ThaNerd

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

sil

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…

Titus

Great idea !

ThaNerd

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…

Gringo

I will test it…

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.