From: Torsten C. <tc...@va...> - 2008-11-06 17:54:16
|
Hey folks, Need some help with the API. Goal is to add/modify the GPS bit in the exif information. But for now I just wanted to see what exif headers are set. So I am iterating: unsigned int i; unsigned int t; const char *name; char value[128]; const char *v; for (i = 0; i < EXIF_IFD_COUNT; i++) { ExifContent *ifd = ed->ifd[i]; const char *ifd_name = exif_ifd_get_name(i); if (!ifd_name) { continue; } NSLog(@"idf: %s", ifd_name); for (t = 0; t < 0xffff; t++) { name = exif_tag_get_title(t); if (!name) { continue; } ExifEntry *entry = exif_content_get_entry(ifd, t); if (!entry) { continue; } v = exif_entry_get_value(entry, value, sizeof(value)); if (!v) { continue; } NSLog(@"%s = %s", name, value); } } But it seems like I am not getting all information idf: GPS GPS tag version = 0x02, 0x02, 0x00, 0x00 InteroperabilityIndex = N InteroperabilityVersion = 30.00, 13.00, 53.58 East or West Longitude = W Longitude = 89.00, 40.00, 11.16 For one the Longitude format is awkward. But more importantly - the Latitude is missing. Using exiv2 on the file I get 0x0000 GPSInfo GPSVersionID Byte 4 2 2 0 0 0x0001 GPSInfo GPSLatitudeRef Ascii 2 N 0x0002 GPSInfo GPSLatitude Rational 3 30/1 13/1 133941/2500 0x0003 GPSInfo GPSLongitudeRef Ascii 2 W 0x0004 GPSInfo GPSLongitude Rational 3 89/1 40/1 6978/625 What am I doing wrong? Oh btw: I came across this as well Unknown tag 0x882a (entry 9 in '0'). Please report this tag to <lib...@li...>. cheers -- Torsten |