Get Highest Res Favicon

Posted by Jeremy on Stack Overflow See other posts from Stack Overflow or by Jeremy
Published on 2012-11-23T05:07:21Z Indexed on 2013/07/02 5:05 UTC
Read the original article Hit count: 186

Filed under:
|
|
|

I'm making a website that needs to dynamically obtain the favicon of sites upon request. I've found a few api's that can accomplish this fairly well, and so far I'm liking http://www.fvicon.com/.

The final image for my website will be 64x64px, and some websites such as Google and Wordpress have nice images of this size that are easily retrieved via this api. Though, of course, most websites only have a 16x16 favicon image and scaling that image to 64x64 has very bad quality loss.

Examples:

(high res) http://a.fvicon.com/wordpress.com?format=png&width=64&height=64

(low res) http://a.fvicon.com/yahoo.com?format=png&width=64&height=64

Keeping this in mind, I'm planning on somehow determining whether a high-res image is available and, if so, the website will use this image. If not, I want to use a pre-made 64x64 icon with the smaller icon layered over it. What I'm having trouble with is determining if there is a high res favicon available or not.

Also, I'm curious if there's a better approach to this situation. I'd rather not use smaller images (64x64 works out really well for this project). The lowest res I'm willing to drop to is 48x48 but even then there will be a significant quality loss for scaling up 16x16 favicons.

Any ideas? If you need any more information I will gladly provide it.

Thank you!

© Stack Overflow or respective owner

Related posts about api

Related posts about web-applications