My question is to the core dev’s here.
There are several bugs reports arround related to problems loading and scaling ICO files with multiple sizes.
Myself I touched that problem while trying to load such a file with PyGObject (Debian stable). Details and an mwe can be found here: GdkPixbuf: ICO files with multiple sizes
Does all this reports rooting to the same problem?
The bug reports are quite old and it is unclear for me if the problems are still fixed in the dev/upstream version of Gtk/PyGObject. I have currently no idea how to install a upstream version of PyGObject to test arround if my problem can be reproduced their, too. It would be great if some of you could try out my mwe code (see first link).
The other question is how can I go on? I think it do not help if I also open a BugReport for PyGObject. What would you (as core devs) recommand?
Thanks for reporting issues. The ICO loader hasn’t been touched in a while, and mostly to fix security issues. ICO files are not really common on Linux; GdkPixbuf is typically used to load PNG and JPEG assets, and icons are either PNG or SVG files in the icon theme.
If a bug report hasn’t been updated, then it’s likely not fixed.
You can try cloning the project, adding the assets to the test suite, and then running it; the README file has instructions on how to do that. You can also use jhbuild to set up a development environment that won’t interfere with your installed OS.
I honestly don’t have any experience with the ICO format, so I can’t really help in fixing the issues; but I can review patches.
Favicons are common on the web, and web browsers have their own image loaders that are, by and large, more featureful than gdkpixbuf.
The ICO loader in GdkPixbuf is roughly stuck to loading the old, 16x16 favicon icons; it hasn’t been updated to load the new style icons that take into account hidpi and multiple form factors because there’s never been the need for that.
I’m not saying that GdkPixbuf can’t be fixed, of course; but nobody is working on that, so somebody who cares about loading web icons will need to submit a merge request.
But then should the GdkPixbuf fixed in that way that it raise an Error if such a “new ico” file is loaded with it. This would prevent confusion and multiple bug reports for the same thing.
Fix it myself is far out of my expertise.
So how could I handle it? Any recommandations about a alternative Python package loading ico files?
That explains why I was having trouble dealing with ICO files in Cairo. I did get a bunch of other formats to load and save, though and now that you’ve brought all this to light, I’ll stop worrying about it and stick to PNG for those icon images.