The function "GdkPixbuf.from_file" doesn't work well

184 Views Asked by At

I use Lablgtk and all functions except the function "GdkPixbuf.from_file" work well. I can compile the code including the function "GdkPixbuf.from_file", but I can't execute it. When I type the command "./programname" to execute it, I get an error:

Fatal error: exception GdkPixbuf.GdkPixbufError(3, "Couldn't recognize the image file  
format for file 'filename.jpg'")

The code which doesn't include the function "GdkPixbuf.from_file" can be executed. What should I do to make the function "GdkPixbuf.from_file" work well?

1

There are 1 best solutions below

4
On BEST ANSWER

It looks like that your GdkPixbuf doesn't support jpg files. You can either convert your image file to another format, like:

convert filename.jpg filename.png

Or you can try to install supporting modules. Some more information can be found here