rev 3114 - in kde-extras/digikam/trunk/debian: . patches
Achim Bohnet
ach-guest at costa.debian.org
Thu Feb 9 15:29:49 UTC 2006
Author: ach-guest
Date: 2006-02-09 15:29:48 +0000 (Thu, 09 Feb 2006)
New Revision: 3114
Added:
kde-extras/digikam/trunk/debian/patches/10_kdesvn_r507545_fix_jpeg_on_ppc.diff
Modified:
kde-extras/digikam/trunk/debian/changelog
Log:
digikam: added patches/10_kdesvn_r507545_fix_jpeg_on_ppc.diff: fix endiness problem
with jpeg. Reporter will test and report if we really can (Closes: #351931)
Modified: kde-extras/digikam/trunk/debian/changelog
===================================================================
--- kde-extras/digikam/trunk/debian/changelog 2006-02-09 02:59:08 UTC (rev 3113)
+++ kde-extras/digikam/trunk/debian/changelog 2006-02-09 15:29:48 UTC (rev 3114)
@@ -6,6 +6,8 @@
* remove image/x-raw.desktop. It is now in upstream's stable branch
of kdelibs (see http://bugs.kde.org/show_bug.cgi?id=121242).
Debian's kdelibs >= 4:3.5.1-3 contains this file already.
+ * patches/10_kdesvn_r507545_fix_jpeg_on_ppc.diff: fix endiness problem
+ with jpeg. Fix: (Closes: #351931)
-- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org> Wed, 8 Feb 2006 01:46:51 +0100
Added: kde-extras/digikam/trunk/debian/patches/10_kdesvn_r507545_fix_jpeg_on_ppc.diff
===================================================================
--- kde-extras/digikam/trunk/debian/patches/10_kdesvn_r507545_fix_jpeg_on_ppc.diff 2006-02-09 02:59:08 UTC (rev 3113)
+++ kde-extras/digikam/trunk/debian/patches/10_kdesvn_r507545_fix_jpeg_on_ppc.diff 2006-02-09 15:29:48 UTC (rev 3114)
@@ -0,0 +1,58 @@
+Index: imlibinterface.cpp
+===================================================================
+--- digikam/utilities/imageeditor/imlibinterface.cpp (revision 507544)
++++ digikam/utilities/imageeditor/imlibinterface.cpp (revision 507545)
+@@ -48,6 +48,7 @@
+
+ // KDE includes.
+
++#include <kfilemetainfo.h>
+ #include <kdebug.h>
+ #include <kprocess.h>
+ #include <libkexif/kexifdata.h>
+@@ -170,6 +171,22 @@
+
+ int ImlibInterface::fileFormat(const QString& filePath)
+ {
++ if ( filePath == QString::null )
++ return NONE_IMAGE;
++
++ KFileMetaInfo metaInfo(filePath, QString::null, KFileMetaInfo::Fastest);
++
++ if (metaInfo.isValid())
++ {
++ kdDebug() << k_funcinfo << " : Mime type: " << metaInfo.mimeType() << endl;
++
++ if (metaInfo.mimeType() == "image/jpeg")
++ return JPEG_IMAGE;
++
++ if (metaInfo.mimeType() == "image/png")
++ return PNG_IMAGE;
++ }
++
+ FILE* f = fopen(QFile::encodeName(filePath), "rb");
+ if (!f)
+ {
+@@ -190,21 +207,11 @@
+ fclose(f);
+
+ DcrawParse rawFileParser;
+- unsigned short jpegID = 0xD8FF;
+ unsigned short tiffBigID = 0x4d4d;
+ unsigned short tiffLilID = 0x4949;
+- unsigned char pngID[8] = {'\211', 'P', 'N', 'G', '\r', '\n', '\032', '\n'};
+
+- if (memcmp(&header, &jpegID, 2) == 0) // JPEG file ?
++ if (rawFileParser.getCameraModel( QFile::encodeName(filePath), NULL, NULL) == 0)
+ {
+- return JPEG_IMAGE;
+- }
+- else if (memcmp(&header, &pngID, 8) == 0) // PNG file ?
+- {
+- return PNG_IMAGE;
+- }
+- else if (rawFileParser.getCameraModel( QFile::encodeName(filePath), NULL, NULL) == 0)
+- {
+ // RAW File test using dcraw.
+ // Need to test it before TIFF because any RAW file
+ // formats using TIFF header.
More information about the pkg-kde-commits
mailing list