Created attachment 127953 [details] Proposal (metadata editor) SUMMARY The title sums it up. I have given it a bit of thought, and I think there is a bit of confusion between the function of two Exif fields and how they are used in digikam: - Exif.Image.DateTime (In digikam as "Creation date and time): The date and time of image creation. In Exif standard, it is the date and time the file was changed. - Exif.Image.DateTimeOriginal (In digikam as "Original date and time"): The date and time when the original image data was generated. In practical terms, the first one (DateTime) is used as a "Modification date" in many picture managers (e.g. Picasa), and is usually overwritten automatically when a picture is edited. The second one (DateTimeOriginal) is usually where digital cameras store the date, and is normally left intact by picture managers unless edited in purpose by the user. However, in digikam, the first is treated as the second. And in the interface ("Metadata Editor" and "Adjust time date" tool), it is not clear what is the function of each field (one is "creation" and the other is "original"?). So, I have a proposal in order to make things less ambiguous to users and improve compatibility: Treat 'Exif.Image.DateTimeOriginal' as the equivalent of 'XMP Creation date' and 'IPTC Creation date'. Allow syncing between these three fields (see attachment), and treat 'Exif.Image.DateTime' as a "Modification date" (even renaming it in the editor). I have attached of how the Metadata editor would look in the case. What do you think? Thanks for your time. PS: You can check the official definitions for each field in http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf and https://www.exiv2.org/tags.html
The whole thing is very complex. The tag "Exif.Image.DateTimeOriginal" is not used by digiKam at all. From the Exif.image date section we only use "Exif.Image.DateTime" and only as a third possibility to find a date, because it is not present in digital camera images. The creation date in the DB is mostly from "Exif.Photo.DateTimeOriginal". And this is also the "original" in the metadata editor. The digitization date in the metadata editor is "Exif.Photo.DateTimeDigitized". Yes, the creation date in the metadata editor is "Exif.Image.DateTime". Problem, we have a date from "Exif.Image.DateTime", although it is not in the image because Exiv2 is mapping and gives us a different date. I would have to look for the mapping table at Exiv2. Which date should digiKam never change? "Exif.Photo.DateTimeOriginal" ??? Maik
Created attachment 127959 [details] Metadata editor and browser equivalencies Ok, sorry, you are right, it's probably Exif.Photo.DateTimeOriginal instead of Exif.Image.DateTimeOriginal. I have no way to see the exact tag name in digikam. But the rest still applies. It's actually much simpler than it looks. Basically Exif.Photo.DateTime gets overwritten in most other picture managers as soon as you do something to the picture. It's treated as a "Modification date". The true "Creation date" should be Exif.Photo.DateTimeOriginal. In Digikam's interface (Metadata editor basically) these two are swapped. And the "Sync XMP creation date" and "Sync IPTC creation date" checkboxes in the metadata editor, should sync Exif.Photo.DateTimeOriginal, not Exif.Photo.DateTime. To sum up: Current situation: (no equivalent) = Xmp.xmp.ModifyDate Exif.Photo.DateTime = Xmp.xmp.CreateDate Exif.Photo.DateTimeOriginal = (no equivalent) Ideally: Exif.Photo.DateTime = Xmp.xmp.ModifyDate Exif.Photo.DateTimeOriginal = Xmp.xmp.CreateDate
Ok, now I see that, in the last comment, every time I said Exif.Photo.DateTime it should read Exif.Image.DateTime. The rest are correct.
Here is Exiv2's conversion table: https://www.exiv2.org/conversion.html Exif.Image.DateTime <=> Xmp.xmp.ModifyDate Exif.Photo.DateTimeOriginal <=> Xmp.photoshop.DateCreated (deviation) I will not make any changes here for the digiKam-7.0.0. I don't want to make any changes in the release candidate that could lead to errors and long discussions. The code from the metadata editor for the date changes is quite old and we actually don't have any bug reports. I need sample images that were processed with Photoshop in the before and after comparison. Maik
Oh, I didn't know there was an official conversion table. That "Xmp.photoshop.DateCreated" seems weird. And it links Xmp.xmp.CreateDate to the Exif.Photo.DateTimeDigitized... Ok, fair enough. I'll try to process some pictures using several picture editors/managers, and report back.
I have edited an empty JPG picture (without any metadata) and used several photo editing/browsing software to change the date (to 31-Jan-1997): Adobe Photoshop 21.0.3 Adobe Lightroom CC 2019 Picasa 3.9 ACDSee Photo Studio Ultimate 2020 Microsoft Photos (2020.19111.24110.0) Shotwell (0.30.8-0ubuntu2) I have attached the resulting pictures to this bug report.
Created attachment 128885 [details] base image (no metadata)
Created attachment 128886 [details] base image (Adobe Photoshop)
Created attachment 128887 [details] base image (Adobe Lightroom)
Created attachment 128888 [details] base image (Picasa)
Created attachment 128889 [details] base image (Microsoft Photos)
Created attachment 128890 [details] base image (ACDSee)
Created attachment 128891 [details] base image (Shotwell)
And here's the content of the metadata for each of the files (using the "exiv2 -pa file.jpg" command): base image (ACDSee).jpg: Exif.Image.ExifTag Long 1 26 Exif.Photo.DateTimeOriginal Ascii 20 1997:01:31 18:19:20 Xmp.exif.DateTimeOriginal XmpText 19 1997:01:31 18:19:20 Xmp.photoshop.DateCreated XmpText 19 1997-01-31T18:19:20 base image (Adobe Lightroom).jpg: Exif.Image.Orientation Short 1 top, left Exif.Image.DateTime Ascii 20 1997:01:31 18:19:20 Exif.Image.ExifTag Long 1 70 Exif.Photo.ExifVersion Undefined 4 2.31 Exif.Photo.DateTimeOriginal Ascii 20 1997:01:31 18:19:20 Exif.Photo.SubSecTime Ascii 4 082 Exif.Photo.SubSecTimeOriginal Ascii 4 082 Iptc.Envelope.CharacterSet String 3 Iptc.Application2.RecordVersion Short 1 4 Iptc.Application2.DateCreated Date 8 1997-01-31 Iptc.Application2.TimeCreated Time 11 18:19:20+00:00 Xmp.xmpMM.DocumentID XmpText 32 364B86D215062EC1BB2E695CF9269022 Xmp.xmpMM.PreservedFileName XmpText 31 base image (Adobe Lighroom).jpg Xmp.xmpMM.OriginalDocumentID XmpText 32 364B86D215062EC1BB2E695CF9269022 Xmp.xmpMM.InstanceID XmpText 44 xmp.iid:5e17db7c-ee80-6b46-b0f8-4a9ae4918b1f Xmp.xmpMM.History XmpText 0 type="Seq" Xmp.xmpMM.History[1] XmpText 0 type="Struct" Xmp.xmpMM.History[1]/stEvt:action XmpText 5 saved Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 44 xmp.iid:5e17db7c-ee80-6b46-b0f8-4a9ae4918b1f Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2020-05-29T00:29:23+02:00 Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 47 Adobe Photoshop Lightroom Classic 8.3 (Windows) Xmp.xmpMM.History[1]/stEvt:changed XmpText 9 /metadata Xmp.dc.format XmpText 10 image/jpeg Xmp.photoshop.DateCreated XmpText 23 1997-01-31T18:19:20.082 Xmp.xmp.ModifyDate XmpText 23 1997-01-31T18:19:20.082 Xmp.xmp.MetadataDate XmpText 25 2020-05-29T00:29:23+02:00 Xmp.crs.RawFileName XmpText 31 base image (Adobe Lighroom).jpg base image (Adobe Photoshop).jpg: Exif.Image.Orientation Short 1 top, left Exif.Image.XResolution Rational 1 72 Exif.Image.YResolution Rational 1 72 Exif.Image.ResolutionUnit Short 1 inch Exif.Image.Software Ascii 31 Adobe Photoshop 21.0 (Windows) Exif.Image.DateTime Ascii 20 2020:05:29 00:43:10 Exif.Image.ExifTag Long 1 168 Exif.Photo.ColorSpace Short 1 Uncalibrated Exif.Photo.PixelXDimension Long 1 2880 Exif.Photo.PixelYDimension Long 1 1800 Exif.Thumbnail.Compression Short 1 JPEG (old-style) Exif.Thumbnail.XResolution Rational 1 72 Exif.Thumbnail.YResolution Rational 1 72 Exif.Thumbnail.ResolutionUnit Short 1 inch Exif.Thumbnail.JPEGInterchangeFormat Long 1 306 Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 2091 Iptc.Application2.RecordVersion Short 1 0 Iptc.Application2.DateCreated Date 8 1997-01-31 Iptc.Application2.TimeCreated Time 11 18:19:20+00:00 Xmp.xmp.CreatorTool XmpText 30 Adobe Photoshop 21.0 (Windows) Xmp.xmp.CreateDate XmpText 25 2020-05-29T00:28:01+02:00 Xmp.xmp.ModifyDate XmpText 25 2020-05-29T00:43:10+02:00 Xmp.xmp.MetadataDate XmpText 25 2020-05-29T00:43:10+02:00 Xmp.dc.format XmpText 10 image/jpeg Xmp.photoshop.ColorMode XmpText 1 3 Xmp.photoshop.DateCreated XmpText 19 1997-01-31T18:19:20 Xmp.xmpMM.InstanceID XmpText 44 xmp.iid:27045cf2-783c-cf47-8417-1d91a38b5c94 Xmp.xmpMM.DocumentID XmpText 44 xmp.did:27045cf2-783c-cf47-8417-1d91a38b5c94 Xmp.xmpMM.OriginalDocumentID XmpText 44 xmp.did:27045cf2-783c-cf47-8417-1d91a38b5c94 Xmp.xmpMM.History XmpText 0 type="Seq" Xmp.xmpMM.History[1] XmpText 0 type="Struct" Xmp.xmpMM.History[1]/stEvt:action XmpText 5 saved Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 44 xmp.iid:27045cf2-783c-cf47-8417-1d91a38b5c94 Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2020-05-29T00:43:10+02:00 Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 30 Adobe Photoshop 21.0 (Windows) Xmp.xmpMM.History[1]/stEvt:changed XmpText 1 / base image (Microsoft Photos).jpg: Exif.Image.ExifTag Long 1 2098 Exif.Photo.DateTimeOriginal Ascii 20 1997:01:31 02:08:20 Exif.Photo.DateTimeDigitized Ascii 20 1997:01:31 02:08:20 Exif.Photo.SubSecTimeOriginal Ascii 3 08 Exif.Photo.SubSecTimeDigitized Ascii 3 08 Xmp.xmp.CreateDate XmpText 23 1997-01-31T02:08:20.082 Xmp.xmpMM.InstanceID XmpText 41 uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b base image (Picasa).jpg: Exif.Image.Software Ascii 7 Picasa Exif.Image.ExifTag Long 1 46 Exif.Photo.ExifVersion Undefined 4 2.20 Exif.Photo.DateTimeOriginal Ascii 20 1997:01:31 18:19:20 Iptc.Envelope.ModelVersion Short 1 4 Iptc.Envelope.CharacterSet String 3 Iptc.Application2.RecordVersion Short 1 4 Iptc.Application2.DateCreated Date 8 1997-01-31 Iptc.Application2.TimeCreated Time 11 18:19:20+00:00 Xmp.exif.DateTimeOriginal XmpText 25 1997-01-31T18:19:20+00:00 base image (Shotwell).jpg: Exif.Image.DateTime Ascii 20 1997:01:31 17:37:36 Exif.Image.ExifTag Long 1 58 Exif.Photo.DateTimeOriginal Ascii 20 1997:01:31 17:37:36 Exif.Photo.DateTimeDigitized Ascii 20 1997:01:31 17:37:36 Xmp.exif.DateTimeOriginal XmpText 20 1997:01:31 16:37:36 Xmp.exif.DateTimeDigitized XmpText 20 1997-01-31T16:37:36Z Xmp.xmp.CreateDate XmpText 20 1997-01-31T16:37:36Z
*** Bug 424818 has been marked as a duplicate of this bug. ***
Hi. Now that the final 7.0.0 version has been released, can we have a look at this report? I think the samples I provided show that the main tag for saving the date in Exif is the Exif.Photo.DateTimeOriginal. To sum up, I believe it should be like this: Exif.Image.DateTime = Xmp.xmp.ModifyDate Exif.Photo.DateTimeOriginal = Xmp.xmp.CreateDate PS: curiously enough, Photoshop is the outlier here, as it's just a photo editor not a picture library manager, and just saves the date to xmp and iptc.
(In reply to MarcP from comment #16) > Hi. Now that the final 7.0.0 version has been released, can we have a look > at this report? > > I think the samples I provided show that the main tag for saving the date in > Exif is the Exif.Photo.DateTimeOriginal. To sum up, I believe it should be > like this: > > Exif.Image.DateTime = Xmp.xmp.ModifyDate > Exif.Photo.DateTimeOriginal = Xmp.xmp.CreateDate > > PS: curiously enough, Photoshop is the outlier here, as it's just a photo > editor not a picture library manager, and just saves the date to xmp and > iptc. (Deepl translates) I interpret the definitions more like this: Exif.Photo.DateTimeOriginal = Xmp.photoshop.DateCreated = Exif.Image.DateTime -> creation date of the displayed image ("what you see") Exif.Photo.DateTimeDigitized = Xmp.xmp.CreateDate -> Digitization date (= creation date of the digital image, not the creation date of the real photo (e.g. the scan image of a negative) xmp:ModifyDate -> Date of the last change of the image (?) xmp:MetadataDate -> Date of the last change of metadata (?)
As I said, concerns should be brought up to Exiv2, we do not make this assignment. Sidecars are a very special case. We only set "Exif.Photo.DateTimeOriginal", Exiv2 writes "Xmp.photoshop.DateCreated" in the sidecar. The EXIF data is interpreted in the same way backwards (EXIF data does not exist if I only read from sidecars). So you should ignore the EXIF and IPTC metadata when using sidecars, they are not real. Maik
In any case, according to that conversion table: Exif.Image.DateTime <=> Xmp.xmp.ModifyDate That means that the Exif.Image.DateTime, that is used in digikam as the date for when the "picture was taken" and currently syncs with Xmp.xmp.CreateDate is indeed a "last modification date", and it's used like that in most pictures managers. That field will be overwritten as soon as a picture is edited, so that field should not be used to store permanent data. The other equivalency: Exif.Photo.DateTimeOriginal <=> Xmp.photoshop.DateCreated is a bit weird. But in any case, that speaks against the use of Xmp.xmp.CreateDate in digikam and use Xmp.photoshop.DateCreated instead. Actually, that is the case for Adobe Lightroom, Adobe Photoshop, and ACDSee. However, Xmp.exif.DateTimeOriginal is the preferred field for that information in Picasa, ACDSee, and Shotwell. For some reason, Microsoft Photos just uses the xmp.xmp.createdate field instead, like Digikam (and also Shotwell, but not exclusively). (Oh, and more argument for the use of Exif.Photo.DateTimeOriginal as the main "Date taken" field in Exif, is that most (if not all) cameras store the date in that field, while not using any kind of XMP information.
Created attachment 130542 [details] Table comparing the metadata fields used in main picture managers To summarize the information I gathered when examining the metadata used in major picture managers, I have created a table. Maybe that will clear things up.
Thanks Mark for all your feedback. It's very important while this huge bugs triage... Best regards Gilles Caulier
(In reply to MarcP from comment #19) > In any case, according to that conversion table: > > Exif.Image.DateTime <=> Xmp.xmp.ModifyDate > > That means that the Exif.Image.DateTime, that is used in digikam as the date > for when the "picture was taken" and currently syncs with Xmp.xmp.CreateDate > is indeed a "last modification date", and it's used like that in most > pictures managers. That field will be overwritten as soon as a picture is > edited, so that field should not be used to store permanent data. > > The other equivalency: > > Exif.Photo.DateTimeOriginal <=> Xmp.photoshop.DateCreated > > is a bit weird. But in any case, that speaks against the use of > Xmp.xmp.CreateDate in digikam and use Xmp.photoshop.DateCreated instead. > Actually, that is the case for Adobe Lightroom, Adobe Photoshop, and ACDSee. > However, Xmp.exif.DateTimeOriginal is the preferred field for that > information in Picasa, ACDSee, and Shotwell. For some reason, Microsoft > Photos just uses the xmp.xmp.createdate field instead, like Digikam (and > also Shotwell, but not exclusively). > > > (Oh, and more argument for the use of Exif.Photo.DateTimeOriginal as the > main "Date taken" field in Exif, is that most (if not all) cameras store the > date in that field, while not using any kind of XMP information. A complicated subject, which is probably not always clearly implemented in other (commercial) software. In DigiKam-DB there are two fields for this data: In the table "imageinformation" the fields "creationDate" and "digitizationDate". These fields are equivalent to the Exif fields "9003 (Exif.Photo.DateTimeOriginal)" and "9004 (Exif.Photo.DateTimeDigitized)" from the digital cameras. According to exiv2 the fields "Xmp.photoshop.DateCreated (9003)" and "Xmp.xmp.CreateDate (9004)" are assigned to these two fields during conversion. So there should be no discrepancies, no matter how the data is moved back and forth: 9003 Exif.Photo.DateTimeOriginal => imageinformation.creationDate => Xmp.photoshop.DateCreated 9004 Exif.Photo.DateTimeDigitized => imageinformation.digitizationDate => Xmp.xmp.CreateDate But how are all the date fields used in the Metadata Editor? There are 7 fields in total (8 with video date): Exif Creation date Original date Digitization date IPTC Digitization date Creation date XMP Digitization date Creation date Video date There is also a date field under "Labels - Description". This field alone fills "imageinformation.creationDate". Then following the logic from above only the fields "Exif.Photo.DateTimeOriginal" = "Xmp.photoshop.DateCreated" would use this date. However, in the metadata editor all fields except the field "XMP Digitization Date" are filled with this value ("imageinformation.creationDate"). If I now change the value in the field "XMP Digitization Date" in the Metadata Editor, I expect this value to be transferred to the field "imageinformation.digitizationDate". But in "imageinformation.digitizationDate" the value from "imageinformation.creationDate" is written. How can I change the date in "imageinformation.digitizationDate"? But what also happens: the digitization date is written correctly in the sidecar file in "exif:DateTimeDigitized". But the value "xap:CreateDate" is wrong (="exif:DateTimeOriginal") If now the photo has no metadata in the image or as a sidecar file - nothing is displayed under "Metadata". This means that the digicam does not save the metadata. The field "imageinformation.creationDate" is displayed as "Camera creation date" in the "View - Preview Images", also under "Captions - Description". What is the field "imageinformation.digitizationDate" for then? And why can I fill 7 date fields in the Metadata Editor - whereas in reality 6 fill the same field ("imageinformation.creationDate") and also store the same value as various metadata (*) - and only one field ("XMP Digitization Date") stores another metadata field ("exif:DateTimeDigitized")? It does not matter if I enter different values for Exif/IPTX/XMP and also deselect "Match values": Only one date ("imageinformation.creationDate") is written into all fields. (*) exif:DateTimeOriginal, tiff:DateTime, xmp:CreateDate, xmp:MetadataDate, xmp:ModifyDate, video:DateTimeOriginal, video:DateUTC, video:ModificationDate, photoshop:DateCreated *** Translated with www.DeepL.com/Translator (free version) ***
I'm going to wade in for a moment. There are several different possible dates of importance that can be distinct, and may or may not exist. Exif.date time original. The time the photo was taken. Either set by a digital camera at the time the photo is taken, or set by hand in software for a scan of a photo taken on a film camera. May not exist for scans. Exif.date time digitized. Set by the scanning software at the time of the scan. May not (should not?) exist for images from digital cameras. Exif.date time Created. Should exist. Date time the image file was originally created by either a scanner, a digital camera, or maybe by hand. Exif.date time modified. The last time the image was modified. Each one has its own use. Since I am scanning a large number of old photos, I am setting date time original to an approximate date and time for each image I scan.
Following Maik comment #18, an UPSTREAM bug must be ported to Exiv2 project for clarification. Gilles Caulier
Hi all, As i proposed in comment #24, somebody has report this problem in an UPSTREAM Exiv2 bug ? https://github.com/Exiv2/exiv2/issues Best Gilles Caulier