本文整理汇总了C++中DMetadata::setImageFacesMap方法的典型用法代码示例。如果您正苦于以下问题:C++ DMetadata::setImageFacesMap方法的具体用法?C++ DMetadata::setImageFacesMap怎么用?C++ DMetadata::setImageFacesMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DMetadata
的用法示例。
在下文中一共展示了DMetadata::setImageFacesMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
bool MetadataHub::write(DMetadata& metadata, WriteComponent writeMode, const MetadataSettingsContainer& settings)
{
applyChangeNotifications();
bool dirty = false;
metadata.setSettings(settings);
// find out in advance if we have something to write - needed for FullWriteIfChanged mode
bool saveTitle = (settings.saveComments && (d->titlesStatus == MetadataAvailable) && writeMode.testFlag(WRITE_TITLE));
bool saveComment = (settings.saveComments && (d->commentsStatus == MetadataAvailable) && writeMode.testFlag(WRITE_COMMENTS));
bool saveDateTime = (settings.saveDateTime && (d->dateTimeStatus == MetadataAvailable) && writeMode.testFlag(WRITE_DATETIME));
bool savePickLabel = (settings.savePickLabel && (d->pickLabelStatus == MetadataAvailable) && writeMode.testFlag(WRITE_PICKLABEL));
bool saveColorLabel = (settings.saveColorLabel && (d->colorLabelStatus == MetadataAvailable) && writeMode.testFlag(WRITE_COLORLABEL));
bool saveRating = (settings.saveRating && (d->ratingStatus == MetadataAvailable) && writeMode.testFlag(WRITE_RATING));
bool saveTemplate = (settings.saveTemplate && (d->templateStatus == MetadataAvailable) && writeMode.testFlag(WRITE_TEMPLATE));
bool saveTags = settings.saveTags && writeMode.testFlag(WRITE_TAGS);
bool saveFaces = settings.saveFaceTags && writeMode.testFlag((WRITE_TAGS));
if (saveTitle)
{
// Store titles in image as Iptc Object name and Xmp.
dirty |= metadata.setImageTitles(d->titles);
}
if (saveComment)
{
// Store comments in image as JFIF comments, Exif comments, Iptc Caption, and Xmp.
dirty |= metadata.setImageComments(d->comments);
}
if (saveDateTime)
{
// Store Image Date & Time as Exif and Iptc tags.
dirty |= metadata.setImageDateTime(d->dateTime, false);
}
if (savePickLabel)
{
// Store Image Pick Label as XMP tag.
dirty |= metadata.setImagePickLabel(d->pickLabel);
}
if (saveColorLabel)
{
// Store Image Color Label as XMP tag.
dirty |= metadata.setImageColorLabel(d->colorLabel);
}
if (saveRating)
{
// Store Image rating as Iptc tag.
dirty |= metadata.setImageRating(d->rating);
}
if (saveTemplate)
{
QString title = d->metadataTemplate.templateTitle();
if (title == Template::removeTemplateTitle())
{
dirty |= metadata.removeMetadataTemplate();
}
else if (title.isEmpty())
{
// Nothing to do.
}
else
{
// Store metadata template as XMP tag.
dirty |= metadata.removeMetadataTemplate();
dirty |= metadata.setMetadataTemplate(d->metadataTemplate);
}
}
dirty |= metadata.setImageFacesMap(d->faceTagsList,saveFaces);
dirty |= writeTags(metadata,saveTags);
return dirty;
}