digiKam Developer Documentation: Digikam::DMetadata Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Digikam::DMetadata Class Reference
Inheritance diagram for Digikam::DMetadata:

## Public Types
typedef QMap< QString, QString > | CountryCodeMap
enum | VIDEOCOLORMODEL { VIDEOCOLORMODEL_UNKNOWN = 1000 , VIDEOCOLORMODEL_OTHER , VIDEOCOLORMODEL_SRGB , VIDEOCOLORMODEL_BT709 , VIDEOCOLORMODEL_BT601 }
| Video color model reported by FFMPEG following XMP DM Spec from Adobe. More...
Public Types inherited from Digikam::MetaEngine
typedef QMap< QString, QString > | AltLangMap
| A map used to store a list of Alternative Language values.
enum | Backend { Exiv2Backend = 0 , LibRawBackend , LibHeifBackend , ImageMagickBackend , FFMpegBackend , ExifToolBackend , VideoMergeBackend , NoBackend }
| Metadata Backend used to populate information. More...
enum | ImageColorWorkSpace { WORKSPACE_UNSPECIFIED = 0 , WORKSPACE_SRGB = 1 , WORKSPACE_ADOBERGB = 2 , WORKSPACE_UNCALIBRATED = 65535 }
| The item color workspace values given by Exif metadata.
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 }
| The item orientation values given by Exif metadata.
typedef QMap< QString, QString > | MetaDataMap
| A map used to store Tags Key and Tags Value.
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 }
| The item metadata writing mode, between item file metadata and XMP sidecar file, depending on the context. More...
typedef QMap< QString, QStringList > | TagsMap
| A map used to store Tags Key and a list of Tags properties :
enum | XmpTagType { NormalTag = 0 , ArrayBagTag = 1 , StructureTag = 2 , ArrayLangTag = 3 , ArraySeqTag = 4 }
| Xmp tag types, used by setXmpTag, only first three types are used.

