Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exif Dates in Image Metadata Typo! #2784

Closed
backface opened this issue May 30, 2019 · 2 comments · Fixed by #2788
Closed

Exif Dates in Image Metadata Typo! #2784

backface opened this issue May 30, 2019 · 2 comments · Fixed by #2788

Comments

@backface
Copy link
Contributor

I was wondering why

tpl_img_getTag('Date.EarliestTime');

was reporting wrong dates:
File modification date instead of the ealier EXIF:DateTimeOriginal.

I found the bug in JpegMeta.php where the tag is referred to as "DateTimeOriginal" in one part, but as "DatetimeOriginal" in the other part of the script. Fixing the name in the EXIF tag name definition to what is referred to elsewhere solves the problem (but should then also be changed at https://www.dokuwiki.org/devel:templates:detail.php) - the other way round is of course also an option.

--- JpegMeta.php.orig	2019-05-30 11:13:56.989508760 +0200
+++ JpegMeta.php	2019-05-30 11:29:37.545488737 +0200
@@ -2699,8 +2699,8 @@
             $tags[0x8827] = 'ISOSpeedRatings';
             $tags[0x8828] = 'OECF';
             $tags[0x9000] = 'EXIFVersion';
-            $tags[0x9003] = 'DatetimeOriginal';
-            $tags[0x9004] = 'DatetimeDigitized';
+            $tags[0x9003] = 'DateTimeOriginal';
+            $tags[0x9004] = 'DateTimeDigitized';
             $tags[0x9101] = 'ComponentsConfiguration';
             $tags[0x9102] = 'CompressedBitsPerPixel';
             $tags[0x9201] = 'ShutterSpeedValue';
@@ -2849,8 +2849,8 @@
             $tags[0x8827] = array(3, 0); // ISOSpeedRatings -> SHORT, Any
             $tags[0x8828] = array(7, 0); // OECF -> UNDEFINED, Any
             $tags[0x9000] = array(7, 4); // EXIFVersion -> UNDEFINED, 4
-            $tags[0x9003] = array(2, 20); // DatetimeOriginal -> ASCII, 20
-            $tags[0x9004] = array(2, 20); // DatetimeDigitized -> ASCII, 20
+            $tags[0x9003] = array(2, 20); // DateTimeOriginal -> ASCII, 20
+            $tags[0x9004] = array(2, 20); // DateTimeDigitized -> ASCII, 20
             $tags[0x9101] = array(7, 4); // ComponentsConfiguration -> UNDEFINED, 4
             $tags[0x9102] = array(5, 1); // CompressedBitsPerPixel -> RATIONAL, 1
             $tags[0x9201] = array(10, 1); // ShutterSpeedValue -> SRATIONAL, 1
@splitbrain
Copy link
Collaborator

Can you create a proper pull request for the change?

@backface
Copy link
Contributor Author

backface commented Jun 4, 2019

#2788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants