Project

General

Profile

Bug #8594

Exif data from samsung .srw is not written to jpeg

Added by tetaberta - about 7 years ago. Updated about 7 years ago.

Status:
Closed: invalid
Priority:
Low
Assignee:
-
Category:
General
Target version:
Start date:
Due date:
% Done:

0%

Affected Version:
1.0.4
System:
bitness:
64-bit
hardware architecture:
amd64/x86

Description

The exif data from Samsung EX1 *.srw raw files are loaded by darktable and displayed in the GUI. They are not written to the output jpegs. Problem is present in stable 0.9.3 and in git 0.9.3+883~g96e9e3e. Tested on ubuntu 11.10. Darktable works fine with nikon nef files. A hint might be, that exiftool gives warning when reading the raw file:

Warning                         : [minor] Overlapping [[MakerNotes]] values
See exiftool output for the input file:
$ exiftool -a -u -g1 ../20120106-143851.srw
---- [[ExifTool]] ----
[[ExifTool]] Version Number         : 8.60
Warning                         : [minor] Overlapping [[MakerNotes]] values
---- System ----
File Name                       : 20120106-143851.srw
Directory                       : ..
File Size                       : 21 MB
File Modification Date/Time     : 2012:01:06 14:38:54+01:00
File Permissions                : rw-------
---- File ----
File Type                       : SRW
MIME Type                       : image/x-samsung-srw
Exif Byte Order                 : Big-endian (Motorola, MM)
---- IFD0 ----
Make                            : SAMSUNG
Camera Model Name               : EX1
Orientation                     : Horizontal (normal)
Modify Date                     : 2012:01:06 14:38:51
---- [[ExifIFD]] ----
Exposure Time                   : 1/90
F Number                        : 3.4
Exposure Program                : Program AE
ISO                             : 100
Exif Version                    : 0221
Date/Time Original              : 2012:01:06 14:38:51
Exposure Compensation           : -0.7
Metering Mode                   : Multi-segment
Light Source                    : Unknown
Flash                           : No Flash
Focal Length                    : 0.0 mm
Color Space                     : sRGB
Exif Image Width                : 3648
Exif Image Height               : 2736
Exposure Mode                   : Auto bracket
White Balance                   : Auto
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 24 mm
Scene Capture Type              : Standard
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
---- Samsung ----
Maker Note Version              : 0100
Samsung Type 2 0x0002           : 4096
Samsung Type 2 0x0003           : 100667446
Samsung Type 2 0x0020           : 7 86
Samsung Type 2 0x0040           : 0
Samsung Type 2 0x0045           : 0
Samsung Type 2 0x0050           : 1
Samsung Type 2 0x0060           : ??jYo???>jYo???>jJl???>jJl??[...]
Samsung Type 2 0x0080           : AFAF?C.?C.&.......??..[...]
Samsung Type 2 0x00a0           : ?R0547B0445?.Pf???j????[...]
Samsung Type 2 0x00a1           : ?R0537B0454?.of???.W.?.?.?.[...]
Samsung Type 2 0x00c0           : I*@D......Og<[...]
Samsung Type 2 0x00e0           : 
Samsung Type 2 0x00e1           : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Samsung Type 2 0x00e2           : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0[...]
Samsung Type 2 0x0100           : 1
Samsung Type 2 0x0101           : 43880 64171 11175 65263 48063 43182 63914 61417 52214 4[...]
Samsung Type 2 0x0102           : 
Samsung Type 2 0x0120           : 0
Samsung Type 2 0x003c           : 60087
Samsung Type 2 0xa000           : 1
Firmware Name                   : EX1_110122
Samsung Type 2 0xa002           : DY049P000000
Lens Type                       : Built-in
Lens Firmware                   : 0
Samsung Type 2 0xa005           : 0
Sensor Areas                    : 0 0 3688 2780 16 16 3664 2752
Color Space                     : sRGB
Smart Range                     : Off
Exposure Compensation           : 0
ISO                             : 100
Exposure Time                   : 1/90
F Number                        : 3.4
Focal Length In 35mm Format     : 2.4 mm
Samsung Type 2 0xa01b           : 1
Encryption Key                  : 305 72 737 456 282 307 519 724 13 505 193
WB RGGB Levels Uncorrected      : 9025 4224 4224 7342
WB RGGB Levels Auto             : 9025 4224 4224 7342
WB RGGB Levels Illuminator 1    : 5428 4224 4224 14965
WB RGGB Levels Illuminator 2    : 10263 4224 4224 6831
WB RGGB Levels Black            : 0 0 0 0
Color Matrix                    : 440 -180 -4 -80 416 -80 14 -188 430
Color Matrix SRGB               : 440 -180 -4 -80 416 -80 14 -188 430
Color Matrix Adobe RGB          : 405 -162 13 -60 377 -61 22 -178 412
Tone Curve 1                    : 11 0 376 816 1401 2121 3433 5314 6563 8204 10765 16383 0 32 64 96 125 160 192 208 224 240 255
Tone Curve 2                    : 11 0 376 816 1401 2121 3433 5314 6563 8204 10765 16383 0 32 64 96 125 160 192 208 224 240 255
Tone Curve 3                    : 11 0 376 816 1401 2121 3433 5314 6563 8204 10765 16383 0 32 64 96 125 160 192 208 224 240 255
Tone Curve 4                    : 11 0 376 816 1401 2121 3433 5314 6563 8204 10765 16383 0 32 64 96 125 160 192 208 224 240 255
Samsung Type 2 0xa048           : 0 0 0 0 16383 16383 16383 16383 16383 16383 16383 16383
Samsung Type 2 0xa050           : 1 0 -1595 -11 576 -18 0 0
Samsung Type 2 0xa051           : 7 326 651 977 1303 1629 1954 2280 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 9508
Samsung Type 2 0xa052           : 7 0 380 760 1140 1520 1900 2280 1000 1000 1000 1000 1000 1000 1000
---- [[PreviewIFD]] ----
Subfile Type                    : Full-resolution Image
X Resolution                    : 0.6053038902
Y Resolution                    : 0.7507149952
Resolution Unit                 : inches
Preview Image Start             : 18670
Preview Image Length            : 145532
Y Cb Cr Positioning             : Co-sited
---- [[SubIFD]] ----
Subfile Type                    : Full-resolution Image
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Jpg From Raw Start              : 178856
Jpg From Raw Length             : 1789353
Y Cb Cr Positioning             : Co-sited
Subfile Type                    : Full-resolution Image
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Thumbnail Offset                : 164326
Thumbnail Length                : 14286
Y Cb Cr Positioning             : Co-sited
---- [[SubIFD]]1 ----
Subfile Type                    : Full-resolution Image
Image Width                     : 3688
Image Height                    : 2780
Bits Per Sample                 : 14
Compression                     : Packed RAW
Strip Offsets                   : 1968209
Samples Per Pixel               : 3
Rows Per Strip                  : 2780
Strip Byte Counts               : 20505280
CFA Repeat Pattern Dim          : 2 2
CFA Pattern 2                   : 0 1 1 2
---- Composite ----
Aperture                        : 3.4
CFA Pattern                     : [Red,Green][Green,Blue]
Image Size                      : 3688x2780
Jpg From Raw                    : (Binary data 1789353 bytes, use -b option to extract)
Lens ID                         : Built-in
Preview Image                   : (Binary data 145532 bytes, use -b option to extract)
Shutter Speed                   : 1/90
Thumbnail Image                 : (Binary data 14286 bytes, use -b option to extract)
WB RGGB Levels                  : 9025 4224 4224 7342
Blue Balance                    : 1.738163
Focal Length                    : 0.0 mm
Light Value                     : 10.0
Red Balance                     : 2.1366