## Public Member Functions
| DMetadata (const MetaEngineData &data)
| DMetadata (const QString &filePath)
bool | applyChanges (bool setVersion=false) const override
| The same than save() method, but it apply on current item.
bool | getACDSeeTagsPath (QStringList &tagsPath) const
QString | getCameraSerialNumber () const
| Return a string with Camera serial number.
bool | getCopyrightInformation (Template &t) const
| Fills only the copyright values in the template.
IptcCoreContactInfo | getCreatorContactInfo () const
IccProfile | getIccProfile () const
| Reads an IccProfile that is described or embedded in the metadata.
IptcCoreLocationInfo | getIptcCoreLocation () const
QStringList | getIptcCoreSubjects () const
int | getItemColorLabel (const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
CaptionsMap | getItemComments (const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | getItemFacesMap (QMultiMap< QString, QVariant > &facesPath) const
| Get Images Face Map based on tags stored in Picassa/Metadatagroup format.
QString | getItemHistory () const
int | getItemPickLabel (const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
int | getItemRating (const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | getItemTagsPath (QStringList &tagsPath, const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
CaptionsMap | getItemTitles (const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
QString | getItemUniqueId () const
QString | getLensDescription () const
| Return a string with Lens mounted on the front of camera.
QVariant | getMetadataField (MetadataInfo::Field field) const
| Returns the requested metadata field as a QVariant.
QVariantList | getMetadataFields (const MetadataFields &fields) const
Template | getMetadataTemplate () const
int | getMSecsInfo () const
| Returns millisecond time-stamp from Exif tags or 0 if not found.
PhotoInfoContainer | getPhotographInformation () const
VideoInfoContainer | getVideoInformation () const
| Returns video metadata from Xmp tags.
bool | hasItemHistoryTag () const
bool | load (const QString &filePath, bool videoAll=false, Backend *backend=nullptr)
| Re-implemented from MetaEngine to use libraw identify, libheif, ffmpeg probe, and ImageMAgick identify methods if Exiv2 failed.
bool | loadUsingFFmpeg (const QString &filePath)
| Try to extract metadata using FFMpeg probe method (libav).
bool | loadUsingRawEngine (const QString &filePath)
| Try to extract metadata using Raw Engine identify method (libraw).
bool | mSecTimeStamp (const char *const exifTagName, int &ms) const
| Extract milliseconds time-stamp of photo from an Exif tag and store it to 'ms'.
void | registerMetadataSettings ()
bool | removeExifColorSpace () const
| Remove the Exif color space identification from the image.
bool | removeExifTags (const QStringList &tagFilters)
bool | removeIptcTags (const QStringList &tagFilters)
bool | removeItemFacesMap () const
| Remove Images Face Map tags from Picassa/Metadatagroup format.
bool | removeMetadataTemplate () const
bool | removeXmpTags (const QStringList &tagFilters)
bool | save (const QString &filePath, bool setVersion=false) const override
| Save all metadata to a file.
bool | setACDSeeTagsPath (const QStringList &tagsPath) const
bool | setCreatorContactInfo (const IptcCoreContactInfo &info) const
bool | setIccProfile (const IccProfile &profile)
| Sets the IccProfile embedded in the Exif metadata.
bool | setIptcCoreLocation (const IptcCoreLocationInfo &location) const
bool | setItemColorLabel (int colorId, const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | setItemComments (const CaptionsMap &comments, const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | setItemFacesMap (const QMultiMap< QString, QVariant > &facesPath, bool write, const QSize &size=QSize()) const
| Set Images Face Map tags in Picassa/Metadatagroup format.
bool | setItemHistory (const QString &imageHistoryXml) const
bool | setItemPickLabel (int pickId, const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | setItemRating (int rating, const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | setItemTagsPath (const QStringList &tagsPath, const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | setItemTitles (const CaptionsMap &title, const DMetadataSettingsContainer &settings=DMetadataSettings::instance() ->settings()) const
bool | setItemUniqueId (const QString &uuid) const
bool | setMetadataTemplate (const Template &t) const
void | setSettings (const MetaEngineSettingsContainer &settings)
Public Member Functions inherited from Digikam::MetaEngine
| MetaEngine ()
| Standard constructor.
| MetaEngine (const MetaEngineData &data)
| Constructor to load from parsed data.
| MetaEngine (const QString &filePath)
| Constructor to Load Metadata from item file.
virtual | ~MetaEngine ()
| Standard destructor.
MetaEngineData | data () const
void | setData (const MetaEngineData &data)
bool | loadFromData (const QByteArray &imgData)
| Load all metadata (Exif, Iptc, Xmp, and JFIF Comments) from a byte array.
bool | loadFromDataAndMerge (const QByteArray &imgData, const QStringList &exclude=QStringList())
| Load and merge metadata (Exif, Iptc and Xmp) from a byte array.
bool | isEmpty () const
| Return 'true' if metadata container in memory as no Comments, Exif, Iptc, and Xmp.
QSize | getPixelSize () const
| Returns the pixel size of the current item.
QString | getMimeType () const
| Returns the mime type of this item.
void | setReadWithExifTool (const bool on)
| Enable or disable reading metadata operations with ExifTool.
bool | readWithExifTool () const
| Return true if reading metadata operations with ExifTool is enabled.
void | setWriteWithExifTool (const bool on)
| Enable or disable writing metadata operations with ExifTool.
bool | writeWithExifTool () const
| Return true if writing metadata operations with ExifTool is enabled.
void | setWriteRawFiles (const bool on)
| Enable or disable writing metadata operations to RAW files.
bool | writeRawFiles () const
| Return true if writing metadata operations on RAW files is enabled.
void | setWriteDngFiles (const bool on)
| Enable or disable writing metadata operations to DNG files.
bool | writeDngFiles () const
| Return true if writing metadata operations on DNG files is enabled.
void | setUseXMPSidecar4Reading (const bool on)
| Enable or disable using XMP sidecar for reading metadata.
bool | useXMPSidecar4Reading () const
| Return true if using XMP sidecar for reading metadata is enabled.
void | setUseCompatibleFileName (const bool on)
| Enable or disable using compatible file name for sidecar files.
bool | useCompatibleFileName () const
| Return true if using compatible file name for sidecar files.
void | setMetadataWritingMode (const int mode)
| Set metadata writing mode.
int | metadataWritingMode () const
| Return the metadata writing mode.
void | setUpdateFileTimeStamp (bool on)
| Enable or disable file timestamp updating when metadata are saved.
bool | updateFileTimeStamp () const
| Return true if file timestamp is updated when metadata are saved.
bool | setItemProgramId (const QString &program, const QString &version) const
| Set Program name and program version in Exif and Iptc Metadata.
QSize | getItemDimensions () const
| Return the size of item in pixels using Exif tags.
bool | setItemDimensions (const QSize &size, bool setExifPixelXY=true) const
| Set the size of item in pixels in Exif tags.
MetaEngine::ImageOrientation | getItemOrientation () const
| Return the item orientation set in Exif metadata.
bool | setItemOrientation (ImageOrientation orientation) const
| Set the Exif orientation tag of item.
MetaEngine::ImageColorWorkSpace | getItemColorWorkSpace () const
| Return the item color-space set in Exif metadata.
bool | setItemColorWorkSpace (ImageColorWorkSpace workspace) const
| Set the Exif color-space tag of item.
QDateTime | getItemDateTime () const
| Return the time stamp of item.
bool | setImageDateTime (const QDateTime &dateTime, bool setDateTimeDigitized=false) const
| Set the Exif and Iptc time stamp.
QDateTime | getDigitizationDateTime (bool fallbackToCreationTime=false) const
| Return the digitization time stamp of the item.
bool | getItemPreview (QImage &preview) const
| Return a QImage copy of Iptc preview image.
bool | setItemPreview (const QImage &preview) const
| Set the Iptc preview image.
QByteArray | getItemIccProfile () const
| Get image ICC profile.
bool | setItemIccProfile (const QByteArray &iccData) const
| Set image ICC profile.
bool | initializeGPSInfo ()
| Make sure all static required GPS EXIF and XMP tags exist.
bool | getGPSInfo (double &altitude, double &latitude, double &longitude) const
| Get all GPS location information set in item.
QString | getGPSLatitudeString () const
| Get GPS location information set in the item, in the GPSCoordinate format as described in the XMP specification.
QString | getGPSLongitudeString () const
bool | 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 -).
bool | getGPSLongitudeNumber (double *const longitude) const
bool | getGPSAltitude (double *const altitude) const
| Get GPS altitude information, in meters, relative to sea level (positive sign above sea level)
bool | setGPSInfo (const double altitude, const double latitude, const double longitude)
| Set all GPS location information into item.
bool | setGPSInfo (const double *const altitude, const double latitude, const double longitude)
| Set all GPS location information into item.
bool | setGPSInfo (const double altitude, const QString &latitude, const QString &longitude)
| Set all GPS location information into item.
bool | removeGPSInfo ()
| Remove all Exif tags relevant of GPS location information.
void | setFilePath (const QString &path)
| Set the file path of current item.
QString | getFilePath () const
| Return the file path of current item.
bool | 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...).
bool | loadFromSidecarAndMerge (const QString &filePath)
| Load metadata from a sidecar file and merge.
bool | exportChanges (const QString &exvTmpFile) const
| Export metadata to a temporary EXV file container.
bool | hasComments () const
| Return 'true' if metadata container in memory as Comments.
bool | clearComments () const
| Clear the Comments metadata container in memory.
QByteArray | getComments () const
| Return a Qt byte array copy of Comments container get from current item.
QString | getCommentsDecoded () const
| Return a Qt string object of Comments from current item decoded using the 'detectEncodingAndDecode()' method.
bool | setComments (const QByteArray &data) const
| Set the Comments data using a Qt byte array.
TagsMap | getStdExifTagsList () const
| Return a map of all standard Exif tags supported by Exiv2.
TagsMap | getMakernoteTagsList () const
| Return a map of all non-standard Exif tags (makernotes) supported by Exiv2.
bool | hasExif () const
| Return 'true' if metadata container in memory as Exif.
bool | clearExif () const
| Clear the Exif metadata container in memory.
QByteArray | getExifEncoded (bool addExifHeader=false) const
| Returns the exif data encoded to a QByteArray in a form suitable for storage in a JPEG image.
bool | setExif (const QByteArray &data) const
| Set the Exif data using a Qt byte array.
QImage | getExifThumbnail (bool fixOrientation) const
| Return a QImage copy of Exif thumbnail image.
bool | rotateExifQImage (QImage &image, ImageOrientation orientation) const
| Fix orientation of a QImage image accordingly with Exif orientation tag.
bool | setExifThumbnail (const QImage &thumb) const
| Set the Exif Thumbnail image.
bool | removeExifThumbnail () const
| Remove the Exif Thumbnail from the item.
bool | setTiffThumbnail (const QImage &thumb) const
| Adds a JPEG thumbnail to a TIFF images.
QString | getExifComment (bool readDescription=true) const
| Return a QString copy of Exif user comments.
QString | getExifTagComment (const char *exifTagName) const
| Return a Exif tag comment like a string.
bool | setExifComment (const QString &comment, bool writeDescription=true) const
| Set the Exif user comments from item.
QString | getExifTagString (const char *exifTagName, bool escapeCR=true) const
| Get an Exif tags content like a string.
bool | setExifTagString (const char *exifTagName, const QString &value) const
| Set an Exif tag content using a string.
bool | getExifTagLong (const char *exifTagName, long &val) const
| Get an Exif tag content like a long value.
bool | getExifTagLong (const char *exifTagName, long &val, int component) const
| Get an Exif tag content like a long value.
bool | setExifTagLong (const char *exifTagName, long val) const
| Set an Exif tag content using a long value.
bool | setExifTagUShort (const char *exifTagName, unsigned int val) const
| Set an Exif tag content using a unsigned short value.
bool | 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.
bool | setExifTagRational (const char *exifTagName, long int num, long int den) const
| Set an Exif tag content using a rational value.
bool | setExifTagURational (const char *exifTagName, unsigned long int num, unsigned long int den) const
| Set an Exif tag content using a unsigned rational value.
QByteArray | getExifTagData (const char *exifTagName) const
| Get an Exif tag content like a bytes array.
bool | setExifTagData (const char *exifTagName, const QByteArray &data) const
| Set an Exif tag content using a bytes array.
QVariant | getExifTagVariant (const char *exifTagName, bool rationalAsListOfInts=true, bool escapeCR=true, int component=0) const
| Get an Exif tags content as a QVariant.
bool | setExifTagVariant (const char *exifTagName, const QVariant &data, bool rationalWantSmallDenominator=true) const
| Set an Exif tag content using a QVariant.
bool | removeExifTag (const char *exifTagName) const
| Remove the Exif tag 'exifTagName' from Exif metadata.
QString | getExifTagTitle (const char *exifTagName)
| Return the Exif Tag title or a null string.
QString | getExifTagDescription (const char *exifTagName)
| Return the Exif Tag description or a null string.
QString | 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).
MetaEngine::MetaDataMap | 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'.
MetaEngine::TagsMap | getIptcTagsList () const
| Return a map of all standard Iptc tags supported by Exiv2.
bool | hasIptc () const
| Return 'true' if metadata container in memory as Iptc.
bool | clearIptc () const
| Clear the Iptc metadata container in memory.
QByteArray | getIptc (bool addIrbHeader=false) const
| Return a Qt byte array copy of Iptc container get from current item.
bool | setIptc (const QByteArray &data) const
| Set the Iptc data using a Qt byte array.
QString | getIptcTagString (const char *iptcTagName, bool escapeCR=true) const
| Get an Iptc tag content like a string.
bool | setIptcTagString (const char *iptcTagName, const QString &value) const
| Set an Iptc tag content using a string.
QStringList | getIptcTagsStringList (const char *iptcTagName, bool escapeCR=true) const
| Returns a strings list with of multiple Iptc tags from the item.
bool | setIptcTagsStringList (const char *iptcTagName, int maxSize, const QStringList &oldValues, const QStringList &newValues) const
| Set multiple Iptc tags contents using a strings list.
QByteArray | getIptcTagData (const char *iptcTagName) const
| Get an Iptc tag content as a bytes array.
bool | setIptcTagData (const char *iptcTagName, const QByteArray &data) const
| Set an Iptc tag content using a bytes array.
bool | removeIptcTag (const char *iptcTagName) const
| Remove the all instance of Iptc tags 'iptcTagName' from Iptc metadata.
QString | getIptcTagTitle (const char *iptcTagName)
| Return the Iptc Tag title or a null string.
QString | getIptcTagDescription (const char *iptcTagName)
| Return the Iptc Tag description or a null string.
MetaEngine::MetaDataMap | 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'.
QStringList | getIptcKeywords () const
| Return a strings list of Iptc keywords from item.
bool | setIptcKeywords (const QStringList &oldKeywords, const QStringList &newKeywords) const
| Set Iptc keywords using a list of strings defined by 'newKeywords' parameter.
QStringList | getIptcSubjects () const
| Return a strings list of Iptc subjects from item.
bool | setIptcSubjects (const QStringList &oldSubjects, const QStringList &newSubjects) const
| Set Iptc subjects using a list of strings defined by 'newSubjects' parameter.
QStringList | getIptcSubCategories () const
| Return a strings list of Iptc sub-categories from item.
bool | setIptcSubCategories (const QStringList &oldSubCategories, const QStringList &newSubCategories) const
| Set Iptc sub-categories using a list of strings defined by 'newSubCategories' parameter.
MetaEngine::TagsMap | getXmpTagsList () const
| Return a map of all standard Xmp tags supported by Exiv2.
bool | hasXmp () const
| Return 'true' if metadata container in memory as Xmp.
bool | clearXmp () const
| Clear the Xmp metadata container in memory.
QByteArray | getXmp () const
| Return a Qt byte array copy of XMp container get from current item.
bool | setXmp (const QByteArray &data) const
| Set the Xmp data using a Qt byte array.
QString | getXmpTagString (const char *xmpTagName, bool escapeCR=true) const
| Get a Xmp tag content like a string.
bool | setXmpTagString (const char *xmpTagName, const QString &value) const
| Set a Xmp tag content using a string.
bool | setXmpTagString (const char *xmpTagName, const QString &value, XmpTagType type) const
| Set a Xmp tag with a specific type.
QString | getXmpTagTitle (const char *xmpTagName)
| Return the Xmp Tag title or a null string.
QString | getXmpTagDescription (const char *xmpTagName)
| Return the Xmp Tag description or a null string.
MetaEngine::MetaDataMap | 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'.
MetaEngine::AltLangMap | getXmpTagStringListLangAlt (const char *xmpTagName, bool escapeCR=true) const
| Get all redondant Alternative Language Xmp tags content like a map.
bool | setXmpTagStringListLangAlt (const char *xmpTagName, const MetaEngine::AltLangMap &values) const
| Set an Alternative Language Xmp tag content using a map.
QString | 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.
bool | setXmpTagStringLangAlt (const char *xmpTagName, const QString &value, const QString &langAlt) const
| Set a Xmp tag content using a string with an alternative language header.
QStringList | getXmpTagStringSeq (const char *xmpTagName, bool escapeCR=true) const
| Get a Xmp tag content like a sequence of strings.
bool | setXmpTagStringSeq (const char *xmpTagName, const QStringList &seq) const
| Set a Xmp tag content using the sequence of strings 'seq'.
QStringList | getXmpTagStringBag (const char *xmpTagName, bool escapeCR) const
| Get a Xmp tag content like a bag of strings.
bool | setXmpTagStringBag (const char *xmpTagName, const QStringList &bag) const
| Set a Xmp tag content using the bag of strings 'bag'.
bool | addToXmpTagStringBag (const char *xmpTagName, const QStringList &entriesToAdd) const
| Set an Xmp tag content using a list of strings defined by the 'entriesToAdd' parameter.
bool | removeFromXmpTagStringBag (const char *xmpTagName, const QStringList &entriesToRemove) const
| Remove those Xmp tag entries that are listed in entriesToRemove from the entries in metadata.
QVariant | getXmpTagVariant (const char *xmpTagName, bool rationalAsListOfInts=true, bool stringEscapeCR=true) const
| Get an Xmp tag content as a QVariant.
QStringList | getXmpKeywords () const
| Return a strings list of Xmp keywords from item.
bool | setXmpKeywords (const QStringList &newKeywords) const
| Set Xmp keywords using a list of strings defined by 'newKeywords' parameter.
bool | removeXmpKeywords (const QStringList &keywordsToRemove)
| Remove those Xmp keywords that are listed in keywordsToRemove from the keywords in metadata.
QStringList | getXmpSubjects () const
| Return a strings list of Xmp subjects from item.
bool | setXmpSubjects (const QStringList &newSubjects) const
| Set Xmp subjects using a list of strings defined by 'newSubjects' parameter.
bool | removeXmpSubjects (const QStringList &subjectsToRemove)
| Remove those Xmp subjects that are listed in subjectsToRemove from the subjects in metadata.
QStringList | getXmpSubCategories () const
| Return a strings list of Xmp sub-categories from item.
bool | setXmpSubCategories (const QStringList &newSubCategories) const
| Set Xmp sub-categories using a list of strings defined by 'newSubCategories' parameter.
bool | removeXmpSubCategories (const QStringList &categoriesToRemove)
| Remove those Xmp sub-categories that are listed in categoriesToRemove from the sub-categories in metadata.
bool | removeXmpTag (const char *xmpTagName, bool family=false) const
| Remove the Xmp tag 'xmpTagName' from Xmp metadata.

## Static Public Member Functions
static double | apexApertureToFNumber (double aperture)
static double | apexShutterSpeedToExposureTime (double shutterSpeed)
static CountryCodeMap | countryCodeMap ()
| Return a map of ISO-639-1 2 letters country codes with country names.
static CountryCodeMap | countryCodeMap2 ()
| Return a map of ISO-639-2 3 letters country codes with country names.
static QMap< int, QString > | possibleValuesForEnumField (MetadataInfo::Field field)
| Returns a map of possible enum values and their user-presentable, i18n'ed representation.
static MetaEngine::AltLangMap | toAltLangMap (const QVariant &var)
static QStringList | valuesToString (const QVariantList &list, const MetadataFields &fields)
static QString | valueToString (const QVariant &value, MetadataInfo::Field field)
| Convert a QVariant value of the specified field to a user-presentable, i18n'ed string.
static QString | videoColorModelToString (VIDEOCOLORMODEL videoColorModel)
| Helper method to translate enum values to user presentable strings.
Static Public Member Functions inherited from Digikam::MetaEngine
static bool | initializeExiv2 ()
| Return true if Exiv2 library initialization is done properly.
static bool | supportXmp ()
| Return true if Exiv2 library is compiled with Xmp metadata support.
static bool | supportJpegXL ()
| Return true if Exiv2 library is compiled with JpegXL metadata support.
static bool | supportBmff ()
| Return true if library support Base Media File Format (aka CR3, HEIF, HEIC, and AVIF).
static bool | supportMetadataWriting (const QString &typeMime)
| Return true if library can write metadata to typeMime file format.
static QString | Exiv2Version ()
| Return a string version of Exiv2 release in format "major.minor.patch".
static void | convertToRational (const double number, long int *const numerator, long int *const denominator, const int rounding)
| This method converts 'number' to a rational value, returned in the 'numerator' and 'denominator' parameters.
static void | convertToRationalSmallDenominator (const double number, long int *const numerator, long int *const denominator)
| This method convert a 'number' to a rational value, returned in 'numerator' and 'denominator' parameters.
static double | convertDegreeAngleToDouble (double degrees, double minutes, double seconds)
| Converts degrees values as a double representation.
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)
| 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".
static QString | convertToGPSCoordinateString (const bool isLatitude, double coordinate)
| Converts a GPS position stored as double floating point number in degrees to the form described as GPSCoordinate in the XMP specification.
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)
| Converts a GPSCoordinate string as defined by XMP to three rationals and the direction reference.
static bool | convertFromGPSCoordinateString (const QString &gpsString, double *const coordinate)
| 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 -).
static bool | convertToUserPresentableNumbers (const QString &coordinate, int *const degrees, int *const minutes, double *const seconds, char *const directionReference)
| 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')
static void | convertToUserPresentableNumbers (const bool isLatitude, double coordinate, int *const degrees, int *const minutes, double *const seconds, char *const directionReference)
| 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').
static QString | sidecarFilePathForFile (const QString &path)
| Return the XMP Sidecar file path for a item file path.
static QString | sidecarPath (const QString &path)
| Like sidecarFilePathForFile(), but works for local file path.
static QUrl | sidecarUrl (const QUrl &url)
| Like sidecarFilePathForFile(), but works for remote URLs.
static QUrl | sidecarUrl (const QString &path)
| Gives a file url for a local path.
static bool | hasSidecar (const QString &path)
| Performs a QFileInfo based check if the given local file has a sidecar.
static QString | backendName (Backend t)
| Return a string of backend name used to parse metadata from file.
static bool | canWriteComment (const QString &filePath)
| Return 'true' if Comments can be written in file.
static QString | detectLanguageAlt (const QString &value, QString &lang)
| Language Alternative autodetection.
static bool | canWriteExif (const QString &filePath)
| Return 'true' if Exif can be written in file.
static bool | canWriteIptc (const QString &filePath)
| Return 'true' if Iptc can be written in file.
static bool | canWriteXmp (const QString &filePath)
| Return 'true' if Xmp can be written in file.
static bool | registerXmpNameSpace (const QString &uri, const QString &prefix)
| Register a namespace which Exiv2 doesn't know yet.
static bool | unregisterXmpNameSpace (const QString &uri)
| Unregister a previously registered custom namespace.

## Additional Inherited Members
Protected Member Functions inherited from Digikam::MetaEngine
bool | setProgramId () const
| Set the Program Name and Program Version information in Exif and Iptc metadata.

## Member Enumeration Documentation

## ◆ VIDEOCOLORMODEL

enum Digikam::DMetadata::VIDEOCOLORMODEL

These values are stored in DB as Image color model properties (extension of DImg::ColorModel)

## Member Function Documentation

## ◆ applyChanges()

bool Digikam::DMetadata::applyChanges | ( | bool | setVersion = `false` | ) | const
| overridevirtual

Return true if metadata have been saved into file.

Reimplemented from Digikam::MetaEngine.

## ◆ getCopyrightInformation()

bool Digikam::DMetadata::getCopyrightInformation | ( | Template & | t | ) | const

Use getMetadataTemplate() usually. Returns true if valid fields were read.

## ◆ getIccProfile()

IccProfile Digikam::DMetadata::getIccProfile | ( |  | ) | const

This method does not retrieve profiles embedded in the image but from the Exif metadata, e.g. embedded profiles in JPEG images. Returns a null profile if no profile is found.

## ◆ getItemFacesMap()

bool Digikam::DMetadata::getItemFacesMap | ( | QMultiMap< QString, QVariant > & | facesPath | ) | const

Read face tags only if Exiv2 can write them, otherwise garbage tags will be generated on image transformation

## ◆ getLensDescription()

QString Digikam::DMetadata::getLensDescription | ( |  | ) | const

There no standard Exif tag for Lens information. Camera makernotes and Xmp tags are parsed. Take a care : lens information are not standardized and string content is not homogeneous between camera model/maker.

< Canon Cameras Makernote.

< Canon Cameras Makernote.

< Alternative Canon Cameras Makernote.

< Nikon Cameras Makernote.

< Nikon Cameras Makernote.

< Nikon Cameras Makernote.

< Nikon Cameras Makernote.

< Minolta Cameras Makernote.

< Sony Cameras Makernote.

< Sony Cameras Makernote.

< Sony Cameras Makernote.

< Pentax Cameras Makernote.

< Pentax Cameras Makernote.

< Panasonic Cameras Makernote.

< Panasonic Cameras Makernote.

< Sigma Cameras Makernote.

< Samsung Cameras Makernote.

< Non-standard Exif tag set by Camera Raw.

< Olympus Cameras Makernote.

< Olympus Cameras Makernote.

## ◆ getMetadataField()

QVariant Digikam::DMetadata::getMetadataField | ( | MetadataInfo::Field | field | ) | const

See metadatainfo.h for a specification of the format of the QVariant.

## ◆ load()

bool Digikam::DMetadata::load | ( | const QString & | filePath,
|  | bool | videoAll = `false`,
|  | Backend * | backend = `nullptr`
| ) |  |

If backend is non null, return the backend used to populate metadata (Exiv2). See MetaEngine::Backend enum for details.

## ◆ mSecTimeStamp()

bool Digikam::DMetadata::mSecTimeStamp | ( | const char *const | exifTagName,
|  | int & | ms
| ) |  | const

Returns true if data are extracted.

## ◆ possibleValuesForEnumField()

QMap< int, QString > Digikam::DMetadata::possibleValuesForEnumField | ( | MetadataInfo::Field | field | ) |
| static

Valid fields are those which are described as "enum from" or "bit mask from" in metadatainfo.h.

Int, enum from libMetaEngine

Int, enum from Exif

Int, enum from Exif

Int, enum from Exif

Int, enum from Exif

int, enum from Exif

Int, bit mask from Exif

## ◆ save()

bool Digikam::DMetadata::save | ( | const QString & | filePath,
|  | bool | setVersion = `false`
| ) |  | const
| overridevirtual

This one can be different than original picture to perform transfer operation Return true if metadata have been saved into file.

Reimplemented from Digikam::MetaEngine.

## ◆ setItemFacesMap()

bool Digikam::DMetadata::setItemFacesMap | ( | const QMultiMap< QString, QVariant > & | facesPath,
|  | bool | write,
|  | const QSize & | size = `QSize()`
| ) |  | const

Parameters

  facesPath | The face map to register in metadata based on tags stored in Picassa/Metadatagroup
  write | If true all faces will be written, else update mode search if at least a face tag exist and write if true.
  size | The size of the area grouping all faces in image.

## ◆ valueToString()

QString Digikam::DMetadata::valueToString | ( | const QVariant & | value,
|  | MetadataInfo::Field | field
| ) |  |
| static

The QVariant must be of the type as specified in metadatainfo.h and as obtained by getMetadataField.