efm - look for exif tags in other chunks too
This commit is contained in:
parent
ea14bdf0d7
commit
69bbc08449
|
@ -122,6 +122,21 @@ e_fm_prop_file(E_Fm2_Icon *ic)
|
||||||
return cfd;
|
return cfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBEXIF
|
||||||
|
static ExifEntry *
|
||||||
|
_exif_entry_find(ExifData *ed, ExifTag tag)
|
||||||
|
{
|
||||||
|
ExifEntry *entry;
|
||||||
|
|
||||||
|
if ((entry = exif_content_get_entry(ed->ifd[EXIF_IFD_0], tag))) return entry;
|
||||||
|
if ((entry = exif_content_get_entry(ed->ifd[EXIF_IFD_1], tag))) return entry;
|
||||||
|
if ((entry = exif_content_get_entry(ed->ifd[EXIF_IFD_EXIF], tag))) return entry;
|
||||||
|
if ((entry = exif_content_get_entry(ed->ifd[EXIF_IFD_GPS], tag))) return entry;
|
||||||
|
if ((entry = exif_content_get_entry(ed->ifd[EXIF_IFD_INTEROPERABILITY], tag))) return entry;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**--CREATE--**/
|
/**--CREATE--**/
|
||||||
static void
|
static void
|
||||||
_fill_data(E_Config_Dialog_Data *cfdata, E_Fm2_Icon *ic)
|
_fill_data(E_Config_Dialog_Data *cfdata, E_Fm2_Icon *ic)
|
||||||
|
@ -142,11 +157,9 @@ _fill_data(E_Config_Dialog_Data *cfdata, E_Fm2_Icon *ic)
|
||||||
ExifData *ed = exif_data_new_from_file(loc);
|
ExifData *ed = exif_data_new_from_file(loc);
|
||||||
if (ed)
|
if (ed)
|
||||||
{
|
{
|
||||||
ExifEntry *entry = exif_content_get_entry(ed->ifd[EXIF_IFD_0], EXIF_TAG_DATE_TIME_ORIGINAL);
|
ExifEntry *entry = _exif_entry_find(ed, EXIF_TAG_DATE_TIME_ORIGINAL);
|
||||||
if (!entry)
|
if (!entry) entry = _exif_entry_find(ed, EXIF_TAG_DATE_TIME_DIGITIZED);
|
||||||
entry = exif_content_get_entry(ed->ifd[EXIF_IFD_0], EXIF_TAG_DATE_TIME_DIGITIZED);
|
if (!entry) entry = _exif_entry_find(ed, EXIF_TAG_DATE_TIME);
|
||||||
if (!entry)
|
|
||||||
entry = exif_content_get_entry(ed->ifd[EXIF_IFD_0], EXIF_TAG_DATE_TIME);
|
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
char tbuf[128];
|
char tbuf[128];
|
||||||
|
|
Loading…
Reference in New Issue