File indexing completed on 2024-03-24 16:02:10
0001 /* 0002 A command line tool to test XMP sidecar functionality 0003 0004 SPDX-FileCopyrightText: 2010 Jakob Malm <jakob dot malm at gmail dot com> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 // Qt includes 0010 0011 #include <QString> 0012 #include <QFile> 0013 #include <QDebug> 0014 0015 // Local includes 0016 0017 #include "kexiv2.h" 0018 0019 using namespace KExiv2Iface; 0020 0021 int main (int argc, char **argv) 0022 { 0023 if(argc != 2) 0024 { 0025 qDebug() << "usexmpsidecar - read from and write to XMP sidecar"; 0026 qDebug() << "Usage: <image>"; 0027 return -1; 0028 } 0029 0030 QString filePath(QString::fromLatin1(argv[1])); 0031 0032 KExiv2 meta; 0033 meta.setUseXMPSidecar4Reading(true); 0034 meta.load(filePath); 0035 // print some metadata 0036 // add some metadata 0037 // write changed metadata 0038 // perhaps check to see if image file or XMP sidecar file was changed 0039 0040 return 0; 0041 }