mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-14 02:54:19 -04:00
JXR: added support to EXIF metadata
Improved metadata support via EXIF metadata. Since JXR is based on a TIFF container, EXIF data is read directly from the file so it always works (even with versions of libjxr that don't have the metadata reading API). It also solves the following issues: - Incorrect date format on saved JXR files (was saved in ISO format instead of `yyyy:MM:dd HH:mm:ss`). - Incorrect date type setting in EXIF data: the `DateTime` tag should be updated on every save (verified by GIMP and Photoshop). Our `CreationDate` metadata is the equivalent of the EXIF `DateTimeOriginal` tag. Closes #22
This commit is contained in:
committed by
Albert Astals Cid
parent
90d4256f3d
commit
e5cf9caac5
@ -3,7 +3,7 @@
|
||||
"fileName" : "metadata.png",
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "CreationDate",
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-02-19T08:27:22+01:00"
|
||||
},
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
"fileName" : "gimp_exif.png",
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "CreationDate",
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-01-05T10:18:16"
|
||||
},
|
||||
{
|
||||
|
BIN
autotests/read/jxr/metadata.jxr
Normal file
BIN
autotests/read/jxr/metadata.jxr
Normal file
Binary file not shown.
59
autotests/read/jxr/metadata.jxr.json
Normal file
59
autotests/read/jxr/metadata.jxr.json
Normal file
@ -0,0 +1,59 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "metadata.png",
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "CreationDate",
|
||||
"value" : "2025-01-14T10:34:51Z"
|
||||
},
|
||||
{
|
||||
"key" : "Software" ,
|
||||
"value" : "LIFE Pro 2.18.10"
|
||||
},
|
||||
{
|
||||
"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" : 5906
|
||||
}
|
||||
}
|
||||
]
|
BIN
autotests/read/jxr/metadata.png
Normal file
BIN
autotests/read/jxr/metadata.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -8,7 +8,7 @@
|
||||
},
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "CreationDate",
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2022-11-11T14:27:52"
|
||||
},
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
},
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "CreationDate",
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2022-11-11T14:27:39"
|
||||
},
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
"fileName" : "metadata.png",
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "CreationDate",
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-01-14T13:53:32+01:00"
|
||||
},
|
||||
{
|
||||
|
@ -5,6 +5,10 @@
|
||||
"key" : "CreationDate",
|
||||
"value" : "2025-01-14T13:53:32+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-02-14T15:58:44+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "Software" ,
|
||||
"value" : "Adobe Photoshop 26.2 (Windows)"
|
||||
|
@ -5,6 +5,10 @@
|
||||
"key" : "CreationDate",
|
||||
"value" : "2025-01-14T13:53:32+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-02-14T15:58:44+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "Software" ,
|
||||
"value" : "Adobe Photoshop 26.2 (Windows)"
|
||||
|
@ -5,6 +5,14 @@
|
||||
"key" : "CreationDate",
|
||||
"value" : "2025-01-14T13:53:32+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-02-14T15:58:44+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "Altitude",
|
||||
"value" : "34"
|
||||
},
|
||||
{
|
||||
"key" : "Author",
|
||||
"value" : "KDE Project"
|
||||
@ -17,6 +25,22 @@
|
||||
"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"
|
||||
|
Reference in New Issue
Block a user