[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/digikam/libs/dmetadata
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2007-03-13 22:14:27
Message-ID: 1173824067.467697.21887.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 642304 by cgilles:
digiKam from trunk : 2 new methods to backup/restore digiKam Tags Path into \
Exif.Image.9cff tag like a byte array. The tags path are built from a QStringList \
joined by "\r\n". This way support UTF8 and is not limited. The methods are not yet \
used, but later we use this way instead to use IPTC keywords to backup/restore Tags \
path.
CCMAIL: marcel.wiesweg@gmx.de
M +18 -0 dmetadata.cpp
M +4 -1 dmetadata.h
--- trunk/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp #642303:642304
@@ -366,4 +366,22 @@
return photoInfo;
}
+QStringList DMetadata::getImageTagsPath() const
+{
+ QByteArray data = getExifTagData("Exif.Image.0x9cff");
+ QString joinTagsPath;
+ QDataStream ds(data, IO_ReadOnly);
+ ds >> joinTagsPath;
+ return (QStringList::split("\r\n", joinTagsPath));
+}
+
+bool DMetadata::setImageTagsPath(const QStringList& tagsPath)
+{
+ QString joinTagsPath = tagsPath.join("\r\n");
+ QByteArray data;
+ QDataStream ds(data, IO_WriteOnly);
+ ds << joinTagsPath;
+ return (setExifTagData("Exif.Image.0x9cff", data));
+}
+
} // NameSpace Digikam
--- trunk/extragear/graphics/digikam/libs/dmetadata/dmetadata.h #642303:642304
@@ -1,7 +1,7 @@
/* ============================================================
* Authors: Gilles Caulier <caulier dot gilles at gmail dot com>
* Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- * Date : 2006-02-23
+ * Date : 2006-02-23
* Description : image metadata interface
*
* Copyright 2006-2007 by Gilles Caulier and Marcel Wiesweg
@@ -59,6 +59,9 @@
QString getImageComment() const;
bool setImageComment(const QString& comment);
+ QStringList getImageTagsPath() const;
+ bool setImageTagsPath(const QStringList& tagsPath);
+
int getImageRating() const;
bool setImageRating(int rating);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic