• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

libs/libkexiv2/libkexiv2

  • sources
  • kde-4.14
  • kdegraphics
  • libs
  • libkexiv2
  • libkexiv2
kexiv2.cpp
Go to the documentation of this file.
1 
28 #include "kexiv2.h"
29 #include "kexiv2_p.h"
30 
31 // Local includes
32 
33 #include "version.h"
34 
35 namespace KExiv2Iface
36 {
37 
38 KExiv2Data::KExiv2Data()
39  : d(0)
40 {
41 }
42 
43 KExiv2Data::KExiv2Data(const KExiv2Data& other)
44 {
45  d = other.d;
46 }
47 
48 KExiv2Data::~KExiv2Data()
49 {
50 }
51 
52 KExiv2Data& KExiv2Data::operator=(const KExiv2Data& other)
53 {
54  d = other.d;
55  return *this;
56 }
57 
58 // -------------------------------------------------------------------------------------------
59 
60 KExiv2::KExiv2()
61  : d(new Private)
62 {
63 }
64 
65 KExiv2::KExiv2(const KExiv2& metadata)
66  : d(new Private)
67 {
68  d->copyPrivateData(metadata.d);
69 }
70 
71 KExiv2::KExiv2(const KExiv2Data& data)
72  : d(new Private)
73 {
74  setData(data);
75 }
76 
77 KExiv2::KExiv2(const QString& filePath)
78  : d(new Private)
79 {
80  load(filePath);
81 }
82 
83 KExiv2::~KExiv2()
84 {
85  delete d;
86 }
87 
88 KExiv2& KExiv2::operator=(const KExiv2& metadata)
89 {
90  d->copyPrivateData(metadata.d);
91 
92  return *this;
93 }
94 
95 //-- Statics methods ----------------------------------------------
96 
97 bool KExiv2::initializeExiv2()
98 {
99 #ifdef _XMP_SUPPORT_
100 
101  if (!Exiv2::XmpParser::initialize())
102  return false;
103 
104  registerXmpNameSpace(QString("http://ns.adobe.com/lightroom/1.0/"), QString("lr"));
105  registerXmpNameSpace(QString("http://www.digikam.org/ns/kipi/1.0/"), QString("kipi"));
106  registerXmpNameSpace(QString("http://ns.microsoft.com/photo/1.2/"), QString("MP"));
107  registerXmpNameSpace(QString("http://ns.acdsee.com/iptc/1.0/"), QString("acdsee"));
108 
109 #endif // _XMP_SUPPORT_
110 
111  return true;
112 }
113 
114 bool KExiv2::cleanupExiv2()
115 {
116  // Fix memory leak if Exiv2 support XMP.
117 #ifdef _XMP_SUPPORT_
118 
119  unregisterXmpNameSpace(QString("http://ns.adobe.com/lightroom/1.0/"));
120  unregisterXmpNameSpace(QString("http://www.digikam.org/ns/kipi/1.0/"));
121  unregisterXmpNameSpace(QString("http://ns.microsoft.com/photo/1.2/"));
122  unregisterXmpNameSpace(QString("http://ns.acdsee.com/iptc/1.0/"));
123 
124  Exiv2::XmpParser::terminate();
125 
126 #endif // _XMP_SUPPORT_
127 
128  return true;
129 }
130 
131 bool KExiv2::supportXmp()
132 {
133 #ifdef _XMP_SUPPORT_
134  return true;
135 #else
136  return false;
137 #endif // _XMP_SUPPORT_
138 }
139 
140 bool KExiv2::supportMetadataWritting(const QString& typeMime)
141 {
142  if (typeMime == QString("image/jpeg"))
143  {
144  return true;
145  }
146  else if (typeMime == QString("image/tiff"))
147  {
148  return true;
149  }
150  else if (typeMime == QString("image/png"))
151  {
152  return true;
153  }
154  else if (typeMime == QString("image/jp2"))
155  {
156  return true;
157  }
158  else if (typeMime == QString("image/x-raw"))
159  {
160  return true;
161  }
162  else if (typeMime == QString("image/pgf"))
163  {
164  return true;
165  }
166 
167  return false;
168 }
169 
170 QString KExiv2::Exiv2Version()
171 {
172  // Since 0.14.0 release, we can extract run-time version of Exiv2.
173  // else we return make version.
174 
175  return QString(Exiv2::version());
176 }
177 
178 QString KExiv2::version()
179 {
180  return QString(kexiv2_version);
181 }
182 
183 QString KExiv2::sidecarFilePathForFile(const QString& path)
184 {
185  QString ret;
186  if (!path.isEmpty())
187  {
188  ret = path + QString(".xmp");
189  }
190  return ret;
191 }
192 
193 KUrl KExiv2::sidecarUrl(const KUrl& url)
194 {
195  QString sidecarPath = sidecarFilePathForFile(url.path());
196  KUrl sidecarUrl(url);
197  sidecarUrl.setPath(sidecarPath);
198  return sidecarUrl;
199 }
200 
201 KUrl KExiv2::sidecarUrl(const QString& path)
202 {
203  return KUrl::fromPath(sidecarFilePathForFile(path));
204 }
205 
206 QString KExiv2::sidecarPath(const QString& path)
207 {
208  return sidecarFilePathForFile(path);
209 }
210 
211 bool KExiv2::hasSidecar(const QString& path)
212 {
213  return QFileInfo(sidecarFilePathForFile(path)).exists();
214 }
215 
216 //-- General methods ----------------------------------------------
217 
218 KExiv2Data KExiv2::data() const
219 {
220  KExiv2Data data;
221  data.d = d->data;
222  return data;
223 }
224 
225 void KExiv2::setData(const KExiv2Data& data)
226 {
227  if (data.d)
228  {
229  d->data = data.d;
230  }
231  else
232  {
233  // KExiv2Data can have a null pointer,
234  // but we never want a null pointer in Private.
235  d->data->clear();
236  }
237 }
238 
239 bool KExiv2::loadFromData(const QByteArray& imgData) const
240 {
241  if (imgData.isEmpty())
242  return false;
243 
244  try
245  {
246  Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open((Exiv2::byte*)imgData.data(), imgData.size());
247 
248  d->filePath.clear();
249  image->readMetadata();
250 
251  // Size and mimetype ---------------------------------
252 
253  d->pixelSize = QSize(image->pixelWidth(), image->pixelHeight());
254  d->mimeType = image->mimeType().c_str();
255 
256  // Image comments ---------------------------------
257 
258  d->imageComments() = image->comment();
259 
260  // Exif metadata ----------------------------------
261 
262  d->exifMetadata() = image->exifData();
263 
264  // Iptc metadata ----------------------------------
265 
266  d->iptcMetadata() = image->iptcData();
267 
268 #ifdef _XMP_SUPPORT_
269 
270  // Xmp metadata -----------------------------------
271 
272  d->xmpMetadata() = image->xmpData();
273 
274 #endif // _XMP_SUPPORT_
275 
276  return true;
277  }
278  catch( Exiv2::Error& e )
279  {
280  d->printExiv2ExceptionError("Cannot load metadata using Exiv2 ", e);
281  }
282  catch(...)
283  {
284  kError() << "Default exception from Exiv2";
285  }
286 
287  return false;
288 }
289 
290 bool KExiv2::load(const QString& filePath) const
291 {
292  if (filePath.isEmpty())
293  {
294  return false;
295  }
296 
297  d->filePath = filePath;
298  bool hasLoaded = false;
299 
300  try
301  {
302  Exiv2::Image::AutoPtr image;
303 
304  image = Exiv2::ImageFactory::open((const char*)(QFile::encodeName(filePath)));
305 
306  image->readMetadata();
307 
308  // Size and mimetype ---------------------------------
309 
310  d->pixelSize = QSize(image->pixelWidth(), image->pixelHeight());
311  d->mimeType = image->mimeType().c_str();
312 
313  // Image comments ---------------------------------
314 
315  d->imageComments() = image->comment();
316 
317  // Exif metadata ----------------------------------
318 
319  d->exifMetadata() = image->exifData();
320 
321  // Iptc metadata ----------------------------------
322 
323  d->iptcMetadata() = image->iptcData();
324 
325 #ifdef _XMP_SUPPORT_
326 
327  // Xmp metadata -----------------------------------
328  d->xmpMetadata() = image->xmpData();
329 
330 #endif // _XMP_SUPPORT_
331 
332  hasLoaded = true;
333  }
334  catch( Exiv2::Error& e )
335  {
336  d->printExiv2ExceptionError("Cannot load metadata from file ", e);
337  }
338  catch(...)
339  {
340  kError() << "Default exception from Exiv2";
341  }
342 
343 #ifdef _XMP_SUPPORT_
344  try
345  {
346  if (d->useXMPSidecar4Reading)
347  {
348  QString xmpSidecarPath = sidecarFilePathForFile(filePath);
349  QFileInfo xmpSidecarFileInfo(xmpSidecarPath);
350 
351  Exiv2::Image::AutoPtr xmpsidecar;
352  if (xmpSidecarFileInfo.exists() && xmpSidecarFileInfo.isReadable())
353  {
354  // Read sidecar data
355  xmpsidecar = Exiv2::ImageFactory::open((const char*)QFile::encodeName(xmpSidecarPath));
356  xmpsidecar->readMetadata();
357 
358  // Merge
359  d->loadSidecarData(xmpsidecar);
360  hasLoaded = true;
361  }
362  }
363  }
364  catch( Exiv2::Error& e )
365  {
366  d->printExiv2ExceptionError("Cannot load XMP sidecar", e);
367  }
368  catch(...)
369  {
370  kError() << "Default exception from Exiv2";
371  }
372 
373 #endif // _XMP_SUPPORT_
374 
375  return hasLoaded;
376 }
377 
378 bool KExiv2::save(const QString& imageFilePath) const
379 {
380  // If our image is really a symlink, we should follow the symlink so that
381  // when we delete the file and rewrite it, we are honoring the symlink
382  // (rather than just deleting it and putting a file there).
383 
384  // However, this may be surprising to the user when they are writing sidecar
385  // files. They might expect them to show up where the symlink is. So, we
386  // shouldn't follow the link when figuring out what the filename for the
387  // sidecar should be.
388 
389  // Note, we are not yet handling the case where the sidecar itself is a
390  // symlink.
391  QString regularFilePath = imageFilePath; // imageFilePath might be a
392  // symlink. Below we will change
393  // regularFile to the pointed to
394  // file if so.
395  QFileInfo givenFileInfo(imageFilePath);
396  if (givenFileInfo.isSymLink())
397  {
398  kDebug() << "filePath" << imageFilePath << "is a symlink."
399  << "Using target" << givenFileInfo.canonicalPath();
400 
401  regularFilePath = givenFileInfo.canonicalPath();// Walk all the symlinks
402  }
403 
404  // NOTE: see B.K.O #137770 & #138540 : never touch the file if is read only.
405  QFileInfo finfo(regularFilePath);
406  QFileInfo dinfo(finfo.path());
407  if (!dinfo.isWritable())
408  {
409  kDebug() << "Dir '" << dinfo.filePath() << "' is read-only. Metadata not saved.";
410  return false;
411  }
412 
413  bool writeToFile = false;
414  bool writeToSidecar = false;
415  bool writeToSidecarIfFileNotPossible = false;
416  bool writtenToFile = false;
417  bool writtenToSidecar = false;
418 
419  kDebug() << "KExiv2::metadataWritingMode" << d->metadataWritingMode;
420 
421  switch(d->metadataWritingMode)
422  {
423  case WRITETOSIDECARONLY:
424  writeToSidecar = true;
425  break;
426  case WRITETOIMAGEONLY:
427  writeToFile = true;
428  break;
429  case WRITETOSIDECARANDIMAGE:
430  writeToFile = true;
431  writeToSidecar = true;
432  break;
433  case WRITETOSIDECARONLY4READONLYFILES:
434  writeToFile = true;
435  writeToSidecarIfFileNotPossible = true;
436  break;
437  }
438 
439  if (writeToFile)
440  {
441  kDebug() << "Will write Metadata to file" << finfo.fileName();
442  writtenToFile = d->saveToFile(finfo);
443  if (writeToFile)
444  {
445  kDebug() << "Metadata for file" << finfo.fileName() << "written to file.";
446  }
447  }
448 
449  if (writeToSidecar || (writeToSidecarIfFileNotPossible && !writtenToFile))
450  {
451  kDebug() << "Will write XMP sidecar for file" << givenFileInfo.fileName();
452  writtenToSidecar = d->saveToXMPSidecar(imageFilePath);
453  if (writtenToSidecar)
454  {
455  kDebug() << "Metadata for file '" << givenFileInfo.fileName() << "' written to XMP sidecar.";
456  }
457  }
458 
459  return writtenToFile || writtenToSidecar;
460 }
461 
462 bool KExiv2::applyChanges() const
463 {
464  if (d->filePath.isEmpty())
465  {
466  kDebug() << "Failed to apply changes: file path is empty!";
467  return false;
468  }
469 
470  return save(d->filePath);
471 }
472 
473 bool KExiv2::isEmpty() const
474 {
475  if (!hasComments() && !hasExif() && !hasIptc() && !hasXmp())
476  return true;
477 
478  return false;
479 }
480 
481 void KExiv2::setFilePath(const QString& path)
482 {
483  d->filePath = path;
484 }
485 
486 QString KExiv2::getFilePath() const
487 {
488  return d->filePath;
489 }
490 
491 QSize KExiv2::getPixelSize() const
492 {
493  return d->pixelSize;
494 }
495 
496 QString KExiv2::getMimeType() const
497 {
498  return d->mimeType;
499 }
500 
501 void KExiv2::setWriteRawFiles(const bool on)
502 {
503  d->writeRawFiles = on;
504 }
505 
506 bool KExiv2::writeRawFiles() const
507 {
508  return d->writeRawFiles;
509 }
510 
511 void KExiv2::setUseXMPSidecar4Reading(const bool on)
512 {
513  d->useXMPSidecar4Reading = on;
514 }
515 
516 bool KExiv2::useXMPSidecar4Reading() const
517 {
518  return d->useXMPSidecar4Reading;
519 }
520 
521 void KExiv2::setMetadataWritingMode(const int mode)
522 {
523  d->metadataWritingMode = mode;
524 }
525 
526 int KExiv2::metadataWritingMode() const
527 {
528  return d->metadataWritingMode;
529 }
530 
531 void KExiv2::setUpdateFileTimeStamp(bool on)
532 {
533  d->updateFileTimeStamp = on;
534 }
535 
536 bool KExiv2::updateFileTimeStamp() const
537 {
538  return d->updateFileTimeStamp;
539 }
540 
541 bool KExiv2::setProgramId(bool /*on*/) const
542 {
543  return true;
544 }
545 
546 } // NameSpace KExiv2Iface
KExiv2Iface::KExiv2::Private::writeRawFiles
bool writeRawFiles
Definition: kexiv2_p.h:195
KExiv2Iface::KExiv2::setFilePath
void setFilePath(const QString &path)
Set the file path of current image.
Definition: kexiv2.cpp:481
QFileInfo::isReadable
bool isReadable() const
KExiv2Iface::KExiv2::loadFromData
bool loadFromData(const QByteArray &imgData) const
Load all metadata (Exif, Iptc, Xmp, and JFIF Comments) from a byte array.
Definition: kexiv2.cpp:239
KExiv2Iface::KExiv2::registerXmpNameSpace
static bool registerXmpNameSpace(const QString &uri, const QString &prefix)
Register a namespace which Exiv2 doesn't know yet.
Definition: kexiv2xmp.cpp:1041
KExiv2Iface::KExiv2::Private::exifMetadata
const Exiv2::ExifData & exifMetadata() const
Definition: kexiv2_p.h:163
KExiv2Iface::KExiv2::updateFileTimeStamp
bool updateFileTimeStamp() const
Return true if file timestamp is updated when metadata are saved.
Definition: kexiv2.cpp:536
QFileInfo::path
QString path() const
KExiv2Iface::KExiv2::Private::iptcMetadata
const Exiv2::IptcData & iptcMetadata() const
Definition: kexiv2_p.h:164
KExiv2Iface::KExiv2::Exiv2Version
static QString Exiv2Version()
Return a string version of Exiv2 release in format "major.minor.patch".
Definition: kexiv2.cpp:170
QByteArray
KExiv2Iface::KExiv2Data::KExiv2Data
KExiv2Data()
Definition: kexiv2.cpp:38
KExiv2Iface::KExiv2::sidecarPath
static QString sidecarPath(const QString &path)
Like sidecarFilePathForFile(), but works for local file path.
Definition: kexiv2.cpp:206
KExiv2Iface::KExiv2::Private::pixelSize
QSize pixelSize
Definition: kexiv2_p.h:207
KExiv2Iface::KExiv2::hasComments
bool hasComments() const
Return 'true' if metadata container in memory as Comments.
Definition: kexiv2comments.cpp:60
QFileInfo::isSymLink
bool isSymLink() const
QByteArray::isEmpty
bool isEmpty() const
KExiv2Iface::KExiv2::setMetadataWritingMode
void setMetadataWritingMode(const int mode)
Set metadata writing mode.
Definition: kexiv2.cpp:521
KExiv2Iface::KExiv2::save
bool save(const QString &filePath) const
Save all metadata to a file.
Definition: kexiv2.cpp:378
KExiv2Iface::KExiv2::Private::filePath
QString filePath
Definition: kexiv2_p.h:206
KExiv2Iface::KExiv2::Private::imageComments
const std::string & imageComments() const
Definition: kexiv2_p.h:165
KExiv2Iface::KExiv2::hasExif
bool hasExif() const
Return 'true' if metadata container in memory as Exif.
Definition: kexiv2exif.cpp:68
KExiv2Iface::KExiv2::setData
void setData(const KExiv2Data &data)
Definition: kexiv2.cpp:225
KExiv2Iface::KExiv2::operator=
KExiv2 & operator=(const KExiv2 &metadata)
Create a copy of container.
Definition: kexiv2.cpp:88
KExiv2Iface::KExiv2::~KExiv2
virtual ~KExiv2()
Standard destructor.
Definition: kexiv2.cpp:83
KExiv2Iface::KExiv2::WRITETOSIDECARANDIMAGE
Write metadata to image and sidecar files.
Definition: kexiv2.h:78
QString::clear
void clear()
QFileInfo::filePath
QString filePath() const
KExiv2Iface::KExiv2::hasIptc
bool hasIptc() const
Return 'true' if metadata container in memory as Iptc.
Definition: kexiv2iptc.cpp:58
KExiv2Iface::KExiv2::Private::data
QSharedDataPointer< KExiv2Data::Private > data
Definition: kexiv2_p.h:210
KExiv2Iface::KExiv2::sidecarUrl
static KUrl sidecarUrl(const KUrl &url)
Like sidecarFilePathForFile(), but works for remote URLs.
Definition: kexiv2.cpp:193
KExiv2Iface::KExiv2::applyChanges
bool applyChanges() const
The same than save() method, but it apply on current image.
Definition: kexiv2.cpp:462
KExiv2Iface::KExiv2::WRITETOIMAGEONLY
Write metadata to image file only.
Definition: kexiv2.h:72
KExiv2Iface::KExiv2::getMimeType
QString getMimeType() const
Returns the mime type of this image.
Definition: kexiv2.cpp:496
KExiv2Iface::KExiv2::WRITETOSIDECARONLY4READONLYFILES
Write metadata to sidecar file only for read only images such as RAW files for example.
Definition: kexiv2.h:81
QFileInfo::canonicalPath
QString canonicalPath() const
KExiv2Iface::KExiv2::Private::metadataWritingMode
int metadataWritingMode
A mode from MetadataWritingMode enum.
Definition: kexiv2_p.h:201
KExiv2Iface::KExiv2::version
static QString version()
Return a string version of libkexiv2 release.
Definition: kexiv2.cpp:178
QFileInfo::fileName
QString fileName() const
KExiv2Iface::KExiv2
Definition: kexiv2.h:61
QString::isEmpty
bool isEmpty() const
KExiv2Iface::KExiv2::setWriteRawFiles
void setWriteRawFiles(const bool on)
Enable or disable writing metadata operations to RAW tiff based files.
Definition: kexiv2.cpp:501
KExiv2Iface::KExiv2::Private::useXMPSidecar4Reading
bool useXMPSidecar4Reading
Definition: kexiv2_p.h:198
KExiv2Iface::KExiv2Data
Definition: kexiv2data.h:42
KExiv2Iface::KExiv2Data::~KExiv2Data
~KExiv2Data()
Definition: kexiv2.cpp:48
KExiv2Iface::KExiv2::supportXmp
static bool supportXmp()
Return true if library can handle Xmp metadata.
Definition: kexiv2.cpp:131
QString
KExiv2Iface::KExiv2::unregisterXmpNameSpace
static bool unregisterXmpNameSpace(const QString &uri)
Unregister a previously registered custom namespace.
Definition: kexiv2xmp.cpp:1071
KExiv2Iface::KExiv2::metadataWritingMode
int metadataWritingMode() const
Return the metadata writing mode.
Definition: kexiv2.cpp:526
KExiv2Iface::KExiv2Data::operator=
KExiv2Data & operator=(const KExiv2Data &)
Definition: kexiv2.cpp:52
QFileInfo
KExiv2Iface::KExiv2::Private
Definition: kexiv2_p.h:140
KExiv2Iface::KExiv2::load
virtual bool load(const QString &filePath) const
Load all metadata (Exif, Iptc, Xmp, and JFIF Comments) from a picture (JPEG, RAW, TIFF...
Definition: kexiv2.cpp:290
QFileInfo::exists
bool exists() const
KExiv2Iface::KExiv2::Private::saveToXMPSidecar
bool saveToXMPSidecar(const QFileInfo &finfo) const
QSize
KExiv2Iface::KExiv2::setProgramId
virtual bool setProgramId(bool on=true) const
Re-implement this method to set automatically the Program Name and Program Version information in Exi...
Definition: kexiv2.cpp:541
KExiv2Iface::KExiv2::useXMPSidecar4Reading
bool useXMPSidecar4Reading() const
Return true if using XMP sidecar for reading metadata is enabled.
Definition: kexiv2.cpp:516
KExiv2Iface::KExiv2::initializeExiv2
static bool initializeExiv2()
Return true if Exiv2 library initialization is done properly.
Definition: kexiv2.cpp:97
KExiv2Iface::KExiv2::setUpdateFileTimeStamp
void setUpdateFileTimeStamp(bool on)
Enable or disable file timestamp updating when metadata are saved.
Definition: kexiv2.cpp:531
KExiv2Iface::KExiv2::isEmpty
bool isEmpty() const
Return 'true' if metadata container in memory as no Comments, Exif, Iptc, and Xmp.
Definition: kexiv2.cpp:473
KExiv2Iface::KExiv2::Private::printExiv2ExceptionError
static void printExiv2ExceptionError(const QString &msg, Exiv2::Error &e)
Generic method to print the Exiv2 C++ Exception error message from 'e'.
KExiv2Iface::KExiv2::getFilePath
QString getFilePath() const
Return the file path of current image.
Definition: kexiv2.cpp:486
KExiv2Iface::KExiv2::Private::updateFileTimeStamp
bool updateFileTimeStamp
Definition: kexiv2_p.h:196
kexiv2_p.h
===========================================================This file is a part of digiKam project htt...
QByteArray::data
char * data()
KExiv2Iface::KExiv2::hasXmp
bool hasXmp() const
Return 'true' if metadata container in memory as Xmp.
Definition: kexiv2xmp.cpp:65
KExiv2Iface::KExiv2::setUseXMPSidecar4Reading
void setUseXMPSidecar4Reading(const bool on)
Enable or disable using XMP sidecar for reading metadata.
Definition: kexiv2.cpp:511
KExiv2Iface::KExiv2::hasSidecar
static bool hasSidecar(const QString &path)
Performs a QFileInfo based check if the given local file has a sidecar.
Definition: kexiv2.cpp:211
KExiv2Iface::KExiv2::Private::mimeType
QString mimeType
Definition: kexiv2_p.h:208
KExiv2Iface::KExiv2::writeRawFiles
bool writeRawFiles() const
Return true if writing metadata operations on RAW tiff based files is enabled.
Definition: kexiv2.cpp:506
KExiv2Iface::KExiv2::supportMetadataWritting
static bool supportMetadataWritting(const QString &typeMime)
Return true if library can write metadata to typeMime file format.
Definition: kexiv2.cpp:140
KExiv2Iface::KExiv2::cleanupExiv2
static bool cleanupExiv2()
Return true if Exiv2 library memory allocations are cleaned properly.
Definition: kexiv2.cpp:114
QByteArray::size
int size() const
KExiv2Iface::KExiv2::Private::saveToFile
bool saveToFile(const QFileInfo &finfo) const
KExiv2Iface::KExiv2::getPixelSize
QSize getPixelSize() const
Returns the pixel size of the current image.
Definition: kexiv2.cpp:491
KExiv2Iface::KExiv2::data
KExiv2Data data() const
Definition: kexiv2.cpp:218
KExiv2Iface::KExiv2::sidecarFilePathForFile
static QString sidecarFilePathForFile(const QString &path)
Return the XMP Sidecar file path for a image file path.
Definition: kexiv2.cpp:183
KExiv2Iface::KExiv2::Private::copyPrivateData
void copyPrivateData(const Private *const other)
kexiv2.h
===========================================================This file is a part of digiKam project htt...
QFile::encodeName
QByteArray encodeName(const QString &fileName)
KExiv2Iface::KExiv2::WRITETOSIDECARONLY
Write metadata to sidecar file only.
Definition: kexiv2.h:75
KExiv2Iface::KExiv2::KExiv2
KExiv2()
Standard constructor.
Definition: kexiv2.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libkexiv2/libkexiv2

Skip menu "libs/libkexiv2/libkexiv2"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal