-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.ico file may contain multiple images but only one is displayed #264
Comments
It is necessary to create a test favicon.ico image with different frames maybe a letter on each frame, so we can differentiate them. |
Note that, e.g., https://learn.microsoft.com/en-gb/previous-versions/ms997538(v=msdn.10) calls them images within an ICO file (or within an icon resource, but where an ICO file contains a single icon resource). We probably want something more like "the last image in the image directory in an ICO file". "Frames" to me is much more reminiscent of animation (though there's a related question here—what happens if you use an APNG as an icon? or put an APNG as the last image in an ICO file?). |
Is WebKit willing to change its implementation to align with Gecko and Chromium? I guess we could spec out the Gecko and Chromium behavior either way... |
It would be to have a test suite of ICO files, with different characteristics. Anyone from Microsoft who would know such a test suite? |
It's slightly more complicated in Firefox. |
@miketaylr do you know where is the algorithm for parsing favicon container in ICO for Chromium? |
So the Firefox Algorithm goes (if I understood, please fix it if there is a mistake)
There is an optimization done later on. |
https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/icon_util.h is probably a good place to start (https://source.chromium.org/chromium/chromium/src/+/main:components/favicon/ is where the favicon component lives) |
ICO file format has the possibility to have multiple frames (different images) in one unique file.
This can create compatibility issues. There's at least one website where the first frame is transparent, and the favicon.ico image is in the last frame.
The text was updated successfully, but these errors were encountered: