Project

General

Profile

Bug #1309

Writing gps metadata to sony alpha6300 raw files deletes data

Added by Alexander nofamilyname about 4 years ago. Updated about 3 years ago.

Status:
Assigned
Priority:
Normal
Assignee:
-
Category:
tiff parser
Target version:
Start date:
28 Aug 2017
Due date:
% Done:

0%

Estimated time:

Description

Adding Gps locations to a raw file from a sony a6300 corrupts some data on the raw file. Possibly the White-balance information.
This happens only when you enable writing metadata to raw files.

Test to reproduce:
1)Go here: http://www.photographyblog.com/reviews/sony_a6300_review/sample_images/
2) Download http://img.photographyblog.com/reviews/sony_a6300/sample_images/sony_a6300_01.arw
As a note: If you try to download the raw directly over http://img.photographyblog.com/reviews/sony_a6300/sample_images/sony_a6300_01.arw you will get a 404 error. You have to download it over http://www.photographyblog.com/reviews/sony_a6300_review/sample_images/ (referrer check most likely).

3)Open it in the DigiKam image editor. The colors are fine.
4)Add gps info with the geolocation tool to the file and save it.
5)Open it again in the image editor and you will see that the colors are wrong now.

This bug was confirmed by another User in the digikam IRC.

Initially reported here: https://bugs.kde.org/show_bug.cgi?id=384092

History

#1

Updated by Robin Mills about 4 years ago

  • Category set to tiff parser
  • Priority changed from Urgent to Normal
  • Target version set to 1.0
#2

Updated by Pascal Heinrich about 4 years ago

I have the problem using the exiv library in an cpp environment. Writing gps locations results is a red coloured arw file.

Any update on this?

#3

Updated by Pascal Heinrich about 4 years ago

The MakerNote is missing 4 zero values after a writeMetadata call.

before:

Exif.Photo.MakerNote                         Undefined 37092  (Binary value suppressed)

after:

Exif.Photo.MakerNote                         Undefined 37088  (Binary value suppressed)

I have change UserComment only. And this is correctly changed.

exifData["Exif.Photo.UserComment"] = QString("test").toStdString();

If I compare the Binary Data the only difference is four 0 values at the end.

#4

Updated by Robin Mills about 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Target version changed from 1.0 to 0.27

To help you, I will need more information.

Can you attach (or dropbox a file) with an exiv2 command to reproduce your issue. If you can only reproduce this with digiKam, I am unable to help.

#5

Updated by Christian Pietzsch about 4 years ago

Hello Robin,
I've done an experiment. I change the metadata of a raw file once directly with exiv2 and once with Digikam.
The result was that the Digikam file got corrupted and the command line one didn't.
https://www.dropbox.com/s/twy49qw7ecnqpf7/Metadata%20Digikam.ARW?dl=0
https://www.dropbox.com/s/1dyz2d90glim04i/Metadata%20exiv2.ARW?dl=0
The exif output is the same in both. Terminal output below.
It's Digikam specific as far as I can tell. I'll forward my knowledge to the original issue.

(In the output the picture with _2 was edited by Digikam and the other one by exiv2)

[#]$ exiv2 DSC04326.ARW
File name : DSC04326.ARW
File size : 20676608 Bytes
MIME type : image/tiff
Image size : 5504 x 3656
Camera make : SONY
Camera model : SLT-A58
Image timestamp : 2017:09:18 04:44:44
Image number :
Exposure time : 1/20 s
Aperture : F11
Exposure bias : 0 EV
Flash : No, compulsory
Flash bias : 0 EV
Focal length : 40.0 mm (35 mm equivalent: 60.0 mm)
Subject distance:
ISO speed : 640
Exposure mode : Auto
Metering mode : Multi-segment
Macro mode :
Image quality : n/a
Exif Resolution : 5504 x 3656
White balance : Cloudy
Thumbnail : image/jpeg, 6128 Bytes
Copyright :
Exif comment :

[#]$ exiv2 DSC04326_2.ARW
File name : DSC04326_2.ARW
File size : 20554786 Bytes
MIME type : image/tiff
Image size : 5504 x 3656
Camera make : SONY
Camera model : SLT-A58
Image timestamp : 2017:09:18 04:44:44
Image number :
Exposure time : 1/20 s
Aperture : F11
Exposure bias : 0 EV
Flash : No, compulsory
Flash bias : 0 EV
Focal length : 40.0 mm (35 mm equivalent: 60.0 mm)
Subject distance:
ISO speed : 640
Exposure mode : Auto
Metering mode : Multi-segment
Macro mode :
Image quality : n/a
Exif Resolution : 5504 x 3656
White balance : Cloudy
Thumbnail : image/jpeg, 6128 Bytes
Copyright :
Exif comment : test

[#]$ exiv2 -M"set Exif.Photo.UserComment charset=Ascii exiv2 write" DSC04326.ARW
[#]$ exiv2 DSC04326.ARW
File name : DSC04326.ARW
File size : 20676608 Bytes
MIME type : image/tiff
Image size : 5504 x 3656
Camera make : SONY
Camera model : SLT-A58
Image timestamp : 2017:09:18 04:44:44
Image number :
Exposure time : 1/20 s
Aperture : F11
Exposure bias : 0 EV
Flash : No, compulsory
Flash bias : 0 EV
Focal length : 40.0 mm (35 mm equivalent: 60.0 mm)
Subject distance:
ISO speed : 640
Exposure mode : Auto
Metering mode : Multi-segment
Macro mode :
Image quality : n/a
Exif Resolution : 5504 x 3656
White balance : Cloudy
Thumbnail : image/jpeg, 6128 Bytes
Copyright :
Exif comment : exiv2 write

#6

Updated by Phil Harvey over 3 years ago

The SR2 IFD's are completely missing from the "Metadata exiv2.ARW" file you uploaded, so no wonder if the colours are messed up. Did you name the files incorrectly? I thought it was the one written by Digikam ("Metadata Digikam.ARW"?) that showed the problem.

#7

Updated by Robin Mills over 3 years ago

Thanks for saying something about this, Phil The was reported months ago when I was on vacation and hasn't received attention. Thanks for dealing with this.

#8

Updated by Robin Mills about 3 years ago

  • Assignee deleted (Robin Mills)
  • Target version changed from 0.27 to 0.28

I'm deferring this issue to Exiv2 v0.28.

Also available in: Atom PDF