From: Torsten C. <tc...@va...> - 2008-11-07 00:19:27
|
On Thu, Nov 6, 2008 at 10:22 PM, Jan Patera <pa...@pi...> wrote: >> Longitude = 89.00, 40.00, 11.16 >> >> For one the Longitude format is awkward. >> Using exiv2 on the file I get >> 0x0004 GPSInfo GPSLongitude Rational 3 89/1 >> 40/1 6978/625 > > Which format would you like libexif to use? The same format as exiv2 uses, > i.e. the exact fractions? Actually - never mind. Just had a look at the spec and found the exif_set_rational/exif_get_rational ... so that's just the textual representation. And doesn't really matter that much. (I would have expected a simple double printed though) What I haven't worked out yet is how to set 3 rationals. entry_lon = exif_entry_new(); exif_entry_initialize(entry_lon, EXIF_TAG_GPS_LONGITUDE); ExifRational value; value.numerator = 54 value.denominator = 1; exif_set_rational(entry_lon->data, exif_data_get_byte_order(ed), value); exif_content_add_entry(ed->ifd[EXIF_IFD_GPS], entry_lon); exif_entry_unref(entry_lon); According to the spec there are 3 rationals. But I have no idea how to do that with the API. May I ask for another pointer? :) cheers -- Torsten |