please, try the patch herbert
-- http://www.lyx.org/help/
Index: src/support/filetools.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/filetools.C,v retrieving revision 1.113 diff -u -r1.113 filetools.C --- src/support/filetools.C 6 Apr 2002 12:42:42 -0000 1.113 +++ src/support/filetools.C 7 Apr 2002 09:32:34 -0000 @@ -997,7 +997,8 @@ // TGIF %TGIF... // TIFF II... or MM... // XBM ..._bits[]... -// XPM /* XPM */ +// XPM /* XPM */ sometimes missing (f.ex.. tgif-export) +// ...static char *... // XWD \000\000\000\151 (0x00006900) decimal 105 // // GZIP \037\213\010\010... http://www.ietf.org/rfc/rfc1952.txt @@ -1013,6 +1014,7 @@ if (filename.empty() || !IsFileReadable(filename)) return string(); + ifstream ifs(filename.c_str()); if (!ifs) // Couldn't open file... @@ -1041,10 +1043,8 @@ << endl; break; } - - ifs >> str; - lyxerr[Debug::GRAPHICS] - << "Scanstring: " << str << endl; + getline(ifs,str); + lyxerr[Debug::GRAPHICS] << "Scanstring: " << str << endl; string const stamp = str.substr(0,2); if (firstLine && str.size() >= 2) { // at first we check for a zipped file, because this @@ -1089,7 +1089,7 @@ format = "sgi"; else if ((stamp == "II") || (stamp == "MM")) format = "tiff"; - else if (str == "%TGIF") + else if (prefixIs(str,"%TGIF")) format = "tgif"; else if (prefixIs(str,"GIF")) format = "gif"; @@ -1130,7 +1130,7 @@ else if (contains(str,"_bits[]")) format = "xbm"; - else if (contains(str,"XPM")) + else if (contains(str,"XPM") || (contains(str,"static char *"))) format = "xpm"; else if (contains(str,"BITPIX"))