PSD: added support to EXIF metadata

This commit is contained in:
Mirco Miranda
2025-01-15 08:41:10 +01:00
committed by Albert Astals Cid
parent a89367dde6
commit ac3591c7ea
9 changed files with 124 additions and 10 deletions

View File

@ -3,12 +3,12 @@
"fileName" : "gimp_exif.png",
"metadata" : [
{
"Key" : "CreationDate",
"Value" : "2025-01-05T10:18:16"
"key" : "CreationDate",
"value" : "2025-01-05T10:18:16"
},
{
"Key" : "Software" ,
"Value" : "GIMP 3.0.0-RC2"
"key" : "Software" ,
"value" : "GIMP 3.0.0-RC2"
}
],
"resolution" : {

View File

@ -1,7 +1,21 @@
[
{
"minQtVersion" : "6.8.0",
"fileName" : "mch-16bits_qt_6_8.tif"
"fileName" : "mch-16bits_qt_6_8.tif",
"resolution" : {
"dotsPerMeterX" : 4685,
"dotsPerMeterY" : 4685
},
"metadata" : [
{
"key" : "CreationDate",
"value" : "2022-11-11T14:27:52"
},
{
"key" : "Software",
"value" : "Adobe Photoshop 24.0 (Windows)"
}
]
},
{
"minQtVersion" : "6.0.0",

View File

@ -1,7 +1,21 @@
[
{
"minQtVersion" : "6.8.0",
"fileName" : "mch-8bits_qt_6.8.tif"
"fileName" : "mch-8bits_qt_6.8.tif",
"resolution" : {
"dotsPerMeterX" : 4685,
"dotsPerMeterY" : 4685
},
"metadata" : [
{
"key" : "CreationDate",
"value" : "2022-11-11T14:27:39"
},
{
"key" : "Software",
"value" : "Adobe Photoshop 24.0 (Windows)"
}
]
},
{
"minQtVersion" : "6.0.0",

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

View File

@ -0,0 +1,59 @@
[
{
"fileName" : "metadata.png",
"metadata" : [
{
"key" : "CreationDate",
"value" : "2025-01-14T13:53:32+01:00"
},
{
"key" : "Software" ,
"value" : "Adobe Photoshop 26.2 (Windows)"
},
{
"key" : "Altitude",
"value" : "34"
},
{
"key" : "Author",
"value" : "KDE Project"
},
{
"key" : "Copyright",
"value" : "@2025 KDE Project"
},
{
"key" : "Description",
"value" : "TV broadcast test image."
},
{
"key" : "Latitude",
"value" : "44.6478"
},
{
"key" : "LensManufacturer",
"value" : "KDE Glasses"
},
{
"key" : "LensModel",
"value" : "A1234"
},
{
"key" : "Longitude",
"value" : "10.9254"
},
{
"key" : "Manufacturer",
"value" : "KFramework"
},
{
"key" : "Model",
"value" : "KImageFormats"
}
],
"resolution" : {
"dotsPerMeterX" : 11811,
"dotsPerMeterY" : 11811
}
}
]

View File

@ -114,8 +114,8 @@ bool TemplateImage::checkOptionaInfo(const QImage& image, QString& error) const
auto meta = obj.value("metadata").toArray();
for (auto jv : meta) {
auto obj = jv.toObject();
auto key = obj.value("Key").toString();
auto val = obj.value("Value").toString();
auto key = obj.value("key").toString();
auto val = obj.value("value").toString();
auto cur = image.text(key);
if (cur != val) {
error = QStringLiteral("Metadata '%1' mismatch (current: '%2', expected:'%3')!").arg(key, cur, val);