Bug 243106 - Flickr uploader uploads with wrong date
Summary: Flickr uploader uploads with wrong date
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Flickr (show other bugs)
Version: 5.6.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 07:07 UTC by Henry de Valence
Modified: 2018-01-30 21:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments
Screenshot of Digikam error (94.79 KB, image/png)
2010-08-17 01:05 UTC, Henry de Valence
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry de Valence 2010-06-29 07:07:04 UTC
Version:           1.2.0 (using KDE 4.4.2) 
OS:                Linux

I take photos on a Nikon D70s, saving as NEF files. Then, I load them into digikam, flag the ones I like, and process them individually in UFRaw to get PNG files.

The resulting PNG files appear in Digikam with the correct date, but when I upload them to Flickr, they are given incorrect dates -- the date and time at which I converted them from NEF files.

Here is a specific example. The exif data is obtained by 'exiftool -a -u -g1 FILENAME'. I have included only the section labeled 'Composite' for brevity; if needed, I can also give the full exif output and the original files. I took a picture which was saved as DSC_2303.NEF. Then I used UFRaw to process and save it as DSC_2303.png, before uploading it to Flickr.

I suspect that the problem is that it is using the wrong field in the PNG file; whether UFRaw is seeting it correctly or not seems somewhat irrelevant since the PNG file is displayed in Digikam with the correct date, and it is surely a bug to send a different date than the date displayed to Flickr.

Reproducible: Always





DSC_2303.NEF:
Aperture                        : 7.1
Blue Balance                    : 1.481848
CFA Pattern                     : [Blue,Green][Green,Red]
Image Size                      : 3040x2014
Jpg From Raw                    : (Binary data 760850 bytes, use -b option to extract)
Lens ID                         : AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED
Lens                            : 18-70mm f/3.5-4.5 G
Preview Image                   : (Binary data 20686 bytes, use -b option to extract)
Red Balance                     : 2.221122
Scale Factor To 35 mm Equivalent: 1.5
Shutter Speed                   : 1/400
Create Date                     : 2010:06:27 07:04:20.10
Date/Time Original              : 2010:06:27 07:04:20.10
Modify Date                     : 2010:06:27 07:04:20.10
Circle Of Confusion             : 0.020 mm
Depth Of Field                  : 0.04 m (0.38 - 0.42)
Field Of View                   : 39.7 deg (0.29 m)
Focal Length                    : 31.0 mm (35 mm equivalent: 46.0 mm)
Hyperfocal Distance             : 6.68 m
Light Value                     : 13.3

DSC_2303.png:
Aperture                        : 7.1
Blue Balance                    : 1.481848
Date/Time Created               : 2010:06:28 00:37:58+00:00
Image Size                      : 2014x3039
Lens ID                         : AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED
Lens                            : 18-70mm f/3.5-4.5 G
Red Balance                     : 2.221122
Scale Factor To 35 mm Equivalent: 1.5
Shutter Speed                   : 1/400
Create Date                     : 2010:06:27 07:04:20.10
Date/Time Original              : 2010:06:27 07:04:20.10
Modify Date                     : 2010:06:28 00:37:58.10
Circle Of Confusion             : 0.020 mm
Depth Of Field                  : 0.04 m (0.38 - 0.42)
Field Of View                   : 39.7 deg (0.29 m)
Focal Length                    : 31.0 mm (35 mm equivalent: 46.0 mm)
Hyperfocal Distance             : 6.68 m
Light Value                     : 13.3

Flickr Metadata:
http://www.flickr.com/photos/8702301@N06/4740829687/meta/in/set-72157624249109753
Comment 1 Henry de Valence 2010-06-29 07:10:29 UTC
Ah! It seems I made a mistake. The wrong date is actually displayed in the Digikam window after all; I had mistaken the NEF for the PNG file. So this may be a UFRaw bug. I think it would still be nice for Digikam to use 'Date/Time Original' or 'Create Date' though.
Comment 2 Johannes Wienke 2010-06-29 09:33:22 UTC
I cannot see any code that explicitly sets the date. I guess this is flickr's interpretation of the exif tags.
Comment 3 Henry de Valence 2010-06-30 20:23:14 UTC
Something that occurred to me is that the flickr uploader converts the PNG into a JPEG before it's uploaded. How is that done? is the metadata copied exactly, or might it be messing it up there? Where are the JPEG files that actually get uploaded put, so that I can test it myself to see what the date/time is on them?
Comment 4 Henry de Valence 2010-07-03 06:34:30 UTC
I can confirm that if I don't tell the Flickr Uploader to resize & convert to a JPEG, and instead just upload a JPEG produced in UFRAW, then the dates appear correctly in Flickr.
Comment 5 Johannes Wienke 2010-07-03 11:28:42 UTC
can you upload such a photo for us to test?
Comment 6 Henry de Valence 2010-08-11 21:53:51 UTC
I think I may have found the problem.

If I select an NEF file and open if with UFRaw, then the resulting jpg/png/tif file is apparently not opened correctly in Digikam. It shows up in the "View" mode as having its date/time as when the file was created. Then, if I click on the stars to assign it a rating, it saves the rating AND the wrong date to the image file.

If, however, I do "Reread metadata from Image", it sees the correct date, so that when I give it a rating, it does not overwrite the exif data with bad values.

Here is a diff of the exif data from the original image immediately after it was produced by UFRaw, and after I assigned it a rating in Digikam.

