Version: 0.9.0-beta1 (using KDE 3.5.4, Debian Package 4:3.5.4-1 (testing/unstable)) Compiler: Target: powerpc-linux-gnu OS: Linux (ppc) release 2.6.17 The 0.9.0-beta1 (tested with up to svn 567816) version of Digikam is unable to open jpeg images, neither from digikam nor directly with showfoto. The thumbnail is correctly generated but opening an image results in an empty window. When launching showfoto from console here is the result: showfoto: WARNING: KIPI::PluginLoader:: createInstanceFromLibrary returned 0 for ImagePlugin_Core (digikamimageplugin_core) with error number 5 QFile::open: No file name specified QFile::open: No file name specified showfoto: WARNING: [void Digikam::DImgInterface::slotImageLoaded(const QString&, const Digikam::DImg&)] Failed to load image showfoto: WARNING: [Digikam::DImg* Digikam::DImgInterface::getImg()] d->image is NULL Note that displaying gif image works, and displaying png images works also (minus bug #131549). Calling showfoto on a gif image in console results in: showfoto: WARNING: KIPI::PluginLoader:: createInstanceFromLibrary returned 0 for ImagePlugin_Core (digikamimageplugin_core) with error number 5 QFile::open: No file name specified QFile::open: No file name specified so maybe only the two last lines above are relevant. If you want, I can recompile digikam with debug turned on to have more informations.
Uncomment line 27 of libs/dimg/loaders/jpegloader.cpp and recompile. Perhaps libjpeg gives any indication of the error. The other error when the core image plugins fail to load is errno 5: I/O error. I don't know what that means.
Hi Marcel, I commented out the line, recompile, but showfoto/digikam doesn't give me more error information than above. :'(
I can also confirm this problem on powerpc.
SVN commit 569460 by mwiesweg: Make JPEG signature checking endianness-proof (please test) CCBUGS: 131550 M +4 -2 jpegloader.cpp --- trunk/extragear/graphics/digikam/libs/dimg/loaders/jpegloader.cpp #569459:569460 @@ -105,7 +105,7 @@ if (!file) return false; - unsigned short header; + unsigned char header[2]; if (fread(&header, 2, 1, file) != 1) { @@ -113,7 +113,9 @@ return false; } - if (header != 0xd8ff) + unsigned char jpegID[] = { 0xFF, 0xD8 }; + + if (memcmp(header, jpegID, 2) != 0) { // not a jpeg file fclose(file);
Great ! That solved the problem.
I have pulled this patch into the Debian powerpc pacakge and it is now available for download from http://packages.debian.org/digikam.
Closing as fixed