Summary: | digikam/showfoto can't show jpeg image under PowerPC | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Yannick Roehlly <yannick.roehlly> |
Component: | Plugin-DImg-JPEG | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.9.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: |
Description
Yannick Roehlly
2006-07-30 15:11:04 UTC
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 |