Here is the exiftool output for the produced jpeg:

$ exiftool -a -u -g1 img_0001_01.jpg 
---- [[ExifTool]] ----
[[ExifTool]] Version Number         : 8.60
---- System ----
File Name                       : img_0001_01.jpg
Directory                       : .
File Size                       : 6.1 MB
File Modification Date/Time     : 2012:02:04 19:38:15+01:00
File Permissions                : rw-rw-r--
---- File ----
File Type                       : JPEG
MIME Type                       : image/jpeg
Image Width                     : 3680
Image Height                    : 2756
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
---- JFIF ----
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
---- XMP-x ----
XMP Toolkit                     : XMP Core 4.4.0-Exiv2
---- XMP-xmp ----
Rating                          : 2
---- XMP-darktable ----
Xmp version                     : 1
Raw params                      : -16777216
Colorlabels                     : 
History modversion              : 
History enabled                 : 
History operation               : 
History params                  : 
Blendop params                  : 
---- XMP-dc ----
Subject                         : 
---- XMP-lr ----
Hierarchical Subject            : darktable|format|srw
---- ICC-header ----
Profile CMM Type                : lcms
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 2012:02:04 18:38:13
Profile File Signature          : acsp
Primary Platform                : Apple Computer Inc.
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : 
Device Model                    : 
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : lcms
Profile ID                      : 0
---- ICC_Profile ----
Profile Description             : Darktable sRGB
Profile Copyright               : No copyright, use freely
Media White Point               : 0.9642 1 0.82491
Chromatic Adaptation            : 0.9554 -0.02315 0.06316 -0.02846 1.0101 0.02101 0.01228 -0.02045 1.3297
Red Matrix Column               : 0.43585 0.22238 0.01392
Blue Matrix Column              : 0.14302 0.06059 0.71384
Green Matrix Column             : 0.38533 0.71704 0.09714
Red Tone Reproduction Curve     : (Binary data 32 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 32 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 32 bytes, use -b option to extract)
Device Mfg Desc                 : (dt internal)
Device Model Desc               : sRGB
---- ICC-chrm ----
Chromaticity Channels           : 3
Chromaticity Colorant           : Unknown (0)
Chromaticity Channel 1          : 0.64 0.33
Chromaticity Channel 2          : 0.3 0.60001
Chromaticity Channel 3          : 0.14999 0.06
---- Composite ----
Image Size                      : 3680x2756

