Opened 14 years ago
Closed 9 years ago
#14137 closed enhancement (wontfix)
EXIF tag DateTimeDigitized not always present
Reported by: | MMN-o | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.0 |
Component: | Upload | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Shooting images with my Nokia N900 will only fill in EXIF data for "DateTimeOriginal", not the tag "DateTimeDigitized" which Wordpress solely uses.
Grabbing data from DateTime and/or DateTimeOriginal would increase the amounts of correct EXIF date data collected when uploading images.
Attaching sample original image from my camera. CLI tool 'exif' when grep:ed with 'Date' outputs the following for the attached image:
Date and Time |2010:06:25 15:47:14 Date and Time (origi|2010:06:25 15:47:14
'exif --list-tags *jpg|grep Date' results in the following (* meaning data exists):
0x0132 Date and Time * - - - - 0x9003 Date and Time (original) - - * - - 0x9004 Date and Time (digitized) - - - - -
wp-admin/includes/image.php has the function which retrieves this metadata.
Attachments (1)
Change History (16)
#3
@
14 years ago
- Keywords image added
- Summary changed from EXIF DateTimeDigitized not always presented to EXIF tag DateTimeDigitized not always present
#5
@
14 years ago
- Cc miqrogroove@… added
- Keywords needs-patch added; n900 DateTimeDigitized DateTime DateTimeOriginal EXIF camera image removed
- Milestone changed from Awaiting Review to Future Release
No issues adding the extra field here.
#6
@
14 years ago
Ah, nice ticket. This could be patched up in an hour or two. I would first want to see why there are three different date fields and whether all three should be recognized instead of just one or two. I simply have zero time to devote as I'm back in school with five papers due by mid Nov.
#7
@
14 years ago
Great that someone woke this ticket to life. I had no means whatsoever when I posted it to delve into the issue, but I'll give it a shot now if miqrogroove doesn't make it first :)
It seems DateTimeDigitized tells us when an image was digitized, as opposed to DateTimeOriginal which tells us when it was originally _created_. That is, an analog picture which was scanned should have different DateTimeOriginal and DateTimeDigitized, whereas a digital still image reasonably has identical timestamps.
http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif/datetimedigitized.html
The priority list for Wordpress to interpret EXIF timestamp should be:
- DateTimeOriginal (This is when the image was first created. Should override everything.)
- DateTime (I'm guessing this is most common, and more likely to represent correct time than digitization)
- DateTimeDigitized (if no other data is available, assume digitization equals time of creation)
#8
@
14 years ago
I looked up and confirmed 0x132 DateTime represents the time of the last edit. It is not the correct value to assign to $meta['created_timestamp']
.
There may be no significant distinction between the Digitized and Original fields, so I would favor Digitized and fall back on Original for consistency. The camera in question appears to be out of compliance with Exif.
#9
@
14 years ago
- Keywords has-patch added; needs-patch removed
In looking through some photos, I found DateTimeOriginal and DateTimeDigitized generally contained the same values, and either one or the other existed.
For simplicity, I say we favor things in the order given by MMN-o. Patch does just that.
#10
@
14 years ago
I still disagree with the idea of changing this behavior such an arbitrary manner.
#11
@
14 years ago
Well, I could compile some stats and such across the whole of the internet if you liked, but in the ones I checked via my totally non-scientific sample, there was no "DateTime", but "DateTimeOriginal" and "DateTimeDigitized" were fairly commonplace.
"DateTimeOriginal" has been around a long time.
"DateTimeDigitized" has been around since digital cameras got to the point of non-suck.
"DateTime" doesn't exist as far as I've seen. But I admit that I didn't try very hard to find it.
The order is irrelevant, as I see it. Choose your own and I'll back it. But it should definitely check for more than one of them.
#13
@
14 years ago
Given the same general principle as I stated in #16251: "the attachment post is the representation in WordPress of the attachment file", then it makes more sense for the "Original" date to be assigned to the created_timestamp, over the "Digitized".
That said, in practice, it probably doesn't make any difference at all in the grand scheme of things. The number of cases where Original is different than Digitized is probably capable of being counting on fingers.
File not attached, but linked here:
http://ccou.se/files/2010/06/20100625_015.jpg