Open dr-1 opened 1 month ago
The date taken is extracted from the modify date if there is no date taken in the metadata. If the modify date doesn't exist, then it defaults to the first second of 1970. These two commits show it is intentional behavior, but I can't say if it is correct or desirable. 0102fca 2101b84
@Lawrence37, thanks for finding that. So this was done intentionally to help with date-based sorting in thumbnail view and prevent falling back on filename sorting when images without date values are present. I guess that will work as desired most of the time, at least if there are no other images that have their DateTimeOriginal values set to before 1970 intentionally (for example when working with digitized historical images). If images are processed further with other tools after RawTherapee has exported them (for example evaluating their metadata to build a catalog), that also requires dealing with those "made up" values of 1970.
I wonder if it would be possible and preferable to deal with missing dates in the function that determines the date-based sort order for the thumbnail view, rather than writing a date to the actual image file for this purpose?
Short description When saving an output file from a TIFF input that has no EXIF:DateTimeOriginal tag, I noticed RawTherapee populates that tag in the output from EXIF:ModifyDate (interestingly this does not happen when the input is a DNG file). When EXIF:ModifyDate is also not set in the input, EXIF:DateTimeOriginal becomes 1970:01:01 00:00:00 (i.e. Unix epoch) in the saved file, instead of being unset.
Expected behavior I cannot comment on whether the DateTimeOriginal value should be copied from ModifyDate at all — the semantics of the two fields seem different and it creates a problem in my particular workflow, but I am not an EXIF expert. In any case, when a date value is generated in an output file from a tag that is unset in the input, I would expect the target tag in the output file to be unset as well, rather than 1970:01:01 00:00:00.
Steps to reproduce
RawTherapee version: 5.10 Operating system version: Linux 6.9.9-arch1-1 x86_64