From: Torsten C. <tc...@va...> - 2008-11-06 20:41:30
|
Hey Stanislav, Thanks for the quick feedback. > This is broken and can never work, as tags are unique only per IFD, not > per EXIF. Use exif_tag_get_title_in_ifd. I see ... makes sense Actually I was after the GPS information anyway. So I ended up with ExifEntry *entry_lat = exif_data_get_entry(ed, EXIF_TAG_GPS_LATITUDE); if (exif_entry_get_value(entry_lat, value, sizeof(value))) { NSLog(@"lat = %s", value); } ExifEntry *entry_latref = exif_data_get_entry(ed, EXIF_TAG_GPS_LATITUDE_REF); if (exif_entry_get_value(entry_latref, value, sizeof(value))) { NSLog(@"latref = %s", value); } ExifEntry *entry_lon = exif_data_get_entry(ed, EXIF_TAG_GPS_LONGITUDE); if (exif_entry_get_value(entry_lon, value, sizeof(value))) { NSLog(@"lon = %s", value); } ExifEntry *entry_lonref = exif_data_get_entry(ed, EXIF_TAG_GPS_LONGITUDE_REF); if (exif_entry_get_value(entry_lonref, value, sizeof(value))) { NSLog(@"lonref = %s", value); } Which seems to work just fine. Now how do I update or add exif information if not available? I assume I would have to create a new exif entry with exif_entry_new() Not sure how to fill it properly though. For example there is no exif_entry_set_value(). Will I have to modify the struct directly? Any pointers? cheers -- Torsten |