After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 570780 - GdkPixbufLoader fails to auto-detect PPM
GdkPixbufLoader fails to auto-detect PPM
Status: RESOLVED NOTABUG
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-02-06 12:50 UTC by Torsten Schoenfeld
Modified: 2010-07-10 04:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program (515 bytes, text/x-csrc)
2009-02-06 12:51 UTC, Torsten Schoenfeld
Details
Failing test program (492 bytes, text/x-csrc)
2009-02-06 12:53 UTC, Torsten Schoenfeld
Details

Description Torsten Schoenfeld 2009-02-06 12:50:58 UTC
The attached program fails with gdk-pixbuf 2.14.3 and all newer versions (including current trunk).  The call to close() errors out with the message "Unrecognized image file format".  The program works fine with 2.12.11 and any older versions.  The program works fine with all versions of gdk-pixbuf when the call to gdk_pixbuf_loader_new is replaced with gdk_pixbuf_loader_new_with_type ("pnm", &error);
Comment 1 Torsten Schoenfeld 2009-02-06 12:51:47 UTC
Created attachment 128090 [details]
Test program
Comment 2 Torsten Schoenfeld 2009-02-06 12:53:26 UTC
Created attachment 128091 [details]
Failing test program

I accidentally attached the variant of the test that works with every version.
Comment 3 Magnus Bergman 2009-02-07 16:14:55 UTC
The test program works fine for me. But I have an idea about what causes the problem. GDK-pixbuf is now using GIO for sniffing the type of file instead of using the magic pattern supplied by the loader (io-pnm.c in this case). GIO in turn relies on the mime database from freedesktop. Perhaps you have an old mime database which lacks the magic patterns for ppm?
Comment 4 Torsten Schoenfeld 2009-02-10 10:26:41 UTC
I see.  The test program does indeed work fine with the system-installed gdk-pixbuf 2.14.4.  So apparently there's something wrong with my test sandboxes.  (I do have shared-mime-info installed, and <prefix>/share/mime/packages/freedesktop.org.xml does list the P6 pattern for PPM.)

Anyway, it's not a gdk-pixbuf bug.