Skip to content

Commit bfeeb91

Browse files
Tag problematic DNG image files
As commented in commit cf9d9f6 there a dng files still problematic for darktable. While reading exif data they now automatically are tagged with "darktable|github|dng_issue" so they can be found easily by the user.
1 parent 8bdcb09 commit bfeeb91

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/common/exif.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,8 @@ static bool _exif_decode_exif_data(dt_image_t *img, Exiv2::ExifData &exifData)
17811781
// Read embedded color matrix and DNG related tags.
17821782
if(FIND_EXIF_TAG("Exif.Image.DNGVersion"))
17831783
{
1784+
gboolean github_request = FALSE;
1785+
17841786
// initialize matrixes and data with noop / defaults
17851787
float CM[3][9];
17861788
float FM[3][9];
@@ -1918,6 +1920,7 @@ static bool _exif_decode_exif_data(dt_image_t *img, Exiv2::ExifData &exifData)
19181920
dt_control_log(_("detected OtherIlluminant in `%s`, please report via darktable github"), img->filename);
19191921
dt_print(DT_DEBUG_IMAGEIO, "detected not-implemented OtherIlluminant in `%s`, please report via darktable github", img->filename);
19201922
illu[k] = DT_LS_D65;
1923+
github_request = TRUE;
19211924
}
19221925

19231926
if(illu[k] != DT_LS_Unknown)
@@ -1965,6 +1968,7 @@ static bool _exif_decode_exif_data(dt_image_t *img, Exiv2::ExifData &exifData)
19651968
{
19661969
dt_control_log(_("special exif illuminants in `%s`, please report via darktable github"), img->filename);
19671970
dt_print(DT_DEBUG_ALWAYS, "special exif illuminants in `%s`, please report via darktable github", img->filename);
1971+
github_request = TRUE;
19681972
}
19691973

19701974

@@ -1991,6 +1995,7 @@ static bool _exif_decode_exif_data(dt_image_t *img, Exiv2::ExifData &exifData)
19911995
if(forward_suggested)
19921996
{
19931997
dt_control_log(_("forward matrix in `%s`, please report via darktable github"), img->filename);
1998+
github_request = TRUE;
19941999
}
19952000
dt_print(DT_DEBUG_IMAGEIO,
19962001
"[exif] %s%s%s: selected from [1] %s (%iK), [2] %s (%iK), [3] %s (%iK)",
@@ -2010,6 +2015,14 @@ static bool _exif_decode_exif_data(dt_image_t *img, Exiv2::ExifData &exifData)
20102015
mat3mul(img->d65_color_matrix, illuminant_data[illuminant].CA, cameratoXYZ);
20112016
_print_matrix_data("dt_image_t d65_color_matrix", 0, img->d65_color_matrix);
20122017
}
2018+
if(github_request)
2019+
{
2020+
guint tagid = 0;
2021+
char tagname[32];
2022+
snprintf(tagname, sizeof(tagname), "darktable|github|dng_issue");
2023+
dt_tag_new(tagname, &tagid);
2024+
dt_tag_attach(tagid, img->id, FALSE, FALSE);
2025+
}
20132026
}
20142027

20152028
gboolean is_monochrome = FALSE;

0 commit comments

Comments
 (0)