As you can see, setting a rating overwrites the correct date/time in the Exif data.

--- exif_1      2010-08-11 15:41:05.140271246 -0400
+++ exif_2      2010-08-11 15:41:46.070271775 -0400
@@ -12,15 +12,13 @@
 Compression                     : Deflate/Inflate
 Filter                          : Adaptive
 Interlace                       : Noninterlaced
-Source                          : NIKOND70s
-Exif Byte Order                 : Big-endian (Motorola, MM)
-Processing Software             : UFRaw 0.16
+Exif Byte Order                 : Little-endian (Intel, II)
+Processing Software             : digiKam-1.2.0
 Subfile Type                    : Reduced-resolution image
 Make                            : NIKON CORPORATION
 Camera Model Name               : NIKON D70s
 Orientation                     : Horizontal (normal)
-Software                        : Ver.1.00
-Modify Date                     : 2010:07:03 17:17:04
+Modify Date                     : 2010:08:11 14:21:21
 Reference Black White           : 0 255 0 255 0 255
 Exposure Time                   : 1/500
 F Number                        : 8.0
@@ -94,7 +92,6 @@
 Flash Group B Exposure Comp     : 0
 Image Optimization              : Normal
 Vari Program                    : 
-User Comment                    : 
 Sub Sec Time                    : 00
 Sub Sec Time Original           : 00
 Sub Sec Time Digitized          : 00
@@ -115,8 +112,22 @@
 Subject Distance Range          : Unknown
 Date/Time Original              : 2010:07:03 17:17:04
 TIFF-EP Standard ID             : 1 0 0 0
+Current IPTC Digest             : ac43f309c96a85b92d70c15518700273
+Originating Program             : digiKam
+Program Version                 : 1.2.0
+Time Created                    : 14:21:21+00:00
+XMP Toolkit                     : XMP Core 4.4.0-Exiv2
+Date/Time Modified              : 2010:08:11 14:21:21
+Creator Tool                    : digiKam-1.2.0
+Metadata Date                   : 2010:08:11 14:21:21
+Rating                          : 3
+Date Created                    : 2010:08:11 14:21:21
+Rating Percent                  : 50
+Software                        : UFRaw
+Source                          : NIKOND70s
 Aperture                        : 8.0
 Blue Balance                    : 1.410156
+Date/Time Created               : 2010:08:11 14:21:21+00:00
 Image Size                      : 3039x2014
 Lens ID                         : AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED
 Lens                            : 18-70mm f/3.5-4.5 G
@@ -125,7 +136,7 @@
 Shutter Speed                   : 1/500
 Create Date                     : 2010:07:03 17:17:04.00
 Date/Time Original              : 2010:07:03 17:17:04.00
-Modify Date                     : 2010:07:03 17:17:04.00
+Modify Date                     : 2010:08:11 14:21:21.00
 Circle Of Confusion             : 0.020 mm
 Depth Of Field                  : inf (3.89 m - inf)
 Field Of View                   : 38.0 deg (5.47 m)
Comment 7 caulier.gilles 2010-08-16 16:00:40 UTC
The Modify Date tags are patched, because it's the date where something have been touched. If flickr use this tag to identify the date of camera shot, it's definitively wrong. The right tags to use by Flickr is Date/Time Original

Gilles Caulier
Comment 8 Henry de Valence 2010-08-17 01:03:33 UTC
First of all, it's entirely unexpected behaviour that setting a rating would change any metadata not related to the rating. It's not only setting the Modify Date -- even though only the metadata, NOT the image, is being changed -- but also the Date/Time Created, Date Created, and Time Created tags.

Second, even if Flickr is using the correct tag, it's not going to be of any help to them, since that tag gets overwritten by Digikam at some point. See these two images:

http://www.flickr.com/photos/8702301@N06/4899566152/meta/in/photostream
http://www.flickr.com/photos/8702301@N06/4899573518/meta/in/photostream
Comment 9 Henry de Valence 2010-08-17 01:05:19 UTC
Created attachment 50637 [details]
Screenshot of Digikam error

Also, in addition to changing when the image was created based on a rating change as described above, Digikam isn't able to properly read the data from the images in the first place.

In the attached screenshot, #1 is the original NEF file, and #2 is a JPG I created with UFRaw.

Digikam is displaying the wrong date, even though the only reference to that date in the Exif info is "File Modification Date/Time : 2010:08:16 18:10:15-04:00":

exiftool DSC_3609.jpg | grep -e Date -e Time -i
File Modification Date/Time     : 2010:08:16 18:10:15-04:00
Modify Date                     : 2010:08:15 13:00:50
Exposure Time                   : 1/160
Create Date                     : 2010:08:15 13:00:50
Sub Sec Time                    : 10
Sub Sec Time Original           : 10
Sub Sec Time Digitized          : 10
Date/Time Original              : 2010:08:15 13:00:50
Create Date                     : 2010:08:15 13:00:50.10
Date/Time Original              : 2010:08:15 13:00:50.10
Modify Date                     : 2010:08:15 13:00:50.10
Comment 10 caulier.gilles 2011-12-20 17:25:03 UTC
Harry,

This file still valid using kipi-plugins 2.4 ?

Gilles Caulier
Comment 11 Shourya Singh Gupta 2015-05-14 22:20:07 UTC
This is not valid anymore. The image gets uploaded with proper "Date/Time Created". Also, digiKam does not change the "Date/Time Created" metadata when a rating is given to an image.