{
gchar *str;
ExifItem *item;
-
+
if (!key) return NULL;
-
+
/* convert xmp key to exif key */
if (strcmp(key, "Xmp.tiff.Orientation") == 0) key = "Exif.Image.Orientation";
-
+
if (format == METADATA_FORMATTED)
{
gchar *text;
item = exif_get_item(exif, key);
if (!item) return NULL;
-
+
str = exif_item_get_data_as_text_full(item, format);
-
+
if (!str) return NULL;
-
+
return g_list_append(NULL, str);
}
guchar *map_data;
size_t map_len;
int fd;
-
+
if (!exif) return NULL;
path = exif->path;
fd = open(path, O_RDONLY);
-
-
+
+
if (fd == -1)
{
return 0;
ud->ptr = map_data + offset;
ud->map_data = map_data;
ud->map_len = map_len;
-
+
exif_unmap_list = g_list_prepend(exif_unmap_list, ud);
return ud->ptr;
}
void exif_free_preview(guchar *buf)
{
GList *work = exif_unmap_list;
-
+
while (work)
{
UnmapData *ud = (UnmapData *)work->data;