feat: add exif copyright info and gif frame count to property dialog

also fix some letter case issue in original copywriting.
This commit is contained in:
Gary Wang
2021-04-17 00:25:19 +08:00
parent fa4b49ddf7
commit 6acafc77b4
11 changed files with 1083 additions and 895 deletions

View File

@ -43,7 +43,11 @@ void MetadataModel::setFile(const QString &imageFilePath)
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.Dimensions"),
tr("Dimensions"), imageDimensionsString);
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.SizeRatio"),
tr("Aspect Ratio"), imageRatioString);
tr("Aspect ratio"), imageRatioString);
if (imgReader.supportsAnimation() && imgReader.imageCount() > 1) {
appendProperty(QStringLiteral("Image"), QStringLiteral("Image.FrameCount"),
tr("Frame count"), QString::number(imgReader.imageCount()));
}
appendProperty(QStringLiteral("File"), QStringLiteral("File.Name"),
tr("Name"), fileInfo.fileName());
@ -54,9 +58,9 @@ void MetadataModel::setFile(const QString &imageFilePath)
appendProperty(QStringLiteral("File"), QStringLiteral("File.Size"),
tr("Size"), sizeString);
appendProperty(QStringLiteral("File"), QStringLiteral("File.CreatedTime"),
tr("Date Created"), birthTimeString);
tr("Date created"), birthTimeString);
appendProperty(QStringLiteral("File"), QStringLiteral("File.LastModified"),
tr("Date Modified"), lastModifiedTimeString);
tr("Date modified"), lastModifiedTimeString);
Exiv2Wrapper wrapper;
if (wrapper.load(imageFilePath)) {
@ -73,6 +77,8 @@ void MetadataModel::setFile(const QString &imageFilePath)
QStringLiteral("Exif.Photo.DateTimeOriginal"), tr("Date taken"));
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
QStringLiteral("Exif.Image.Software"), tr("Program name"));
appendExivPropertyIfExist(wrapper, QStringLiteral("Origin"),
QStringLiteral("Exif.Image.Copyright"), tr("Copyright"));
appendExivPropertyIfExist(wrapper, QStringLiteral("Image"),
QStringLiteral("Exif.Image.XResolution"), tr("Horizontal resolution"));