History

#1 Updated by tetaberta - about 7 years ago

example problematic file can be downloaded from http://www.roucka.eu/pub/20120106-143851.srw

#2 Updated by tetaberta - about 7 years ago

Unfortunately, I do not know the Internals of darktable to fix this issue myself. So I have written a simple script to copy the exif info from raw files to jpegs after export assuming the base names are the same. I put it here - might be useful if someone else is suffering by this issue. Usage: scrip_name.sh raw_directory jpeg_directory. Works for me, but not tested thoroughly.

#!/bin/bash

sourcedir=$1
destdir=$2
rawext="[Ss][Rr][Ww]" 
for i in $destdir/*.jpg;
do
    if [ ! "$(exiftool -s -ExposureTime $i)" ]; then
        filename=${i##*/}
        basename=${filename%.*}
        sourcename=$(ls $sourcedir/$basename.$rawext 2> /dev/null | head -1)
        if [ "$(exiftool -s -ExposureTime $sourcename 2> /dev/null)" ]; then
            echo "$i : exif found in $sourcename" 
            exiftool -tagsfromfile $sourcename -exif:all $i
        else
            echo "$i : exif not found" 
        fi
    fi
done

#3 Updated by Stepan Roucka over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Fixed

This issue is fixed in darktable 1.0.5

#4 Updated by Pascal de Bruijn over 6 years ago

  • % Done changed from 100 to 0
  • Affected Version set to 1.0.4
  • Status changed from Fixed to Closed: invalid

Actually this problem wasn't really fixed in 1.0.5, as this wasn't entirely a Darktable problem to begin with.

This issue was resolved shortly after Exiv2 0.23 was released:
http://dev.exiv2.org/issues/820

Which means the latest version of Exiv2 (0.23) still has this problem. You can however apply this tiny patch and rebuild Exiv2:
http://dev.exiv2.org/projects/exiv2/repository/revisions/2743/diff/trunk/src/exif.cpp

For Ubuntu Precise (12.04) users, I patched up the Exiv2 packages on my Darktable-Release-Plus PPA since the release of Darktable 1.0.5 (and even longer back on the Darktable-Unstable PPA).

Also available in: Atom PDF