Comment 3 for bug 987641

Revision history for this message
Robert Nordan (rpvn) wrote :

Extremely strange, I went digging in the gdk-pixbuf source code again and only found that error in the loader for ICO files. ( http://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/io-ico.c#n354 ) I couldn't find it in the loader for TGA files.

So, for some reason we're trying to load tga files as icos on Ubuntu, but correctly loading as tga files on Windows? I notice that Pinta has it's own TGA exporter ported from Paint.Net, but relies on GDKPixBuf for importing. (GdkPixBuf only has TGA import, not export it seems.)

This is a possible theory: I think I found the GDK code that identifies the kind of file being loaded: http://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/gdk-pixbuf-io.c#n891

It has some ifdefs in the code, so if the Windows and Linux versions are compiled with different flags (One is compiled with GDK_PIXBUF_USE_GIO_MIME and the other isn't) that might account for that one detects our file as tga and the other as ico. But I'm not sure yet if GDK_PIXBUF_USE_GIO_MIME gives the right answer for us or not.

Either way, I think that this is either a bug in GDK, the flags used to compile GDK on major Linux distros, or possibly our TGA exporter if it sets some header that is only understood in a Windows context. (It s after all ported from a Windows product.)