From: Jan P. <pa...@us...> - 2007-05-08 09:49:18
|
Update of /cvsroot/libexif/libexif/libexif/olympus In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12813 Modified Files: exif-mnote-data-olympus.c Log Message: Added heuristics for partial fix of #1525770: Microsoft Windows Photo Gallery 6.0.6000.16386 apparently converts main Exif IFD from Intel to Motorola order, but copies Olympus makernote in Intel order as-is. We now detect this order-mismatch, plus we now write back some unknown short in the makernote that seems to be version number. Index: exif-mnote-data-olympus.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/exif-mnote-data-olympus.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -p -d -r1.27 -r1.28 --- exif-mnote-data-olympus.c 8 May 2007 09:18:36 -0000 1.27 +++ exif-mnote-data-olympus.c 8 May 2007 09:48:53 -0000 1.28 @@ -102,6 +102,7 @@ exif_mnote_data_olympus_save (ExifMnoteD /* Write the header and the number of entries. */ strcpy ((char *)*buf, "OLYMP"); + exif_set_short (*buf + 6, n->order, (ExifShort) 1); datao = n->offset; break; case olympusV2: @@ -224,6 +225,10 @@ exif_mnote_data_olympus_load (ExifMnoteD /* The number of entries is at position 8. */ n->version = olympusV1; + if (buf[o2 + 6] == 1) + n->order = EXIF_BYTE_ORDER_INTEL; + else if (buf[o2 + 6 + 1] == 1) + n->order = EXIF_BYTE_ORDER_MOTOROLA; o2 += 8; } else if (!memcmp (buf + o2, "OLYMPUS", 8)) { |