gdk-pixbuf-csource: could not recognize image file format for stock_attach.png

When compiling libgnomeui, I ran into a particularly persistant error. Namely “Could not recognize image file format for ./stock_attach.png”

With my system being a very slimmed down slackware 14.0, first thing I checked was the presence of libpng, which was neatly installed. With a little help from google I discovered that this error usually meant an empty /etc/gtk-2.0/gdk-pixbuf.loaders file.

It was not empty in my case, but to be sure I generated a new one with gdk-pixbuf-query-loaders (don’t forget to add -64 if you’re on a strictly 64 bit system). Needless to say it did not make a difference.

After a bit of digging I discovered the ‘gdk-pixbuf-csource’ command to be the culprit. I had it execute on different file formats, jpg, gif, all things clearly present in the gdk-pixbuf.loaders file. Same error over and over again.

Looking at the gdk-pixbuf.loaders file I noticed the recognition pattern was formatted like a mime type. Now it started dawning on me. I did not have any libraries present which handled mime data.

And yes, after installing gmime and shared-mime-info, gdk-pixbuf-csource correctly identified image file types and libgnomeui compiled without further errors.

The only way you’d run into this problem is if you were stupid enough to prune even the most basic packages from your slackware install, but if you do, I hope this helped.

December 16 2013 08:50 pm | Tech

3 Responses to “gdk-pixbuf-csource: could not recognize image file format for stock_attach.png”

  1. Adam Says:

    Thank you. I couldn’t work out why on one of my slackware boxes libgnomeui compiled but on another it didn’t. I was looking at png and gdk-pixbuf stuff but didn’t think about mime at all.

    I had already just copied the package over from the working system, but now I can compile it on both thanks to you finding out about what was missing. This shared mime info will probably come in useful for other things too 🙂

  2. Nihlaeth Says:

    I’m glad I didn’t write this post for nothing hehehe, I was already thinking I was the only one crazy enough to do a custom install 🙂

  3. Jessica Says:

    Hey, I have EDS, too. I’m in the US but my fiance lives in the NL. I’m learning Dutch ! Anyhow feel free to message me. 🙂

Leave a Reply