mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-05-25 13:08:28 -04:00
EXIF improvements and bugfixes
- Fixes a writing issue for float values less than 1 - Fixes a missing definition of `EXIF_DATETIMEDIGITIZED` tag - Adds support for some common camera shot metadata - Adds missing metadata to writing tests The following plugins automatically gain support for the new metadata: AVIF, IFF, HEIF, JXL, JXR, PSD and TGA (V2E). The new metadata added with this patch is usually saved by smartphones (e.g. iPhone or Google Pixel).
This commit is contained in:
@@ -13,14 +13,18 @@
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-02-14T15:58:44+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "Software" ,
|
||||
"value" : "Adobe Photoshop 26.2 (Windows)"
|
||||
},
|
||||
{
|
||||
"key" : "Altitude",
|
||||
"value" : "34"
|
||||
},
|
||||
{
|
||||
"key" : "Title",
|
||||
"value" : "A test"
|
||||
},
|
||||
{
|
||||
"key" : "Software",
|
||||
"value" : "KImageFormats write test"
|
||||
},
|
||||
{
|
||||
"key" : "Author",
|
||||
"value" : "KDE Project"
|
||||
@@ -45,6 +49,10 @@
|
||||
"key" : "LensModel",
|
||||
"value" : "A1234"
|
||||
},
|
||||
{
|
||||
"key" : "LensSerialNumber",
|
||||
"value" : "S/N:1234567"
|
||||
},
|
||||
{
|
||||
"key" : "Longitude",
|
||||
"value" : "10.9254"
|
||||
@@ -56,6 +64,50 @@
|
||||
{
|
||||
"key" : "Model",
|
||||
"value" : "KImageFormats"
|
||||
},
|
||||
{
|
||||
"key" : "SerialNumber",
|
||||
"value" : "S/N:7654321"
|
||||
},
|
||||
{
|
||||
"key" : "Speed",
|
||||
"value" : "13.2"
|
||||
},
|
||||
{
|
||||
"key" : "DigitalZoomRatio",
|
||||
"value" : "3.4"
|
||||
},
|
||||
{
|
||||
"key" : "ExposureMode",
|
||||
"value" : "2"
|
||||
},
|
||||
{
|
||||
"key" : "ExposureProgram",
|
||||
"value" : "6"
|
||||
},
|
||||
{
|
||||
"key" : "ExposureTime",
|
||||
"value" : "0.004"
|
||||
},
|
||||
{
|
||||
"key" : "Flash",
|
||||
"value" : "16"
|
||||
},
|
||||
{
|
||||
"key" : "FNumber",
|
||||
"value" : "1.6"
|
||||
},
|
||||
{
|
||||
"key" : "FocalLength",
|
||||
"value" : "5.96"
|
||||
},
|
||||
{
|
||||
"key" : "ISOSpeedRatings",
|
||||
"value" : "50"
|
||||
},
|
||||
{
|
||||
"key" : "WhiteBalance",
|
||||
"value" : "1"
|
||||
}
|
||||
],
|
||||
"resolution" : {
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
"key" : "LensModel",
|
||||
"value" : "A1234"
|
||||
},
|
||||
{
|
||||
"key" : "LensSerialNumber",
|
||||
"value" : "S/N:1234567"
|
||||
},
|
||||
{
|
||||
"key" : "Longitude",
|
||||
"value" : "10.9254"
|
||||
@@ -52,6 +56,50 @@
|
||||
{
|
||||
"key" : "Model",
|
||||
"value" : "KImageFormats"
|
||||
},
|
||||
{
|
||||
"key" : "SerialNumber",
|
||||
"value" : "S/N:7654321"
|
||||
},
|
||||
{
|
||||
"key" : "Speed",
|
||||
"value" : "13.2"
|
||||
},
|
||||
{
|
||||
"key" : "DigitalZoomRatio",
|
||||
"value" : "3.4"
|
||||
},
|
||||
{
|
||||
"key" : "ExposureMode",
|
||||
"value" : "2"
|
||||
},
|
||||
{
|
||||
"key" : "ExposureProgram",
|
||||
"value" : "6"
|
||||
},
|
||||
{
|
||||
"key" : "ExposureTime",
|
||||
"value" : "0.004"
|
||||
},
|
||||
{
|
||||
"key" : "Flash",
|
||||
"value" : "16"
|
||||
},
|
||||
{
|
||||
"key" : "FNumber",
|
||||
"value" : "1.6"
|
||||
},
|
||||
{
|
||||
"key" : "FocalLength",
|
||||
"value" : "5.96"
|
||||
},
|
||||
{
|
||||
"key" : "ISOSpeedRatings",
|
||||
"value" : "50"
|
||||
},
|
||||
{
|
||||
"key" : "WhiteBalance",
|
||||
"value" : "1"
|
||||
}
|
||||
],
|
||||
"resolution" : {
|
||||
|
||||
@@ -62,7 +62,7 @@ void setOptionalInfo(QImage &image, const QString &suffix)
|
||||
|
||||
// Set metadata
|
||||
auto meta = obj.value("metadata").toArray();
|
||||
for (auto jv : meta) {
|
||||
for (auto &&jv : meta) {
|
||||
auto obj = jv.toObject();
|
||||
auto key = obj.value("key").toString();
|
||||
auto val = obj.value("value").toString();
|
||||
@@ -106,7 +106,7 @@ bool checkOptionalInfo(QImage &image, const QString &suffix)
|
||||
|
||||
// Test metadata
|
||||
auto meta = obj.value("metadata").toArray();
|
||||
for (auto jv : meta) {
|
||||
for (auto &&jv : meta) {
|
||||
auto obj = jv.toObject();
|
||||
auto key = obj.value("key").toString();
|
||||
auto val = obj.value("value").toString();
|
||||
|
||||
Reference in New Issue
Block a user