mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-02-19 07:03:01 -05:00
Use of metadata macro definitions
Replaced the metadata string with the common macro definition
This commit is contained in:
committed by
Albert Astals Cid
parent
cb5ca7fc48
commit
7499e3b8d4
@ -690,29 +690,29 @@ bool LoadRAW(QImageIOHandler *handler, QImage &img)
|
||||
xmpPacket = QString::fromUtf8(xmpdata, xmplen);
|
||||
}
|
||||
// Add info from LibRAW structs (e.g. GPS position, info about lens, info about shot and flash, etc...)
|
||||
img.setText(QStringLiteral("XML:com.adobe.xmp"), updateXmpPacket(xmpPacket, rawProcessor.get()));
|
||||
img.setText(QStringLiteral(META_KEY_XMP_ADOBE), updateXmpPacket(xmpPacket, rawProcessor.get()));
|
||||
|
||||
auto model = QString::fromUtf8(iparams.normalized_model);
|
||||
if (!model.isEmpty()) {
|
||||
img.setText(QStringLiteral("Model"), model);
|
||||
img.setText(QStringLiteral(META_KEY_MODEL), model);
|
||||
}
|
||||
auto manufacturer = QString::fromUtf8(iparams.normalized_make);
|
||||
if (!manufacturer.isEmpty()) {
|
||||
img.setText(QStringLiteral("Manufacturer"), manufacturer);
|
||||
img.setText(QStringLiteral(META_KEY_MANUFACTURER), manufacturer);
|
||||
}
|
||||
auto software = QString::fromUtf8(iparams.software);
|
||||
if (!software.isEmpty()) {
|
||||
img.setText(QStringLiteral("Software"), software);
|
||||
img.setText(QStringLiteral(META_KEY_SOFTWARE), software);
|
||||
}
|
||||
|
||||
auto &&iother = rawProcessor->imgdata.other;
|
||||
auto description = QString::fromUtf8(iother.desc);
|
||||
if (!description.isEmpty()) {
|
||||
img.setText(QStringLiteral("Description"), description);
|
||||
img.setText(QStringLiteral(META_KEY_DESCRIPTION), description);
|
||||
}
|
||||
auto artist = QString::fromUtf8(iother.artist);
|
||||
if (!artist.isEmpty()) {
|
||||
img.setText(QStringLiteral("Author"), artist);
|
||||
img.setText(QStringLiteral(META_KEY_AUTHOR), artist);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user