digiKam
|
Classes | |
class | Private |
Public Types | |
typedef QMap< QString, QString > | AltLangMap |
enum | Backend { Exiv2Backend = 0 , LibRawBackend , LibHeifBackend , ImageMagickBackend , FFMpegBackend , NoBackend } |
enum | ImageColorWorkSpace { WORKSPACE_UNSPECIFIED = 0 , WORKSPACE_SRGB = 1 , WORKSPACE_ADOBERGB = 2 , WORKSPACE_UNCALIBRATED = 65535 } |
enum | ImageOrientation { ORIENTATION_UNSPECIFIED = 0 , ORIENTATION_NORMAL = 1 , ORIENTATION_HFLIP = 2 , ORIENTATION_ROT_180 = 3 , ORIENTATION_VFLIP = 4 , ORIENTATION_ROT_90_HFLIP = 5 , ORIENTATION_ROT_90 = 6 , ORIENTATION_ROT_90_VFLIP = 7 , ORIENTATION_ROT_270 = 8 } |
typedef QMap< QString, QString > | MetaDataMap |
enum | MetadataWritingMode { WRITE_TO_FILE_ONLY = 0 , WRITE_TO_SIDECAR_ONLY = 1 , WRITE_TO_SIDECAR_AND_FILE = 2 , WRITE_TO_SIDECAR_ONLY_FOR_READ_ONLY_FILES = 3 } |
typedef QMap< QString, QStringList > | TagsMap |
enum | XmpTagType { NormalTag = 0 , ArrayBagTag = 1 , StructureTag = 2 , ArrayLangTag = 3 , ArraySeqTag = 4 } |
Public Member Functions | |
MetaEngine () | |
MetaEngine (const MetaEngineData &data) | |
MetaEngine (const QString &filePath) | |
virtual | ~MetaEngine () |
General methods | |
MetaEngineData | data () const |
void | setData (const MetaEngineData &data) |
bool | loadFromData (const QByteArray &imgData) |
bool | isEmpty () const |
QSize | getPixelSize () const |
QString | getMimeType () const |
void | setWriteRawFiles (const bool on) |
bool | writeRawFiles () const |
void | setWriteDngFiles (const bool on) |
bool | writeDngFiles () const |
void | setUseXMPSidecar4Reading (const bool on) |
bool | useXMPSidecar4Reading () const |
void | setUseCompatibleFileName (const bool on) |
bool | useCompatibleFileName () const |
void | setMetadataWritingMode (const int mode) |
int | metadataWritingMode () const |
void | setUpdateFileTimeStamp (bool on) |
bool | updateFileTimeStamp () const |
Metadata item information manipulation methods | |
bool | setItemProgramId (const QString &program, const QString &version) const |
QSize | getItemDimensions () const |
bool | setItemDimensions (const QSize &size) const |
MetaEngine::ImageOrientation | getItemOrientation () const |
bool | setItemOrientation (ImageOrientation orientation) const |
MetaEngine::ImageColorWorkSpace | getItemColorWorkSpace () const |
bool | setItemColorWorkSpace (ImageColorWorkSpace workspace) const |
QDateTime | getItemDateTime () const |
bool | setImageDateTime (const QDateTime &dateTime, bool setDateTimeDigitized=false) const |
QDateTime | getDigitizationDateTime (bool fallbackToCreationTime=false) const |
bool | getItemPreview (QImage &preview) const |
bool | setItemPreview (const QImage &preview) const |
Static Public Member Functions | |
Static methods | |
static bool | initializeExiv2 () |
static bool | supportXmp () |
static bool | supportBmff () |
static bool | supportMetadataWriting (const QString &typeMime) |
static QString | Exiv2Version () |
GPS manipulation methods | |
class | MetaEnginePreviews |
bool | initializeGPSInfo () |
bool | getGPSInfo (double &altitude, double &latitude, double &longitude) const |
QString | getGPSLatitudeString () const |
QString | getGPSLongitudeString () const |
bool | getGPSLatitudeNumber (double *const latitude) const |
bool | getGPSLongitudeNumber (double *const longitude) const |
bool | getGPSAltitude (double *const altitude) const |
bool | setGPSInfo (const double altitude, const double latitude, const double longitude) |
bool | setGPSInfo (const double *const altitude, const double latitude, const double longitude) |
bool | setGPSInfo (const double altitude, const QString &latitude, const QString &longitude) |
bool | removeGPSInfo () |
static void | convertToRational (const double number, long int *const numerator, long int *const denominator, const int rounding) |
static void | convertToRationalSmallDenominator (const double number, long int *const numerator, long int *const denominator) |
static double | convertDegreeAngleToDouble (double degrees, double minutes, double seconds) |
static QString | convertToGPSCoordinateString (const long int numeratorDegrees, const long int denominatorDegrees, const long int numeratorMinutes, const long int denominatorMinutes, const long int numeratorSeconds, const long int denominatorSeconds, const char directionReference) |
static QString | convertToGPSCoordinateString (const bool isLatitude, double coordinate) |
static bool | convertFromGPSCoordinateString (const QString &coordinate, long int *const numeratorDegrees, long int *const denominatorDegrees, long int *const numeratorMinutes, long int *const denominatorMinutes, long int *const numeratorSeconds, long int *const denominatorSeconds, char *const directionReference) |
static bool | convertFromGPSCoordinateString (const QString &gpsString, double *const coordinate) |
static bool | convertToUserPresentableNumbers (const QString &coordinate, int *const degrees, int *const minutes, double *const seconds, char *const directionReference) |
static void | convertToUserPresentableNumbers (const bool isLatitude, double coordinate, int *const degrees, int *const minutes, double *const seconds, char *const directionReference) |
bool | setProgramId () const |
File I/O methods | |
void | setFilePath (const QString &path) |
QString | getFilePath () const |
bool | load (const QString &filePath, Backend *backend=nullptr) |
bool | loadFromSidecarAndMerge (const QString &filePath) |
bool | save (const QString &filePath, bool setVersion=false) const |
bool | applyChanges (bool setVersion=false) const |
bool | exportChanges (const QString &exvTmpFile, QStringList &removedTags) const |
static QString | sidecarFilePathForFile (const QString &path, bool useLR=false) |
static QString | sidecarPath (const QString &path) |
static QUrl | sidecarUrl (const QUrl &url) |
static QUrl | sidecarUrl (const QString &path) |
static bool | hasSidecar (const QString &path) |
static QString | backendName (Backend t) |
Comments manipulation methods | |
bool | hasComments () const |
bool | clearComments () const |
QByteArray | getComments () const |
QString | getCommentsDecoded () const |
bool | setComments (const QByteArray &data) const |
static bool | canWriteComment (const QString &filePath) |
static QString | detectLanguageAlt (const QString &value, QString &lang) |
Exif manipulation methods | |
TagsMap | getStdExifTagsList () const |
TagsMap | getMakernoteTagsList () const |
bool | hasExif () const |
bool | clearExif () const |
QByteArray | getExifEncoded (bool addExifHeader=false) const |
bool | setExif (const QByteArray &data) const |
QImage | getExifThumbnail (bool fixOrientation) const |
bool | rotateExifQImage (QImage &image, ImageOrientation orientation) const |
bool | setExifThumbnail (const QImage &thumb) const |
bool | removeExifThumbnail () const |
bool | setTiffThumbnail (const QImage &thumb) const |
QString | getExifComment (bool readDescription=true) const |
bool | setExifComment (const QString &comment, bool writeDescription=true) const |
QString | getExifTagString (const char *exifTagName, bool escapeCR=true) const |
bool | setExifTagString (const char *exifTagName, const QString &value) const |
bool | getExifTagLong (const char *exifTagName, long &val) const |
bool | getExifTagLong (const char *exifTagName, long &val, int component) const |
bool | setExifTagLong (const char *exifTagName, long val) const |
bool | getExifTagRational (const char *exifTagName, long int &num, long int &den, int component=0) const |
bool | setExifTagRational (const char *exifTagName, long int num, long int den) const |
QByteArray | getExifTagData (const char *exifTagName) const |
bool | setExifTagData (const char *exifTagName, const QByteArray &data) const |
QVariant | getExifTagVariant (const char *exifTagName, bool rationalAsListOfInts=true, bool escapeCR=true, int component=0) const |
bool | setExifTagVariant (const char *exifTagName, const QVariant &data, bool rationalWantSmallDenominator=true) const |
bool | removeExifTag (const char *exifTagName) const |
QString | getExifTagTitle (const char *exifTagName) |
QString | getExifTagDescription (const char *exifTagName) |
QString | createExifUserStringFromValue (const char *exifTagName, const QVariant &val, bool escapeCR=true) |
MetaEngine::MetaDataMap | getExifTagsDataList (const QStringList &exifKeysFilter=QStringList(), bool invertSelection=false, bool extractBinary=true) const |
static bool | canWriteExif (const QString &filePath) |
IPTC manipulation methods | |
MetaEngine::TagsMap | getIptcTagsList () const |
bool | hasIptc () const |
bool | clearIptc () const |
QByteArray | getIptc (bool addIrbHeader=false) const |
bool | setIptc (const QByteArray &data) const |
QString | getIptcTagString (const char *iptcTagName, bool escapeCR=true) const |
bool | setIptcTagString (const char *iptcTagName, const QString &value) const |
QStringList | getIptcTagsStringList (const char *iptcTagName, bool escapeCR=true) const |
bool | setIptcTagsStringList (const char *iptcTagName, int maxSize, const QStringList &oldValues, const QStringList &newValues) const |
QByteArray | getIptcTagData (const char *iptcTagName) const |
bool | setIptcTagData (const char *iptcTagName, const QByteArray &data) const |
bool | removeIptcTag (const char *iptcTagName) const |
QString | getIptcTagTitle (const char *iptcTagName) |
QString | getIptcTagDescription (const char *iptcTagName) |
MetaEngine::MetaDataMap | getIptcTagsDataList (const QStringList &iptcKeysFilter=QStringList(), bool invertSelection=false) const |
QStringList | getIptcKeywords () const |
bool | setIptcKeywords (const QStringList &oldKeywords, const QStringList &newKeywords) const |
QStringList | getIptcSubjects () const |
bool | setIptcSubjects (const QStringList &oldSubjects, const QStringList &newSubjects) const |
QStringList | getIptcSubCategories () const |
bool | setIptcSubCategories (const QStringList &oldSubCategories, const QStringList &newSubCategories) const |
static bool | canWriteIptc (const QString &filePath) |
XMP manipulation methods | |
MetaEngine::TagsMap | getXmpTagsList () const |
bool | hasXmp () const |
bool | clearXmp () const |
QByteArray | getXmp () const |
bool | setXmp (const QByteArray &data) const |
QString | getXmpTagString (const char *xmpTagName, bool escapeCR=true) const |
bool | setXmpTagString (const char *xmpTagName, const QString &value) const |
bool | setXmpTagString (const char *xmpTagName, const QString &value, XmpTagType type) const |
QString | getXmpTagTitle (const char *xmpTagName) |
QString | getXmpTagDescription (const char *xmpTagName) |
MetaEngine::MetaDataMap | getXmpTagsDataList (const QStringList &xmpKeysFilter=QStringList(), bool invertSelection=false) const |
MetaEngine::AltLangMap | getXmpTagStringListLangAlt (const char *xmpTagName, bool escapeCR=true) const |
bool | setXmpTagStringListLangAlt (const char *xmpTagName, const MetaEngine::AltLangMap &values) const |
QString | getXmpTagStringLangAlt (const char *xmpTagName, const QString &langAlt, bool escapeCR) const |
bool | setXmpTagStringLangAlt (const char *xmpTagName, const QString &value, const QString &langAlt) const |
QStringList | getXmpTagStringSeq (const char *xmpTagName, bool escapeCR=true) const |
bool | setXmpTagStringSeq (const char *xmpTagName, const QStringList &seq) const |
QStringList | getXmpTagStringBag (const char *xmpTagName, bool escapeCR) const |
bool | setXmpTagStringBag (const char *xmpTagName, const QStringList &bag) const |
bool | addToXmpTagStringBag (const char *xmpTagName, const QStringList &entriesToAdd) const |
bool | removeFromXmpTagStringBag (const char *xmpTagName, const QStringList &entriesToRemove) const |
QVariant | getXmpTagVariant (const char *xmpTagName, bool rationalAsListOfInts=true, bool stringEscapeCR=true) const |
QStringList | getXmpKeywords () const |
bool | setXmpKeywords (const QStringList &newKeywords) const |
bool | removeXmpKeywords (const QStringList &keywordsToRemove) |
QStringList | getXmpSubjects () const |
bool | setXmpSubjects (const QStringList &newSubjects) const |
bool | removeXmpSubjects (const QStringList &subjectsToRemove) |
QStringList | getXmpSubCategories () const |
bool | setXmpSubCategories (const QStringList &newSubCategories) const |
bool | removeXmpSubCategories (const QStringList &categoriesToRemove) |
bool | removeXmpTag (const char *xmpTagName, bool family=false) const |
static bool | canWriteXmp (const QString &filePath) |
static bool | registerXmpNameSpace (const QString &uri, const QString &prefix) |
static bool | unregisterXmpNameSpace (const QString &uri) |
typedef QMap<QString, QString> Digikam::MetaEngine::AltLangMap |
A map used to store a list of Alternative Language values. The map key is the language code following RFC3066 notation (like "fr-FR" for French), and the map value the text.
typedef QMap<QString, QString> Digikam::MetaEngine::MetaDataMap |
A map used to store Tags Key and Tags Value.
typedef QMap<QString, QStringList> Digikam::MetaEngine::TagsMap |
A map used to store Tags Key and a list of Tags properties :
Metadata Backend used to populate information.
Enumerator | |
---|---|
Exiv2Backend | Default backend used by MetaEngine. |
LibRawBackend | DMetadata only. |
LibHeifBackend | DMetadata only. |
ImageMagickBackend | DMetadata only. |
FFMpegBackend | DMetadata only. |
NoBackend | No backend used (aka file cannot be read) |
The item metadata writing mode, between item file metadata and XMP sidecar file, depending on the context.
Digikam::MetaEngine::MetaEngine | ( | ) |
Standard constructor.
|
explicit |
|
explicit |
Constructor to Load Metadata from item file.
References load().
|
virtual |
Standard destructor
bool Digikam::MetaEngine::addToXmpTagStringBag | ( | const char * | xmpTagName, |
const QStringList & | entriesToAdd | ||
) | const |
Set an Xmp tag content using a list of strings defined by the 'entriesToAdd' parameter. The existing entries are preserved. The method will compare all new with all already existing entries to prevent duplicates in the item. Return true if the entries have been added to metadata.
References getXmpTagStringBag(), and setXmpTagStringBag().
Referenced by setXmpKeywords(), setXmpSubCategories(), and setXmpSubjects().
bool Digikam::MetaEngine::applyChanges | ( | bool | setVersion = false | ) | const |
The same than save() method, but it apply on current item. Return true if metadata have been saved into file.
References Digikam::MetaEngine::Private::filePath, and save().
Referenced by Digikam::DMetadata::applyChanges().
|
static |
Return a string of backend name used to parse metadata from file. See Backend enum for details.
References FFMpegBackend, ImageMagickBackend, LibHeifBackend, LibRawBackend, and NoBackend.
Referenced by Digikam::DMetadata::load().
|
static |
Return 'true' if Comments can be written in file.
References AutoPtr, and Digikam::s_metaEngineMutex.
|
static |
Return 'true' if Exif can be written in file.
References AutoPtr, and Digikam::s_metaEngineMutex.
|
static |
Return 'true' if Iptc can be written in file.
References AutoPtr, and Digikam::s_metaEngineMutex.
|
static |
Return 'true' if Xmp can be written in file.
References AutoPtr, and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::clearComments | ( | ) | const |
Clear the Comments metadata container in memory.
References setComments().
bool Digikam::MetaEngine::clearExif | ( | ) | const |
Clear the Exif metadata container in memory.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::clearIptc | ( | ) | const |
Clear the Iptc metadata container in memory.
References Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::clearXmp | ( | ) | const |
Clear the Xmp metadata container in memory.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
|
static |
Converts degrees values as a double representation. This code take a care about hemisphere position.
Referenced by Digikam::DRawDecoder::Private::fillIndentifyInfo().
|
static |
Converts a GPSCoordinate string as defined by XMP to three rationals and the direction reference. Returns true if the conversion was successful. If minutes is given in the fractional form, a denominator of 1000000 for the minutes will be used.
Referenced by getGPSLatitudeNumber(), getGPSLongitudeNumber(), setGPSInfo(), Digikam::ItemPosition::setLatitude(), and Digikam::ItemPosition::setLongitude().
|
static |
Convert a GPSCoordinate string as defined by XMP to a double floating point number in degrees where the sign determines the direction ref (North + / South - ; East + / West -). Returns true if the conversion was successful.
|
static |
Converts a GPS position stored as double floating point number in degrees to the form described as GPSCoordinate in the XMP specification.
|
static |
Converts a GPS position stored as rationals in Exif to the form described as GPSCoordinate in the XMP specification, either in the from "256,45,34N" or "256,45.566667N"
Precision: A second at sea level measures 30m for our purposes, a minute 1800m. (for more details, see https://en.wikipedia.org/wiki/Geographic_coordinate_system) This means with a decimal precision of 8 for minutes we get +/-0,018mm. (if I calculated correctly)
Referenced by getGPSLatitudeString(), getGPSLongitudeString(), setGPSInfo(), Digikam::ItemPosition::setLatitude(), and Digikam::ItemPosition::setLongitude().
|
static |
This method converts 'number' to a rational value, returned in the 'numerator' and 'denominator' parameters. Set the precision using 'rounding' parameter. Use this method if you want to retrieve a most exact rational for a number without further properties, without any requirements to the denominator.
Referenced by DigikamGenericMetadataEditPlugin::EXIFAdjust::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLens::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLight::applyMetadata(), convertToRationalSmallDenominator(), Digikam::DMetadata::loadUsingRawEngine(), setExifTagVariant(), and setGPSInfo().
|
static |
This method convert a 'number' to a rational value, returned in 'numerator' and 'denominator' parameters. This method will be able to retrieve a rational number from a double - if you constructed your double with 1.0 / 4786.0, this method will retrieve 1 / 4786. If your number is not expected to be rational, use the method above which is just as exact with rounding = 4 and more exact with rounding > 4.
References convertToRational(), and value.
Referenced by createExifUserStringFromValue(), Digikam::DMetadata::loadUsingRawEngine(), setExifTagVariant(), and Digikam::setExifXmpTagDataVariant().
|
static |
Converts a double floating point number to user presentable numbers, integer degrees and minutes and double floating point seconds, and a direction reference ('N' or 'S', 'E' or 'W'). The method needs to know for the direction reference if the latitude or the longitude is meant by the double parameter.
|
static |
Converts a GPSCoordinate string to user presentable numbers, integer degrees and minutes and double floating point seconds, and a direction reference ('N' or 'S', 'E' or 'W')
Referenced by Digikam::ItemPosition::latitudeUserPresentableNumbers(), Digikam::ItemPosition::longitudeUserPresentableNumbers(), and Digikam::DMetadata::valueToString().
QString Digikam::MetaEngine::createExifUserStringFromValue | ( | const char * | exifTagName, |
const QVariant & | val, | ||
bool | escapeCR = true |
||
) |
Takes a QVariant value as it could have been retrieved by getExifTagVariant with the given exifTagName, and returns its value properly converted to a string (including translations from Exiv2). This is equivalent to calling getExifTagString directly. If escapeCR is true CR characters will be removed from the result.
References convertToRationalSmallDenominator(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
MetaEngineData Digikam::MetaEngine::data | ( | ) | const |
References Digikam::MetaEngine::Private::data.
Referenced by Digikam::MetaEngine::Private::copyPrivateData(), Digikam::MetaEngine::Private::exifMetadata(), getExifEncoded(), getExifTagData(), Digikam::DMetadata::getIccProfile(), getIptc(), getIptcTagData(), getXmp(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::ImportItemPropertiesSideBarImport::itemChanged(), Digikam::MetaEngine::Private::itemComments(), Digikam::ItemScanner::loadFromDisk(), Digikam::DMetadata::loadUsingFFmpeg(), MetaEngine(), setComments(), Digikam::ItemPropertiesMetadataTab::setCurrentData(), setData(), setExif(), setExifTagData(), setExifThumbnail(), Digikam::DMetadata::setIccProfile(), setIptc(), setIptcTagData(), setItemPreview(), Digikam::MetadataWidget::setMetadata(), setTiffThumbnail(), and setXmp().
|
static |
Language Alternative autodetection. Return a QString without language alternative header. Header is saved into 'lang'. If no language alternative is founf, value is returned as well and 'lang' is set to a null string.
References value.
Referenced by getXmpTagsDataList(), and getXmpTagStringLangAlt().
|
static |
Return a string version of Exiv2 release in format "major.minor.patch"
Referenced by Digikam::LibsInfoDlg::LibsInfoDlg().
bool Digikam::MetaEngine::exportChanges | ( | const QString & | exvTmpFile, |
QStringList & | removedTags | ||
) | const |
List changed tags compared to original file contents and export result to a temporary EXV file container. 'exvTmpFile' is the path to the temporary EXV container to create. 'removedTags' is populated with the list of tags removed.
References AutoPtr, Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::filePath, getExifTagData(), getFilePath(), getIptcTagData(), getXmpTagVariant(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QByteArray Digikam::MetaEngine::getComments | ( | ) | const |
Return a Qt byte array copy of Comments container get from current item. Comments are JFIF section of JPEG images. Look Exiv2 API for more information. Return a null Qt byte array if there is no Comments metadata in memory.
References Digikam::MetaEngine::Private::itemComments().
QString Digikam::MetaEngine::getCommentsDecoded | ( | ) | const |
Return a Qt string object of Comments from current item decoded using the 'detectEncodingAndDecode()' method. Return a null string if there is no Comments metadata available.
References Digikam::MetaEngine::Private::detectEncodingAndDecode(), and Digikam::MetaEngine::Private::itemComments().
Referenced by Digikam::DMetadata::getItemComments(), and Digikam::DMetadata::getMetadataField().
QDateTime Digikam::MetaEngine::getDigitizationDateTime | ( | bool | fallbackToCreationTime = false | ) | const |
Return the digitization time stamp of the item. First Exif information is checked, then IPTC. If no digitization time stamp is found, getItemDateTime() is called if fallbackToCreationTime is true, or a null QDateTime is returned if fallbackToCreationTime is false.
References Digikam::MetaEngine::Private::exifMetadata(), getItemDateTime(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::getMetadataField(), and Digikam::DNGWriter::Private::storeExif().
QString Digikam::MetaEngine::getExifComment | ( | bool | readDescription = true | ) | const |
Return a QString copy of Exif user comments. Return a null string if user comments cannot be found.
References Digikam::MetaEngine::Private::convertCommentValue(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getMetadataField(), and DigikamGenericMetadataEditPlugin::EXIFCaption::readMetadata().
QByteArray Digikam::MetaEngine::getExifEncoded | ( | bool | addExifHeader = false | ) | const |
Returns the exif data encoded to a QByteArray in a form suitable for storage in a JPEG image. Note that this encoding is a lossy operation.
Set true 'addExifHeader' parameter to add an Exif header to Exif metadata. Returns a null Qt byte array if there is no Exif metadata in memory.
References data(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QByteArray Digikam::MetaEngine::getExifTagData | ( | const char * | exifTagName | ) | const |
Get an Exif tag content like a bytes array. Return an empty bytes array if Exif tag cannot be found.
References data(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by exportChanges(), getGPSAltitude(), getGPSLatitudeNumber(), getGPSLongitudeNumber(), and Digikam::DMetadata::getIccProfile().
QString Digikam::MetaEngine::getExifTagDescription | ( | const char * | exifTagName | ) |
Return the Exif Tag description or a null string.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::getExifTagLong | ( | const char * | exifTagName, |
long & | val | ||
) | const |
Get an Exif tag content like a long value. Return true if Exif tag be found.
Referenced by getItemColorWorkSpace(), Digikam::DMetadata::getItemRating(), DigikamGenericMetadataEditPlugin::EXIFAdjust::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFLens::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFLight::readMetadata(), and Digikam::DNGWriter::Private::storeExif().
bool Digikam::MetaEngine::getExifTagLong | ( | const char * | exifTagName, |
long & | val, | ||
int | component | ||
) | const |
Get an Exif tag content like a long value. Return true if Exif tag be found.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::getExifTagRational | ( | const char * | exifTagName, |
long int & | num, | ||
long int & | den, | ||
int | component = 0 |
||
) | const |
Get the 'component' index of an Exif tags content like a rational value. 'num' and 'den' are the numerator and the denominator of the rational value. Return true if Exif tag be found.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::EXIFAdjust::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFLens::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFLight::readMetadata(), and Digikam::DNGWriter::Private::storeExif().
MetaEngine::MetaDataMap Digikam::MetaEngine::getExifTagsDataList | ( | const QStringList & | exifKeysFilter = QStringList() , |
bool | invertSelection = false , |
||
bool | extractBinary = true |
||
) | const |
Return a map of Exif tags name/value found in metadata sorted by Exif keys given by 'exifKeysFilter'.
'exifKeysFilter' is a QStringList of Exif keys. For example, if you use the string list given below:
"Iop" "Thumbnail" "Image" "Photo"
List can be empty to not filter output.
... this method will return a map of all Exif tags which :
References Digikam::MetaEngine::Private::convertCommentValue(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::removeExifTags().
QString Digikam::MetaEngine::getExifTagString | ( | const char * | exifTagName, |
bool | escapeCR = true |
||
) | const |
Get an Exif tags content like a string. If 'escapeCR' parameter is true, the CR characters will be removed. If Exif tag cannot be found a null string is returned.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::LensFunIface::findFromMetadata(), Digikam::DMetadata::getCameraSerialNumber(), Digikam::DMetadata::getItemColorLabel(), getItemColorWorkSpace(), Digikam::DMetadata::getItemTagsPath(), Digikam::DMetadata::getItemUniqueId(), Digikam::DMetadata::getLensDescription(), Digikam::DMetadata::getPhotographInformation(), Digikam::DMetadata::mSecTimeStamp(), DigikamGenericMetadataEditPlugin::EXIFCaption::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFDateTime::readMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::readMetadata(), and Digikam::DNGWriter::Private::storeExif().
QString Digikam::MetaEngine::getExifTagTitle | ( | const char * | exifTagName | ) |
Return the Exif Tag title or a null string.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QVariant Digikam::MetaEngine::getExifTagVariant | ( | const char * | exifTagName, |
bool | rationalAsListOfInts = true , |
||
bool | escapeCR = true , |
||
int | component = 0 |
||
) | const |
Get an Exif tags content as a QVariant. Returns a null QVariant if the Exif tag cannot be found. For string and integer values the matching QVariant types will be used, for date and time values QVariant::DateTime. Rationals will be returned as QVariant::List with two integer QVariants (numerator, denominator) if rationalAsListOfInts is true, as double if rationalAsListOfInts is false. An exif tag of numerical type may contain more than one value; set component to the desired index.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QImage Digikam::MetaEngine::getExifThumbnail | ( | bool | fixOrientation | ) | const |
Return a QImage copy of Exif thumbnail image. Return a null image if thumbnail cannot be found. The 'fixOrientation' parameter will rotate automatically the thumbnail if Exif orientation tags information are attached with thumbnail.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), rotateExifQImage(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::JPEGUtils::JpegRotator::updateMetadata().
QString Digikam::MetaEngine::getFilePath | ( | ) | const |
Return the file path of current item.
References Digikam::MetaEngine::Private::filePath.
Referenced by Digikam::DMetadata::applyChanges(), exportChanges(), Digikam::DMetadata::getItemColorLabel(), Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getItemPickLabel(), Digikam::DMetadata::getItemRating(), Digikam::DMetadata::getItemTitles(), load(), loadFromSidecarAndMerge(), and setImageDateTime().
bool Digikam::MetaEngine::getGPSAltitude | ( | double *const | altitude | ) | const |
Get GPS altitude information, in meters, relative to sea level (positive sign above sea level)
References Digikam::MetaEngine::Private::exifMetadata(), getExifTagData(), getXmpTagString(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by getGPSInfo(), Digikam::DMetadata::getMetadataField(), and Digikam::ItemPropertiesGPSTab::setMetadata().
bool Digikam::MetaEngine::getGPSInfo | ( | double & | altitude, |
double & | latitude, | ||
double & | longitude | ||
) | const |
Get all GPS location information set in item. Return true if all information can be found.
References getGPSAltitude(), getGPSLatitudeNumber(), and getGPSLongitudeNumber().
Referenced by DigikamGenericGeolocationEditPlugin::KmlExport::generate(), DigikamGenericGeolocationEditPlugin::KmlExport::generateImagesthumb(), and Digikam::DMetadata::getPhotographInformation().
bool Digikam::MetaEngine::getGPSLatitudeNumber | ( | double *const | latitude | ) | const |
Get GPS location information set in the item, as a double floating point number as in degrees where the sign determines the direction ref (North + / South - ; East + / West -). Returns true if the information is available.
References convertFromGPSCoordinateString(), Digikam::MetaEngine::Private::exifMetadata(), getExifTagData(), getXmpTagString(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by getGPSInfo(), getGPSLatitudeString(), Digikam::DMetadata::getMetadataField(), and Digikam::ItemPropertiesGPSTab::setMetadata().
QString Digikam::MetaEngine::getGPSLatitudeString | ( | ) | const |
Get GPS location information set in the item, in the GPSCoordinate format as described in the XMP specification. Returns a null string in the information cannot be found.
References convertToGPSCoordinateString(), and getGPSLatitudeNumber().
Referenced by Digikam::DMetadata::getMetadataField().
bool Digikam::MetaEngine::getGPSLongitudeNumber | ( | double *const | longitude | ) | const |
References convertFromGPSCoordinateString(), Digikam::MetaEngine::Private::exifMetadata(), getExifTagData(), getXmpTagString(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by getGPSInfo(), getGPSLongitudeString(), Digikam::DMetadata::getMetadataField(), and Digikam::ItemPropertiesGPSTab::setMetadata().
QString Digikam::MetaEngine::getGPSLongitudeString | ( | ) | const |
References convertToGPSCoordinateString(), and getGPSLongitudeNumber().
Referenced by Digikam::DMetadata::getMetadataField().
QByteArray Digikam::MetaEngine::getIptc | ( | bool | addIrbHeader = false | ) | const |
Return a Qt byte array copy of Iptc container get from current item. Set true 'addIrbHeader' parameter to add an Irb header to Iptc metadata. Return a null Qt byte array if there is no Iptc metadata in memory.
References data(), Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QStringList Digikam::MetaEngine::getIptcKeywords | ( | ) | const |
Return a strings list of Iptc keywords from item. Return an empty list if no keyword are set.
References Digikam::MetaEngine::Private::extractIptcTagString(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::getItemTagsPath(), DigikamGenericMetadataEditPlugin::IPTCKeywords::readMetadata(), and Digikam::DMetadata::setItemTagsPath().
QStringList Digikam::MetaEngine::getIptcSubCategories | ( | ) | const |
Return a strings list of Iptc sub-categories from item. Return an empty list if no sub-category are set.
References Digikam::MetaEngine::Private::extractIptcTagString(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::IPTCCategories::readMetadata().
QStringList Digikam::MetaEngine::getIptcSubjects | ( | ) | const |
Return a strings list of Iptc subjects from item. Return an empty list if no subject are set.
References Digikam::MetaEngine::Private::extractIptcTagString(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::IPTCSubjects::applyMetadata(), Digikam::DMetadata::getIptcCoreSubjects(), DigikamGenericMetadataEditPlugin::IPTCSubjects::readMetadata(), and Digikam::DMetadata::setMetadataTemplate().
QByteArray Digikam::MetaEngine::getIptcTagData | ( | const char * | iptcTagName | ) | const |
Get an Iptc tag content as a bytes array. Return an empty bytes array if Iptc tag cannot be found.
References data(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by exportChanges(), getItemPreview(), and Digikam::DMetadata::getItemRating().
QString Digikam::MetaEngine::getIptcTagDescription | ( | const char * | iptcTagName | ) |
Return the Iptc Tag description or a null string.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
MetaEngine::MetaDataMap Digikam::MetaEngine::getIptcTagsDataList | ( | const QStringList & | iptcKeysFilter = QStringList() , |
bool | invertSelection = false |
||
) | const |
Return a map of Iptc tags name/value found in metadata sorted by Iptc keys given by 'iptcKeysFilter'.
'iptcKeysFilter' is a QStringList of Iptc keys. For example, if you use the string list given below:
"Envelope" "Application2"
List can be empty to not filter output.
... this method will return a map of all Iptc tags which :
References Digikam::MetaEngine::Private::extractIptcTagString(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and value.
Referenced by Digikam::DMetadata::removeIptcTags().
MetaEngine::TagsMap Digikam::MetaEngine::getIptcTagsList | ( | ) | const |
Return a map of all standard Iptc tags supported by Exiv2.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QStringList Digikam::MetaEngine::getIptcTagsStringList | ( | const char * | iptcTagName, |
bool | escapeCR = true |
||
) | const |
Returns a strings list with of multiple Iptc tags from the item. Return an empty list if no tag is found. Get the values of all IPTC tags with the given tag name in a string list. (In Iptc, there can be multiple tags with the same name) If the 'escapeCR' parameter is true, the CR characters will be removed. If no tag can be found an empty list is returned.
References Digikam::MetaEngine::Private::extractIptcTagString(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::IPTCContent::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCCredits::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCOrigin::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCProperties::readMetadata(), and Digikam::DMetadata::setMetadataTemplate().
QString Digikam::MetaEngine::getIptcTagString | ( | const char * | iptcTagName, |
bool | escapeCR = true |
||
) | const |
Get an Iptc tag content like a string. If 'escapeCR' parameter is true, the CR characters will be removed. If Iptc tag cannot be found a null string is returned.
References Digikam::MetaEngine::Private::extractIptcTagString(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getItemTitles(), DigikamGenericMetadataEditPlugin::IPTCCategories::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCContent::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCCredits::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCEnvelope::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCOrigin::readMetadata(), DigikamGenericMetadataEditPlugin::IPTCProperties::readMetadata(), and DigikamGenericMetadataEditPlugin::IPTCStatus::readMetadata().
QString Digikam::MetaEngine::getIptcTagTitle | ( | const char * | iptcTagName | ) |
Return the Iptc Tag title or a null string.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
MetaEngine::ImageColorWorkSpace Digikam::MetaEngine::getItemColorWorkSpace | ( | ) | const |
Return the item color-space set in Exif metadata. The makernotes of item are also parsed to get this information. See ImageColorWorkSpace values for details.
References getExifTagLong(), getExifTagString(), getXmpTagVariant(), WORKSPACE_ADOBERGB, WORKSPACE_SRGB, WORKSPACE_UNCALIBRATED, and WORKSPACE_UNSPECIFIED.
Referenced by Digikam::DMetadata::getIccProfile().
QDateTime Digikam::MetaEngine::getItemDateTime | ( | ) | const |
Return the time stamp of item. Exif information are check in first, IPTC in second if item don't have Exif information. If no time stamp is found, a null date is returned.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DKCamera::fillItemInfoFromMetadata(), DigikamGenericGeolocationEditPlugin::KmlExport::generateImagesthumb(), getDigitizationDateTime(), Digikam::DMetadata::getMetadataField(), Digikam::DMetadata::getPhotographInformation(), Digikam::ItemPropertiesGPSTab::setMetadata(), and Digikam::DNGWriter::Private::storeExif().
QSize Digikam::MetaEngine::getItemDimensions | ( | ) | const |
Return the size of item in pixels using Exif tags. Return a null dimension if size cannot be found.
References Digikam::MetaEngine::Private::exifMetadata(), getXmpTagString(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DKCamera::fillItemInfoFromMetadata(), and Digikam::ImportItemPropertiesTab::setCurrentItem().
MetaEngine::ImageOrientation Digikam::MetaEngine::getItemOrientation | ( | ) | const |
Return the item orientation set in Exif metadata. The makernotes of item are also parsed to get this information. See ImageOrientation values for details.
References Digikam::MetaEngine::Private::exifMetadata(), getXmpTagString(), ORIENTATION_NORMAL, ORIENTATION_ROT_270, ORIENTATION_ROT_90, ORIENTATION_UNSPECIFIED, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::LoadSaveThread::exifOrientation(), Digikam::DMetadata::getMetadataField(), and Digikam::JPEGUtils::JpegRotator::JpegRotator().
bool Digikam::MetaEngine::getItemPreview | ( | QImage & | preview | ) | const |
Return a QImage copy of Iptc preview image. Return a null item if preview cannot be found.
References getIptcTagData(), getXmpTagString(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::JPEGUtils::JpegRotator::updateMetadata().
MetaEngine::TagsMap Digikam::MetaEngine::getMakernoteTagsList | ( | ) | const |
Return a map of all non-standard Exif tags (makernotes) supported by Exiv2.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QString Digikam::MetaEngine::getMimeType | ( | ) | const |
Returns the mime type of this item. The information is read from the file; see the docs for getPixelSize() to know when it is available.
References Digikam::MetaEngine::Private::mimeType.
QSize Digikam::MetaEngine::getPixelSize | ( | ) | const |
Returns the pixel size of the current item. This information is read from the file, not from the metadata. The returned QSize is valid if the MetaEngine object was constructed by reading a file or item data; the information is not available when the object was created from MetaEngineData. Note that in the Exif or XMP metadata, there may be fields describing the item size. These fields are not accessed by this method. When replacing the metadata with setData(), the metadata may change; this information always keeps referring to the file it was initially read from.
References Digikam::MetaEngine::Private::pixelSize.
Referenced by DigikamGenericPanoramaPlugin::CreatePreviewTask::run(), DigikamGenericPanoramaPlugin::CreatePtoTask::run(), and Digikam::ImportItemPropertiesTab::setCurrentItem().
MetaEngine::TagsMap Digikam::MetaEngine::getStdExifTagsList | ( | ) | const |
Return a map of all standard Exif tags supported by Exiv2.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QByteArray Digikam::MetaEngine::getXmp | ( | ) | const |
Return a Qt byte array copy of XMp container get from current item. Return a null Qt byte array if there is no Xmp metadata in memory.
References data(), Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QStringList Digikam::MetaEngine::getXmpKeywords | ( | ) | const |
Return a strings list of Xmp keywords from item. Return an empty list if no keyword are set.
References getXmpTagStringBag().
QStringList Digikam::MetaEngine::getXmpSubCategories | ( | ) | const |
Return a strings list of Xmp sub-categories from item. Return an empty list if no sub-category are set.
References getXmpTagStringBag().
QStringList Digikam::MetaEngine::getXmpSubjects | ( | ) | const |
Return a strings list of Xmp subjects from item. Return an empty list if no subject are set.
References getXmpTagStringBag().
QString Digikam::MetaEngine::getXmpTagDescription | ( | const char * | xmpTagName | ) |
Return the Xmp Tag description or a null string.
References Digikam::MetaEngine::Private::printExiv2ExceptionError().
MetaEngine::MetaDataMap Digikam::MetaEngine::getXmpTagsDataList | ( | const QStringList & | xmpKeysFilter = QStringList() , |
bool | invertSelection = false |
||
) | const |
Return a map of Xmp tags name/value found in metadata sorted by Xmp keys given by 'xmpKeysFilter'.
'xmpKeysFilter' is a QStringList of Xmp keys. For example, if you use the string list given below:
"dc" // Dubling Core schema. "xmp" // Standard Xmp schema.
List can be empty to not filter output.
... this method will return a map of all Xmp tags which :
References detectLanguageAlt(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and value.
Referenced by Digikam::DMetadata::removeXmpTags().
MetaEngine::TagsMap Digikam::MetaEngine::getXmpTagsList | ( | ) | const |
Return a map of all standard Xmp tags supported by Exiv2.
References Digikam::MetaEngine::Private::getXMPTagsListFromPrefix().
QString Digikam::MetaEngine::getXmpTagString | ( | const char * | xmpTagName, |
bool | escapeCR = true |
||
) | const |
Get a Xmp tag content like a string. If 'escapeCR' parameter is true, the CR characters will be removed. If Xmp tag cannot be found a null string is returned.
References Digikam::MetaEngine::Private::printExiv2ExceptionError().
Referenced by Digikam::LensFunIface::findFromMetadata(), Digikam::DMetadata::getACDSeeTagsPath(), Digikam::DMetadata::getCameraSerialNumber(), getGPSAltitude(), getGPSLatitudeNumber(), getGPSLongitudeNumber(), Digikam::DMetadata::getItemColorLabel(), Digikam::DMetadata::getItemComments(), getItemDimensions(), Digikam::DMetadata::getItemFacesMap(), Digikam::DMetadata::getItemHistory(), getItemOrientation(), Digikam::DMetadata::getItemPickLabel(), getItemPreview(), Digikam::DMetadata::getItemRating(), Digikam::DMetadata::getItemTitles(), Digikam::DMetadata::getItemUniqueId(), Digikam::DMetadata::getLensDescription(), Digikam::DMetadata::getMetadataField(), Digikam::DMetadata::getPhotographInformation(), Digikam::DMetadata::getVideoInformation(), Digikam::DMetadata::hasItemHistoryTag(), Digikam::DMetadata::loadUsingFFmpeg(), DigikamGenericMetadataEditPlugin::XMPCategories::readMetadata(), DigikamGenericMetadataEditPlugin::XMPContent::readMetadata(), DigikamGenericMetadataEditPlugin::XMPCredits::readMetadata(), DigikamGenericMetadataEditPlugin::XMPOrigin::readMetadata(), DigikamGenericMetadataEditPlugin::XMPProperties::readMetadata(), DigikamGenericMetadataEditPlugin::XMPStatus::readMetadata(), Digikam::s_setXmpTagStringFromEntry(), and Digikam::DMetadata::setItemFacesMap().
QStringList Digikam::MetaEngine::getXmpTagStringBag | ( | const char * | xmpTagName, |
bool | escapeCR | ||
) | const |
Get a Xmp tag content like a bag of strings. If 'escapeCR' parameter is true, the CR characters will be removed from strings. If Xmp tag cannot be found a null string list is returned.
References Digikam::MetaEngine::Private::printExiv2ExceptionError().
Referenced by Digikam::DMetadata::addToXmpTagStringBag(), addToXmpTagStringBag(), Digikam::DMetadata::getItemTagsPath(), Digikam::DMetadata::getXmpKeywords(), getXmpKeywords(), Digikam::DMetadata::getXmpSubCategories(), getXmpSubCategories(), Digikam::DMetadata::getXmpSubjects(), getXmpSubjects(), DigikamGenericMetadataEditPlugin::XMPProperties::readMetadata(), Digikam::DMetadata::removeFromXmpTagStringBag(), and removeFromXmpTagStringBag().
QString Digikam::MetaEngine::getXmpTagStringLangAlt | ( | const char * | xmpTagName, |
const QString & | langAlt, | ||
bool | escapeCR | ||
) | const |
Get a Xmp tag content like a string set with an alternative language header 'langAlt' (like "fr-FR" for French - RFC3066 notation) If 'escapeCR' parameter is true, the CR characters will be removed. If Xmp tag cannot be found a null string is returned.
References detectLanguageAlt(), and Digikam::MetaEngine::Private::printExiv2ExceptionError().
Referenced by Digikam::DMetadata::getItemComments().
MetaEngine::AltLangMap Digikam::MetaEngine::getXmpTagStringListLangAlt | ( | const char * | xmpTagName, |
bool | escapeCR = true |
||
) | const |
Get all redondant Alternative Language Xmp tags content like a map. See AltLangMap class description for details. If 'escapeCR' parameter is true, the CR characters will be removed from strings. If Xmp tag cannot be found a null string list is returned.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and value.
Referenced by Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getItemTitles(), DigikamGenericMetadataEditPlugin::XMPContent::readMetadata(), DigikamGenericMetadataEditPlugin::XMPStatus::readMetadata(), and setXmpTagStringLangAlt().
QStringList Digikam::MetaEngine::getXmpTagStringSeq | ( | const char * | xmpTagName, |
bool | escapeCR = true |
||
) | const |
Get a Xmp tag content like a sequence of strings. If 'escapeCR' parameter is true, the CR characters will be removed from strings. If Xmp tag cannot be found a null string list is returned.
References Digikam::MetaEngine::Private::printExiv2ExceptionError().
Referenced by Digikam::DMetadata::getItemTagsPath(), DigikamGenericMetadataEditPlugin::XMPCredits::readMetadata(), and DigikamGenericMetadataEditPlugin::XMPStatus::readMetadata().
QString Digikam::MetaEngine::getXmpTagTitle | ( | const char * | xmpTagName | ) |
Return the Xmp Tag title or a null string.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
QVariant Digikam::MetaEngine::getXmpTagVariant | ( | const char * | xmpTagName, |
bool | rationalAsListOfInts = true , |
||
bool | stringEscapeCR = true |
||
) | const |
Get an Xmp tag content as a QVariant. Returns a null QVariant if the Xmp tag cannot be found. For string and integer values the matching QVariant types will be used, for date and time values QVariant::DateTime. Rationals will be returned as QVariant::List with two integer QVariants (numerator, denominator) if rationalAsListOfInts is true, as double if rationalAsListOfInts is false. Arrays (ordered, unordered, alternative) are returned as type StringList. LangAlt values will have type Map (QMap<QString, QVariant>) with the language code as key and the contents as value, of type String.
References Digikam::MetaEngine::Private::printExiv2ExceptionError(), and value.
Referenced by exportChanges(), getItemColorWorkSpace(), and Digikam::DMetadata::getMetadataField().
bool Digikam::MetaEngine::hasComments | ( | ) | const |
Return 'true' if metadata container in memory as Comments.
References Digikam::MetaEngine::Private::itemComments().
Referenced by isEmpty().
bool Digikam::MetaEngine::hasExif | ( | ) | const |
Return 'true' if metadata container in memory as Exif.
References Digikam::MetaEngine::Private::exifMetadata().
Referenced by Digikam::DMetadata::getItemColorLabel(), Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getItemRating(), Digikam::DMetadata::getPhotographInformation(), and isEmpty().
bool Digikam::MetaEngine::hasIptc | ( | ) | const |
Return 'true' if metadata container in memory as Iptc.
References Digikam::MetaEngine::Private::iptcMetadata().
Referenced by Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getItemRating(), Digikam::DMetadata::getItemTitles(), and isEmpty().
|
static |
Performs a QFileInfo based check if the given local file has a sidecar.
References sidecarFilePathForFile().
Referenced by Digikam::JPEGUtils::JpegRotator::exifTransform(), Digikam::ItemScanner::loadFromDisk(), Digikam::Task::run(), Digikam::CollectionScanner::scanFileNormal(), and Digikam::ItemPropertiesSideBar::setImagePropertiesInformation().
bool Digikam::MetaEngine::hasXmp | ( | ) | const |
Return 'true' if metadata container in memory as Xmp.
Referenced by Digikam::DMetadata::getItemColorLabel(), Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getItemHistory(), Digikam::DMetadata::getItemPickLabel(), Digikam::DMetadata::getItemRating(), Digikam::DMetadata::getItemTitles(), Digikam::DMetadata::getItemUniqueId(), Digikam::DMetadata::getPhotographInformation(), Digikam::DMetadata::getVideoInformation(), Digikam::DMetadata::hasItemHistoryTag(), and isEmpty().
|
static |
Return true if Exiv2 library initialization is done properly. This method must be called before using libMetaEngine with multithreading. It initialize several non re-entrancy code from Adobe XMP SDK, and register a function to cleanup automatically all XMP SDK memory allocation. See Bug #166424 for details.
References registerXmpNameSpace(), and Digikam::s_metaEngineSupportBmff.
bool Digikam::MetaEngine::initializeGPSInfo | ( | ) |
Make sure all static required GPS EXIF and XMP tags exist
References AutoPtr, Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, setXmpTagString(), and value.
Referenced by setGPSInfo().
bool Digikam::MetaEngine::isEmpty | ( | ) | const |
Return 'true' if metadata container in memory as no Comments, Exif, Iptc, and Xmp.
References hasComments(), hasExif(), hasIptc(), and hasXmp().
Referenced by Digikam::LensFunIface::findFromMetadata(), Digikam::DMetadata::getItemColorLabel(), Digikam::DMetadata::getItemComments(), Digikam::DMetadata::getItemPickLabel(), Digikam::DMetadata::getItemRating(), Digikam::DMetadata::getItemTitles(), Digikam::s_setXmpTagStringFromEntry(), and setImageDateTime().
bool Digikam::MetaEngine::load | ( | const QString & | filePath, |
Backend * | backend = nullptr |
||
) |
Load all metadata (Exif, Iptc, Xmp, and JFIF Comments) from a picture (JPEG, RAW, TIFF, PNG, DNG, etc...). Return true if metadata have been loaded successfully from file. If backend is non null, return the backend used to populate metadata (Exiv2). See Backend enum for details.
References AutoPtr, Digikam::MetaEngine::Private::exifMetadata(), Exiv2Backend, Digikam::MetaEngine::Private::filePath, getFilePath(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::itemComments(), loadFromSidecarAndMerge(), Digikam::MetaEngine::Private::mimeType, NoBackend, Digikam::MetaEngine::Private::pixelSize, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::load(), MetaEngine(), DigikamGenericPanoramaPlugin::CreatePreviewTask::run(), and DigikamGenericPanoramaPlugin::CreatePtoTask::run().
bool Digikam::MetaEngine::loadFromData | ( | const QByteArray & | imgData | ) |
Load all metadata (Exif, Iptc, Xmp, and JFIF Comments) from a byte array. Return true if metadata have been loaded successfully from item data.
References AutoPtr, Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::itemComments(), Digikam::MetaEngine::Private::mimeType, Digikam::MetaEngine::Private::pixelSize, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::loadFromSidecarAndMerge | ( | const QString & | filePath | ) |
Load metadata from a sidecar file and merge. Return true if metadata have been loaded successfully from file.
References AutoPtr, Digikam::MetaEngine::Private::filePath, getFilePath(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, sidecarFilePathForFile(), and Digikam::MetaEngine::Private::useXMPSidecar4Reading.
Referenced by Digikam::DMetadata::load(), and load().
int Digikam::MetaEngine::metadataWritingMode | ( | ) | const |
Return the metadata writing mode.
References Digikam::MetaEngine::Private::metadataWritingMode.
Referenced by Digikam::MetaEngine::Private::copyPrivateData().
|
static |
Register a namespace which Exiv2 doesn't know yet. This is only needed when new Xmp properties are added manually. 'uri' is the namespace url and 'prefix' the string used to construct new Xmp key (ex. "Xmp.digiKam.tagList"). NOTE: If the Xmp metadata is read from an item, namespaces are decoded and registered by Exiv2 at the same time.
References prefix, and Digikam::MetaEngine::Private::printExiv2ExceptionError().
Referenced by initializeExiv2().
bool Digikam::MetaEngine::removeExifTag | ( | const char * | exifTagName | ) | const |
Remove the Exif tag 'exifTagName' from Exif metadata. Return true if tag is removed successfully or if no tag was present.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::EXIFAdjust::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFCaption::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDateTime::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLens::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLight::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPContent::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPCredits::applyMetadata(), Digikam::DMetadata::removeExifColorSpace(), Digikam::DMetadata::removeExifTags(), setExifComment(), and Digikam::DMetadata::setIccProfile().
bool Digikam::MetaEngine::removeExifThumbnail | ( | ) | const |
Remove the Exif Thumbnail from the item
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by setExifThumbnail(), and setTiffThumbnail().
bool Digikam::MetaEngine::removeFromXmpTagStringBag | ( | const char * | xmpTagName, |
const QStringList & | entriesToRemove | ||
) | const |
Remove those Xmp tag entries that are listed in entriesToRemove from the entries in metadata. Return true if tag entries are no longer contained in metadata. All other entries are preserved.
References getXmpTagStringBag(), and setXmpTagStringBag().
Referenced by removeXmpKeywords(), removeXmpSubCategories(), and removeXmpSubjects().
bool Digikam::MetaEngine::removeGPSInfo | ( | ) |
Remove all Exif tags relevant of GPS location information. Return true if all tags have been removed successfully in metadata.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), removeXmpTag(), and Digikam::s_metaEngineMutex.
Referenced by setGPSInfo(), and Digikam::MetadataHub::write().
bool Digikam::MetaEngine::removeIptcTag | ( | const char * | iptcTagName | ) | const |
Remove the all instance of Iptc tags 'iptcTagName' from Iptc metadata. Return true if all tags have been removed successfully (or none were present).
References Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::IPTCCategories::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCContent::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCCredits::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCEnvelope::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCProperties::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCStatus::applyMetadata(), Digikam::DMetadata::removeIptcTags(), Digikam::DMetadata::removeMetadataTemplate(), Digikam::DMetadata::setItemComments(), setItemPreview(), and Digikam::DMetadata::setItemTitles().
bool Digikam::MetaEngine::removeXmpKeywords | ( | const QStringList & | keywordsToRemove | ) |
Remove those Xmp keywords that are listed in keywordsToRemove from the keywords in metadata. Return true if keywords are no longer contained in metadata.
References removeFromXmpTagStringBag().
bool Digikam::MetaEngine::removeXmpSubCategories | ( | const QStringList & | categoriesToRemove | ) |
Remove those Xmp sub-categories that are listed in categoriesToRemove from the sub-categories in metadata. Return true if subjects are no longer contained in metadata.
References removeFromXmpTagStringBag().
bool Digikam::MetaEngine::removeXmpSubjects | ( | const QStringList & | subjectsToRemove | ) |
Remove those Xmp subjects that are listed in subjectsToRemove from the subjects in metadata. Return true if subjects are no longer contained in metadata.
References removeFromXmpTagStringBag().
bool Digikam::MetaEngine::removeXmpTag | ( | const char * | xmpTagName, |
bool | family = false |
||
) | const |
Remove the Xmp tag 'xmpTagName' from Xmp metadata. Return true if tag is removed successfully or if no tag was present.
References Digikam::MetaEngine::Private::printExiv2ExceptionError().
Referenced by DigikamGenericMetadataEditPlugin::XMPCategories::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPContent::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPCredits::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPKeywords::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPProperties::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPStatus::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPSubjects::applyMetadata(), Digikam::DMetadata::removeExifColorSpace(), removeGPSInfo(), Digikam::DMetadata::removeItemFacesMap(), Digikam::DMetadata::removeMetadataTemplate(), Digikam::DMetadata::removeXmpTags(), Digikam::DMetadata::setACDSeeTagsPath(), Digikam::DMetadata::setItemColorLabel(), Digikam::DMetadata::setItemComments(), setItemPreview(), Digikam::DMetadata::setItemTitles(), setXmpTagStringBag(), setXmpTagStringLangAlt(), setXmpTagStringListLangAlt(), and setXmpTagStringSeq().
bool Digikam::MetaEngine::rotateExifQImage | ( | QImage & | image, |
ImageOrientation | orientation | ||
) | const |
Fix orientation of a QImage image accordingly with Exif orientation tag. Return true if image is rotated, else false.
References Digikam::Matrix::matrix(), ORIENTATION_NORMAL, ORIENTATION_UNSPECIFIED, and Digikam::MetaEngineRotation::toTransform().
Referenced by DigikamGenericGeolocationEditPlugin::KmlExport::generateImagesthumb(), and getExifThumbnail().
bool Digikam::MetaEngine::save | ( | const QString & | filePath, |
bool | setVersion = false |
||
) | const |
Save all metadata to a file. This one can be different than original picture to perform transfer operation Return true if metadata have been saved into file.
References Digikam::MetaEngine::Private::metadataWritingMode, Digikam::MetaEngine::Private::saveToFile(), Digikam::MetaEngine::Private::saveToXMPSidecar(), setProgramId(), WRITE_TO_FILE_ONLY, WRITE_TO_SIDECAR_AND_FILE, WRITE_TO_SIDECAR_ONLY, and WRITE_TO_SIDECAR_ONLY_FOR_READ_ONLY_FILES.
Referenced by applyChanges(), and Digikam::DMetadata::save().
bool Digikam::MetaEngine::setComments | ( | const QByteArray & | data | ) | const |
Set the Comments data using a Qt byte array. Return true if Comments metadata have been changed in memory.
References data(), and Digikam::MetaEngine::Private::itemComments().
Referenced by DigikamGenericMetadataEditPlugin::EXIFCaption::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCContent::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPContent::applyMetadata(), clearComments(), and Digikam::DMetadata::setItemComments().
void Digikam::MetaEngine::setData | ( | const MetaEngineData & | data | ) |
References data(), and Digikam::MetaEngine::Private::data.
Referenced by MetaEngine().
bool Digikam::MetaEngine::setExif | ( | const QByteArray & | data | ) | const |
Set the Exif data using a Qt byte array. Return true if Exif metadata have been changed in memory.
References data(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::GPCamera::getMetadata().
bool Digikam::MetaEngine::setExifComment | ( | const QString & | comment, |
bool | writeDescription = true |
||
) | const |
Set the Exif user comments from item. Look Exif specification for more details about this tag. Return true if Exif user comments have been changed in metadata.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), removeExifTag(), Digikam::s_metaEngineMutex, and setExifTagString().
Referenced by DigikamGenericMetadataEditPlugin::EXIFCaption::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCContent::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPContent::applyMetadata(), Digikam::DMetadata::loadUsingRawEngine(), and Digikam::DMetadata::setItemComments().
bool Digikam::MetaEngine::setExifTagData | ( | const char * | exifTagName, |
const QByteArray & | data | ||
) | const |
Set an Exif tag content using a bytes array. Return true if tag is set successfully.
References data(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::loadUsingRawEngine(), setExifTagVariant(), and Digikam::DMetadata::setIccProfile().
bool Digikam::MetaEngine::setExifTagLong | ( | const char * | exifTagName, |
long | val | ||
) | const |
Set an Exif tag content using a long value. Return true if tag is set successfully.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::EXIFAdjust::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLens::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLight::applyMetadata(), Digikam::DMetadata::loadUsingRawEngine(), setExifTagVariant(), and Digikam::DMetadata::setItemRating().
bool Digikam::MetaEngine::setExifTagRational | ( | const char * | exifTagName, |
long int | num, | ||
long int | den | ||
) | const |
Set an Exif tag content using a rational value. 'num' and 'den' are the numerator and the denominator of the rational value. Return true if tag is set successfully.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by DigikamGenericMetadataEditPlugin::EXIFAdjust::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLens::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFLight::applyMetadata(), Digikam::DMetadata::loadUsingRawEngine(), and setExifTagVariant().
bool Digikam::MetaEngine::setExifTagString | ( | const char * | exifTagName, |
const QString & | value | ||
) | const |
Set an Exif tag content using a string. Return true if tag is set successfully.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and value.
Referenced by DigikamGenericMetadataEditPlugin::EXIFCaption::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDateTime::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDevice::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPContent::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPCredits::applyMetadata(), Digikam::DMetadata::loadUsingRawEngine(), setExifComment(), setExifTagVariant(), and Digikam::DMetadata::setItemColorLabel().
bool Digikam::MetaEngine::setExifTagVariant | ( | const char * | exifTagName, |
const QVariant & | data, | ||
bool | rationalWantSmallDenominator = true |
||
) | const |
Set an Exif tag content using a QVariant. Returns true if tag is set successfully. All types described for the getExifTagVariant() method are supported. Calling with a QVariant of type ByteArray is equivalent to calling setExifTagData. For the meaning of rationalWantSmallDenominator, see the documentation of the convertToRational methods. Setting a value with multiple components is currently not supported.
References convertToRational(), convertToRationalSmallDenominator(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), setExifTagData(), setExifTagLong(), setExifTagRational(), and setExifTagString().
Referenced by Digikam::setExifXmpTagDataVariant().
bool Digikam::MetaEngine::setExifThumbnail | ( | const QImage & | thumb | ) | const |
Set the Exif Thumbnail image. The thumbnail image must have the right dimensions before. Look Exif specification for details. Return true if thumbnail have been changed in metadata.
References data(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), removeExifThumbnail(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::loadUsingRawEngine(), and Digikam::JPEGUtils::JpegRotator::updateMetadata().
void Digikam::MetaEngine::setFilePath | ( | const QString & | path | ) |
Set the file path of current item.
References Digikam::MetaEngine::Private::filePath.
bool Digikam::MetaEngine::setGPSInfo | ( | const double *const | altitude, |
const double | latitude, | ||
const double | longitude | ||
) |
Set all GPS location information into item. Return true if all information have been changed in metadata. If you do not want altitude to be set, pass a null pointer.
References AutoPtr, convertToGPSCoordinateString(), convertToRational(), Digikam::MetaEngine::Private::exifMetadata(), initializeGPSInfo(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), removeGPSInfo(), Digikam::s_metaEngineMutex, setXmpTagString(), and value.
bool Digikam::MetaEngine::setGPSInfo | ( | const double | altitude, |
const double | latitude, | ||
const double | longitude | ||
) |
Set all GPS location information into item. Return true if all information have been changed in metadata.
Referenced by Digikam::DMetadata::loadUsingFFmpeg(), Digikam::DMetadata::loadUsingRawEngine(), setGPSInfo(), and Digikam::MetadataHub::write().
bool Digikam::MetaEngine::setGPSInfo | ( | const double | altitude, |
const QString & | latitude, | ||
const QString & | longitude | ||
) |
Set all GPS location information into item. Return true if all information have been changed in metadata.
References convertFromGPSCoordinateString(), and setGPSInfo().
bool Digikam::MetaEngine::setImageDateTime | ( | const QDateTime & | dateTime, |
bool | setDateTimeDigitized = false |
||
) | const |
Set the Exif and Iptc time stamp. If 'setDateTimeDigitized' parameter is true, the 'Digitalized' time stamp is set, else only 'Created' time stamp is set.
References AutoPtr, Digikam::MetaEngine::Private::exifMetadata(), getFilePath(), Digikam::MetaEngine::Private::iptcMetadata(), isEmpty(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::loadUsingFFmpeg(), Digikam::DMetadata::loadUsingRawEngine(), and Digikam::MetadataHub::write().
bool Digikam::MetaEngine::setIptc | ( | const QByteArray & | data | ) | const |
Set the Iptc data using a Qt byte array. Return true if Iptc metadata have been changed in memory.
References data(), Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::setIptcKeywords | ( | const QStringList & | oldKeywords, |
const QStringList & | newKeywords | ||
) | const |
Set Iptc keywords using a list of strings defined by 'newKeywords' parameter. Use 'getImageKeywords()' method to set 'oldKeywords' parameter with existing keywords from item. The method will compare all new keywords with all old keywords to prevent duplicate entries in item. Return true if keywords have been changed in metadata.
References AutoPtr, Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setIptcTagString().
Referenced by DigikamGenericMetadataEditPlugin::IPTCKeywords::applyMetadata(), Digikam::DMetadata::loadUsingFFmpeg(), and Digikam::DMetadata::setItemTagsPath().
bool Digikam::MetaEngine::setIptcSubCategories | ( | const QStringList & | oldSubCategories, |
const QStringList & | newSubCategories | ||
) | const |
Set Iptc sub-categories using a list of strings defined by 'newSubCategories' parameter. Use 'getImageSubCategories()' method to set 'oldSubCategories' parameter with existing sub-categories from item. The method will compare all new sub-categories with all old sub-categories to prevent duplicate entries in item. Return true if sub-categories have been changed in metadata.
References AutoPtr, Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setIptcTagString().
Referenced by DigikamGenericMetadataEditPlugin::IPTCCategories::applyMetadata(), and Digikam::DMetadata::loadUsingFFmpeg().
bool Digikam::MetaEngine::setIptcSubjects | ( | const QStringList & | oldSubjects, |
const QStringList & | newSubjects | ||
) | const |
Set Iptc subjects using a list of strings defined by 'newSubjects' parameter. Use 'getImageSubjects()' method to set 'oldSubjects' parameter with existing subjects from item. The method will compare all new subjects with all old subjects to prevent duplicate entries in item. Return true if subjects have been changed in metadata.
References AutoPtr, Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setIptcTagString().
Referenced by DigikamGenericMetadataEditPlugin::IPTCSubjects::applyMetadata(), and Digikam::DMetadata::setMetadataTemplate().
bool Digikam::MetaEngine::setIptcTagData | ( | const char * | iptcTagName, |
const QByteArray & | data | ||
) | const |
Set an Iptc tag content using a bytes array. Return true if tag is set successfully.
References data(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
bool Digikam::MetaEngine::setIptcTagsStringList | ( | const char * | iptcTagName, |
int | maxSize, | ||
const QStringList & | oldValues, | ||
const QStringList & | newValues | ||
) | const |
Set multiple Iptc tags contents using a strings list. 'maxSize' is the max characters size of one entry. Return true if all tags have been set successfully.
References AutoPtr, Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setIptcTagString().
Referenced by DigikamGenericMetadataEditPlugin::IPTCContent::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCCredits::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCProperties::applyMetadata(), and Digikam::DMetadata::setMetadataTemplate().
bool Digikam::MetaEngine::setIptcTagString | ( | const char * | iptcTagName, |
const QString & | value | ||
) | const |
Set an Iptc tag content using a string. Return true if tag is set successfully.
References Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and value.
Referenced by DigikamGenericMetadataEditPlugin::EXIFCaption::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDateTime::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCCategories::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCContent::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCCredits::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCEnvelope::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCOrigin::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCProperties::applyMetadata(), DigikamGenericMetadataEditPlugin::IPTCStatus::applyMetadata(), setIptcKeywords(), setIptcSubCategories(), setIptcSubjects(), setIptcTagsStringList(), Digikam::DMetadata::setItemComments(), and Digikam::DMetadata::setItemTitles().
bool Digikam::MetaEngine::setItemColorWorkSpace | ( | ImageColorWorkSpace | workspace | ) | const |
Set the Exif color-space tag of item. See ImageColorWorkSpace values for details Return true if work-space have been changed in metadata.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setXmpTagString().
Referenced by Digikam::DMetadata::loadUsingRawEngine().
bool Digikam::MetaEngine::setItemDimensions | ( | const QSize & | size | ) | const |
Set the size of item in pixels in Exif tags. Return true if size have been changed in metadata.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setXmpTagString().
Referenced by Digikam::DMetadata::loadUsingFFmpeg(), Digikam::DMetadata::loadUsingRawEngine(), and Digikam::JPEGUtils::JpegRotator::updateMetadata().
bool Digikam::MetaEngine::setItemOrientation | ( | ImageOrientation | orientation | ) | const |
Set the Exif orientation tag of item. See ImageOrientation values for details Return true if orientation have been changed in metadata.
References Digikam::MetaEngine::Private::exifMetadata(), ORIENTATION_ROT_270, Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setXmpTagString().
Referenced by Digikam::DMetadata::loadUsingFFmpeg(), and Digikam::JPEGUtils::JpegRotator::updateMetadata().
bool Digikam::MetaEngine::setItemPreview | ( | const QImage & | preview | ) | const |
Set the Iptc preview image. The thumbnail item must have the right size before (64Kb max with JPEG file, else 256Kb). Look Iptc specification for details. Return true if preview have been changed in metadata. Re-implement this method if you want to use another item file format than JPEG to save preview.
References data(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), removeIptcTag(), removeXmpTag(), Digikam::s_metaEngineMutex, and setXmpTagString().
Referenced by Digikam::JPEGUtils::JpegRotator::updateMetadata().
bool Digikam::MetaEngine::setItemProgramId | ( | const QString & | program, |
const QString & | version | ||
) | const |
Set Program name and program version in Exif and Iptc Metadata. Return true if information have been changed in metadata.
References Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::iptcMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and setXmpTagString().
Referenced by setProgramId().
void Digikam::MetaEngine::setMetadataWritingMode | ( | const int | mode | ) |
Set metadata writing mode.
mode | Metadata writing mode as defined by the MetadataWritingMode enum. |
References Digikam::MetaEngine::Private::metadataWritingMode.
Referenced by Digikam::DMetadata::setSettings().
|
protected |
Set the Program Name and Program Version information in Exif and Iptc metadata
References Digikam::digiKamVersion(), and setItemProgramId().
Referenced by save().
bool Digikam::MetaEngine::setTiffThumbnail | ( | const QImage & | thumb | ) | const |
Adds a JPEG thumbnail to a TIFF images. Use this instead of setExifThumbnail for TIFF images.
References data(), Digikam::MetaEngine::Private::exifMetadata(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), removeExifThumbnail(), and Digikam::s_metaEngineMutex.
void Digikam::MetaEngine::setUpdateFileTimeStamp | ( | bool | on | ) |
Enable or disable file timestamp updating when metadata are saved. By default files timestamp are untouched.
References Digikam::MetaEngine::Private::updateFileTimeStamp.
Referenced by Digikam::DMetadata::setSettings().
void Digikam::MetaEngine::setUseCompatibleFileName | ( | const bool | on | ) |
Enable or disable using compatible file name for sidecar files.
References Digikam::MetaEngine::Private::useCompatibleFileName.
Referenced by Digikam::DMetadata::setSettings().
void Digikam::MetaEngine::setUseXMPSidecar4Reading | ( | const bool | on | ) |
Enable or disable using XMP sidecar for reading metadata.
References Digikam::MetaEngine::Private::useXMPSidecar4Reading.
Referenced by Digikam::DMetadata::setSettings().
void Digikam::MetaEngine::setWriteDngFiles | ( | const bool | on | ) |
Enable or disable writing metadata operations to DNG files.
References Digikam::MetaEngine::Private::writeDngFiles.
Referenced by Digikam::DMetadata::setSettings().
void Digikam::MetaEngine::setWriteRawFiles | ( | const bool | on | ) |
Enable or disable writing metadata operations to RAW tiff based files. It requires Exiv2 0.18. By default RAW files are untouched.
References Digikam::MetaEngine::Private::writeRawFiles.
Referenced by Digikam::DMetadata::setSettings().
bool Digikam::MetaEngine::setXmp | ( | const QByteArray & | data | ) | const |
Set the Xmp data using a Qt byte array. Return true if Xmp metadata have been changed in memory.
References data(), Digikam::MetaEngine::Private::filePath, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.
Referenced by Digikam::DMetadata::loadUsingRawEngine().
bool Digikam::MetaEngine::setXmpKeywords | ( | const QStringList & | newKeywords | ) | const |
Set Xmp keywords using a list of strings defined by 'newKeywords' parameter. The existing keywords from item are preserved. The method will compare all new keywords with all already existing keywords to prevent duplicate entries in item. Return true if keywords have been changed in metadata.
References addToXmpTagStringBag().
bool Digikam::MetaEngine::setXmpSubCategories | ( | const QStringList & | newSubCategories | ) | const |
Set Xmp sub-categories using a list of strings defined by 'newSubCategories' parameter. The existing sub-categories from item are preserved. The method will compare all new sub-categories with all already existing sub-categories to prevent duplicate entries in item. Return true if sub-categories have been changed in metadata.
References addToXmpTagStringBag().
bool Digikam::MetaEngine::setXmpSubjects | ( | const QStringList & | newSubjects | ) | const |
Set Xmp subjects using a list of strings defined by 'newSubjects' parameter. The existing subjects from item are preserved. The method will compare all new subject with all already existing subject to prevent duplicate entries in item. Return true if subjects have been changed in metadata.
References addToXmpTagStringBag().
bool Digikam::MetaEngine::setXmpTagString | ( | const char * | xmpTagName, |
const QString & | value | ||
) | const |
Set a Xmp tag content using a string. Return true if tag is set successfully.
References AutoPtr, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and value.
Referenced by DigikamGenericMetadataEditPlugin::EXIFDateTime::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPCategories::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPContent::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPCredits::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPOrigin::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPProperties::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPStatus::applyMetadata(), initializeGPSInfo(), Digikam::DMetadata::loadUsingFFmpeg(), Digikam::s_setXmpTagStringFromEntry(), Digikam::DMetadata::setACDSeeTagsPath(), Digikam::DMetadata::setCreatorContactInfo(), Digikam::setExifXmpTagDataVariant(), setGPSInfo(), Digikam::DMetadata::setIptcCoreLocation(), Digikam::DMetadata::setItemColorLabel(), setItemColorWorkSpace(), Digikam::DMetadata::setItemComments(), setItemDimensions(), Digikam::DMetadata::setItemFacesMap(), Digikam::DMetadata::setItemHistory(), setItemOrientation(), Digikam::DMetadata::setItemPickLabel(), setItemPreview(), setItemProgramId(), Digikam::DMetadata::setItemRating(), Digikam::DMetadata::setItemTitles(), Digikam::DMetadata::setItemUniqueId(), and Digikam::DMetadata::setMetadataTemplate().
bool Digikam::MetaEngine::setXmpTagString | ( | const char * | xmpTagName, |
const QString & | value, | ||
MetaEngine::XmpTagType | type | ||
) | const |
Set a Xmp tag with a specific type. Return true if tag is set successfully. This method only accept NormalTag, ArrayBagTag and StructureTag. Other XmpTagTypes do nothing
References ArrayBagTag, NormalTag, Digikam::MetaEngine::Private::printExiv2ExceptionError(), StructureTag, and value.
bool Digikam::MetaEngine::setXmpTagStringBag | ( | const char * | xmpTagName, |
const QStringList & | bag | ||
) | const |
Set a Xmp tag content using the bag of strings 'bag'. Return true if tag is set successfully.
References AutoPtr, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and removeXmpTag().
Referenced by Digikam::DMetadata::addToXmpTagStringBag(), addToXmpTagStringBag(), DigikamGenericMetadataEditPlugin::XMPProperties::applyMetadata(), Digikam::DMetadata::removeFromXmpTagStringBag(), removeFromXmpTagStringBag(), Digikam::DMetadata::setItemTagsPath(), and Digikam::DMetadata::setXmpKeywords().
bool Digikam::MetaEngine::setXmpTagStringLangAlt | ( | const char * | xmpTagName, |
const QString & | value, | ||
const QString & | langAlt | ||
) | const |
Set a Xmp tag content using a string with an alternative language header. 'langAlt' contain the language alternative information (like "fr-FR" for French - RFC3066 notation) or is null to set alternative language to default settings ("x-default"). Return true if tag is set successfully.
References AutoPtr, getXmpTagStringListLangAlt(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), removeXmpTag(), and value.
Referenced by DigikamGenericMetadataEditPlugin::EXIFCaption::applyMetadata(), and Digikam::DMetadata::setItemComments().
bool Digikam::MetaEngine::setXmpTagStringListLangAlt | ( | const char * | xmpTagName, |
const MetaEngine::AltLangMap & | values | ||
) | const |
Set an Alternative Language Xmp tag content using a map. See AltLangMap class description for details. If tag already exist, it will be removed before. Return true if tag is set successfully.
References AutoPtr, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and removeXmpTag().
Referenced by DigikamGenericMetadataEditPlugin::XMPContent::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPStatus::applyMetadata(), Digikam::DMetadata::setItemComments(), Digikam::DMetadata::setItemTitles(), and Digikam::DMetadata::setMetadataTemplate().
bool Digikam::MetaEngine::setXmpTagStringSeq | ( | const char * | xmpTagName, |
const QStringList & | seq | ||
) | const |
Set a Xmp tag content using the sequence of strings 'seq'. Return true if tag is set successfully.
References AutoPtr, Digikam::MetaEngine::Private::printExiv2ExceptionError(), and removeXmpTag().
Referenced by DigikamGenericMetadataEditPlugin::XMPCredits::applyMetadata(), DigikamGenericMetadataEditPlugin::XMPStatus::applyMetadata(), Digikam::DMetadata::setItemTagsPath(), and Digikam::DMetadata::setMetadataTemplate().
|
static |
Return the XMP Sidecar file path for a item file path. If item file path do not include a file name or is empty, this function return a null string.
Referenced by hasSidecar(), loadFromSidecarAndMerge(), Digikam::MetaEngine::Private::saveToXMPSidecar(), sidecarPath(), and sidecarUrl().
|
static |
Like sidecarFilePathForFile(), but works for local file path.
References sidecarFilePathForFile().
Referenced by Digikam::JPEGUtils::JpegRotator::exifTransform(), Digikam::ItemScanner::loadFromDisk(), Digikam::EditorWindow::moveLocalFile(), Digikam::Task::run(), and Digikam::CollectionScanner::scanFileNormal().
|
static |
Gives a file url for a local path.
References sidecarFilePathForFile().
|
static |
Like sidecarFilePathForFile(), but works for remote URLs.
|
static |
Return true if library support Base Media File Format (aka CR3, HEIF, HEIC, and AVIF). Note: use this function only after to call initializeExiv2(), else false will always returned. The function return true only if Exiv2 >= 0.27.4 compiled with BMFF support.
References Digikam::s_metaEngineSupportBmff.
Referenced by Digikam::LibsInfoDlg::LibsInfoDlg().
|
static |
Return true if library can write metadata to typeMime file format.
|
static |
Return true if Exiv2 library is compiled with Xmp metadata support.
Referenced by DigikamGenericMetadataEditPlugin::EXIFCaption::applyMetadata(), DigikamGenericMetadataEditPlugin::EXIFDateTime::applyMetadata(), Digikam::DMetadata::getItemComments(), Digikam::ItemPropertiesMetadataTab::ItemPropertiesMetadataTab(), Digikam::LibsInfoDlg::LibsInfoDlg(), Digikam::DMetadata::setCreatorContactInfo(), Digikam::DMetadata::setIptcCoreLocation(), Digikam::DMetadata::setItemColorLabel(), Digikam::DMetadata::setItemComments(), Digikam::DMetadata::setItemHistory(), Digikam::DMetadata::setItemPickLabel(), Digikam::DMetadata::setItemRating(), Digikam::DMetadata::setItemTagsPath(), Digikam::DMetadata::setItemTitles(), Digikam::DMetadata::setItemUniqueId(), Digikam::DMetadata::setMetadataTemplate(), ShowFoto::ShowfotoSetupMetadata::ShowfotoSetupMetadata(), and Digikam::TimeAdjustSettings::TimeAdjustSettings().
|
static |
Unregister a previously registered custom namespace
References Digikam::MetaEngine::Private::printExiv2ExceptionError().
bool Digikam::MetaEngine::updateFileTimeStamp | ( | ) | const |
Return true if file timestamp is updated when metadata are saved.
References Digikam::MetaEngine::Private::updateFileTimeStamp.
Referenced by Digikam::MetaEngine::Private::copyPrivateData(), and Digikam::MetaEngine::Private::saveOperations().
bool Digikam::MetaEngine::useCompatibleFileName | ( | ) | const |
Return true if using compatible file name for sidecar files.
References Digikam::MetaEngine::Private::useCompatibleFileName.
Referenced by Digikam::MetaEngine::Private::copyPrivateData(), and Digikam::MetaEngine::Private::saveToXMPSidecar().
bool Digikam::MetaEngine::useXMPSidecar4Reading | ( | ) | const |
Return true if using XMP sidecar for reading metadata is enabled.
References Digikam::MetaEngine::Private::useXMPSidecar4Reading.
Referenced by Digikam::MetaEngine::Private::copyPrivateData().
bool Digikam::MetaEngine::writeDngFiles | ( | ) | const |
Return true if writing metadata operations on DNG files is enabled.
References Digikam::MetaEngine::Private::writeDngFiles.
Referenced by Digikam::MetaEngine::Private::copyPrivateData(), and Digikam::MetaEngine::Private::saveToFile().
bool Digikam::MetaEngine::writeRawFiles | ( | ) | const |
Return true if writing metadata operations on RAW tiff based files is enabled. It's require at least Exiv2 0.18.
References Digikam::MetaEngine::Private::writeRawFiles.
Referenced by Digikam::MetaEngine::Private::copyPrivateData(), and Digikam::MetaEngine::Private::saveToFile().
|
friend |