From: Rod W. <lis...@rw...> - 2002-11-08 06:32:46
|
[The weird email address is a spam-prevention measure. It will reach me until I start to get spam on that address (and I will know that the spamm= er somehow got the address from this list), at which time it will be bounced and I will start to use a new address. You can also contact me via sourceforge.] Lutz M=FCller wrote: > If you think the framework that is in CVS is useful, you could code for > example along libexif/olympus. But if you have other ideas on how to > handle MakerNotes, please tell them. I'm going to add MakerNote support to libexif for the Pentax Optio 230/330/430 range of cameras (I have a 330 myself). My goal is to allow makernote entries to be edited just like any other tag and then saved bac= k to a new file. It seems that the MakerNote fields for the currently supported cameras (Canon, Olympus, and now Pentax) follow a pseudo-IFD structure, and I'm wondering if it would be useful to just add another entry into the IFD en= um (EXIF_IFD_MAKER_NOTE), and then just re-use the existing exif_data_load_.= .. routines to load in the data (after any maker-specific prefix has been skipped over). The only thing which needs to be handled specially is tha= t the tags in the makernote are in a different namespace from the normal IF= D tags. It would also mean that the existing interface for editing tags in the exif program can be re-used (you just specify a different IFD for makernote tags). Does this sound like a reasonable idea ? I'm happy to write the code (an= d have actually started already) ... -- Rod Whitby |
From: Lutz <lu...@us...> - 2002-11-08 07:04:01
|
On Fri, 2002-11-08 at 07:25, Rod Whitby wrote: > It seems that the MakerNote fields for the currently supported cameras > (Canon, Olympus, and now Pentax) follow a pseudo-IFD structure, and I'm > wondering if it would be useful to just add another entry into the IFD en= um > (EXIF_IFD_MAKER_NOTE), and then just re-use the existing exif_data_load_.= .. > routines to load in the data (after any maker-specific prefix has been > skipped over). The problem is that most maker notes follow a _pseudo_-IFD structure. That is, some screw up with the byte order, others with the offset, others somewhere else... The code in exif-data will get unreadable. Please keep libexif as close as possible to the standard. You can always set up new objects like exif-mn-[entry,content,tag] (mn =3D MakerNote) inheriting from the exif-equivalents. For example, introduce=20 typedef struct _ExifMNContent ExifMNContent; struct _ExifMNContent { ExifContent parent; /* Insert here whatever you like */ }; etc. and=20 and use this object like an ExifContent: ExifMNContent *mn_content; ExifMNEntry *mn_entry; ExifMNContent * exif_mn_content_new (void) { ExifMNContent *mn_content; mn_content =3D malloc (sizeof (ExifMNContent)); exif_content_init ((ExifContent *) mn_content); } void exif_mn_content_some_function (ExifMNContent *mn_content) { ExifMNEntry *mn_entry; (...) exif_content_add_entry ((ExifContent *) mn_content, (ExifEntry *) mn_entry)); } > The only thing which needs to be handled specially is that > the tags in the makernote are in a different namespace from the normal IF= D This is the case _now_. I wouldn't rely on manufacturers sticking to that convention, as it isn't fixed in the spec. > tags. It would also mean that the existing interface for editing tags in > the exif program can be re-used (you just specify a different IFD for > makernote tags). See above. I think keeping the MakerNote stuff separate leads to code that is easier to maintain. What do you think? Lutz --=20 +----------------------------------------------+ | Lutz M=FCller +49 (7156) 34837 | | | | Hans-Sachs-Strasse 5 | | 71254 Ditzingen http://www.topfrose.de | | Germany lu...@us... | +----------------------------------------------+ |
From: Lutz <lu...@us...> - 2002-11-08 07:26:45
|
On Fri, 2002-11-08 at 09:04, Lutz M=FCller wrote: > You can always > set up new objects like exif-mn-[entry,content,tag] (mn =3D MakerNote) > inheriting from the exif-equivalents. (Me looking at the source...) I think I have already done something like that in libexif/libexif/olympus. Could you give me your opinion on that? Lutz --=20 +----------------------------------------------+ | Lutz M=FCller +49 (7156) 34837 | | | | Hans-Sachs-Strasse 5 | | 71254 Ditzingen http://www.topfrose.de | | Germany lu...@us... | +----------------------------------------------+ |