From: Jan P. <pa...@us...> - 2007-06-25 05:55:54
|
Update of /cvsroot/libexif/libexif/libexif/olympus In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv14963 Modified Files: exif-mnote-data-olympus.c Log Message: Endianess of Nikon V1 makernotes is now guessed, it might not be the same as of the main IFD. Index: exif-mnote-data-olympus.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/exif-mnote-data-olympus.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -p -d -r1.29 -r1.30 --- exif-mnote-data-olympus.c 11 May 2007 06:22:44 -0000 1.29 +++ exif-mnote-data-olympus.c 25 Jun 2007 05:55:23 -0000 1.30 @@ -267,6 +267,16 @@ exif_mnote_data_olympus_load (ExifMnoteD case nikonV1: base = MNOTE_NIKON1_TAG_BASE; + /* Fix endianness, if needed */ + if (o2 >= buf_size) return; + c = exif_get_short (buf + o2, n->order); + if ((!(c & 0xFF)) && (c > 0x500)) { + if (n->order == EXIF_BYTE_ORDER_INTEL) { + n->order = EXIF_BYTE_ORDER_MOTOROLA; + } else { + n->order = EXIF_BYTE_ORDER_INTEL; + } + } break; case nikonV2: |