You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(22) |
Sep
(57) |
Oct
(39) |
Nov
(93) |
Dec
(72) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(15) |
Feb
(8) |
Mar
(12) |
Apr
(25) |
May
(2) |
Jun
|
Jul
(11) |
Aug
(32) |
Sep
(18) |
Oct
(53) |
Nov
|
Dec
(11) |
2004 |
Jan
(19) |
Feb
(1) |
Mar
(15) |
Apr
(17) |
May
(56) |
Jun
(19) |
Jul
(6) |
Aug
(16) |
Sep
(44) |
Oct
(31) |
Nov
(36) |
Dec
(13) |
2005 |
Jan
(2) |
Feb
(41) |
Mar
(304) |
Apr
(176) |
May
(19) |
Jun
(33) |
Jul
(14) |
Aug
(21) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
(8) |
2006 |
Jan
(18) |
Feb
(9) |
Mar
(5) |
Apr
(2) |
May
(2) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
(7) |
Oct
(10) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(124) |
Jun
(59) |
Jul
(1) |
Aug
(13) |
Sep
(3) |
Oct
(11) |
Nov
(30) |
Dec
(35) |
2008 |
Jan
(31) |
Feb
(42) |
Mar
(4) |
Apr
(5) |
May
(2) |
Jun
(12) |
Jul
(8) |
Aug
(2) |
Sep
(4) |
Oct
(5) |
Nov
(89) |
Dec
(23) |
2009 |
Jan
(71) |
Feb
(5) |
Mar
(8) |
Apr
(7) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(4) |
Sep
(58) |
Oct
(74) |
Nov
(53) |
Dec
(32) |
2010 |
Jan
(8) |
Feb
(13) |
Mar
(4) |
Apr
|
May
|
Jun
(10) |
Jul
(1) |
Aug
(2) |
Sep
(12) |
Oct
(17) |
Nov
(2) |
Dec
(24) |
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(24) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(20) |
Mar
(18) |
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(12) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(8) |
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
From: Lutz M?l. <lu...@us...> - 2003-09-05 14:37:43
|
Update of /cvsroot/libexif/gexif/libjpeg In directory sc8-pr-cvs1:/tmp/cvs-serv14895 Modified Files: jpeg-data.c Log Message: Index: jpeg-data.c =================================================================== RCS file: /cvsroot/libexif/gexif/libjpeg/jpeg-data.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- jpeg-data.c 13 Apr 2003 20:47:56 -0000 1.7 +++ jpeg-data.c 5 Sep 2003 14:37:40 -0000 1.8 @@ -125,6 +125,7 @@ break; case JPEG_MARKER_APP1: exif_data_save_data (s.content.app1, &ed, &eds); + if (!ed) break; *d = realloc (*d, sizeof (char) * (*ds + 2)); (*d)[*ds + 0] = (eds + 2) >> 8; (*d)[*ds + 1] = (eds + 2) >> 0; @@ -132,6 +133,7 @@ *d = realloc (*d, sizeof (char) * (*ds + eds)); memcpy (*d + *ds, ed, eds); *ds += eds; + free (ed); break; default: *d = realloc (*d, sizeof (char) * |
From: Lutz M?l. <lu...@us...> - 2003-09-05 14:37:21
|
Update of /cvsroot/libexif/exif/libjpeg In directory sc8-pr-cvs1:/tmp/cvs-serv14798 Modified Files: jpeg-data.c Log Message: Index: jpeg-data.c =================================================================== RCS file: /cvsroot/libexif/exif/libjpeg/jpeg-data.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- jpeg-data.c 13 Apr 2003 20:49:04 -0000 1.5 +++ jpeg-data.c 5 Sep 2003 14:37:15 -0000 1.6 @@ -125,6 +125,7 @@ break; case JPEG_MARKER_APP1: exif_data_save_data (s.content.app1, &ed, &eds); + if (!ed) break; *d = realloc (*d, sizeof (char) * (*ds + 2)); (*d)[*ds + 0] = (eds + 2) >> 8; (*d)[*ds + 1] = (eds + 2) >> 0; @@ -132,6 +133,7 @@ *d = realloc (*d, sizeof (char) * (*ds + eds)); memcpy (*d + *ds, ed, eds); *ds += eds; + free (ed); break; default: *d = realloc (*d, sizeof (char) * |
From: Lutz M?l. <lu...@us...> - 2003-09-05 14:36:53
|
Update of /cvsroot/libexif/libexif/libjpeg In directory sc8-pr-cvs1:/tmp/cvs-serv14644/libjpeg Modified Files: jpeg-data.c Log Message: 2003-09-05 Lutz Mueller <lu...@us...> * libjpeg/jpeg-data.c: Fix memory leak (discovered by Ralph Heidelberg <RHe...@Pi...) Index: jpeg-data.c =================================================================== RCS file: /cvsroot/libexif/libexif/libjpeg/jpeg-data.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- jpeg-data.c 13 Apr 2003 20:48:33 -0000 1.10 +++ jpeg-data.c 5 Sep 2003 14:36:44 -0000 1.11 @@ -125,6 +125,7 @@ break; case JPEG_MARKER_APP1: exif_data_save_data (s.content.app1, &ed, &eds); + if (!ed) break; *d = realloc (*d, sizeof (char) * (*ds + 2)); (*d)[*ds + 0] = (eds + 2) >> 8; (*d)[*ds + 1] = (eds + 2) >> 0; @@ -132,6 +133,7 @@ *d = realloc (*d, sizeof (char) * (*ds + eds)); memcpy (*d + *ds, ed, eds); *ds += eds; + free (ed); break; default: *d = realloc (*d, sizeof (char) * |
From: Lutz M?l. <lu...@us...> - 2003-09-05 14:36:53
|
Update of /cvsroot/libexif/libexif In directory sc8-pr-cvs1:/tmp/cvs-serv14644 Modified Files: ChangeLog Log Message: 2003-09-05 Lutz Mueller <lu...@us...> * libjpeg/jpeg-data.c: Fix memory leak (discovered by Ralph Heidelberg <RHe...@Pi...) Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- ChangeLog 25 Aug 2003 04:44:30 -0000 1.72 +++ ChangeLog 5 Sep 2003 14:36:44 -0000 1.73 @@ -1,3 +1,8 @@ +2003-09-05 Lutz Mueller <lu...@us...> + + * libjpeg/jpeg-data.c: Fix memory leak (discovered by + Ralph Heidelberg <RHe...@Pi...) + 2003-08-25 Lutz Mueller <lu...@us...> * libexif/exif-data.c: Fill unneeded bytes with 0. Suggestion by |
From: Matthieu C. <ma...@us...> - 2003-08-29 11:18:27
|
Update of /cvsroot/libexif/libmnote/libmnote/canon In directory sc8-pr-cvs1:/tmp/cvs-serv19184/libmnote/canon Modified Files: mnote-canon-data.c mnote-canon-entry.c Log Message: More sanity check Index: mnote-canon-data.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-data.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mnote-canon-data.c 28 Aug 2003 15:43:50 -0000 1.6 +++ mnote-canon-data.c 29 Aug 2003 11:18:21 -0000 1.7 @@ -235,6 +235,10 @@ #endif d+=2; size-=2; + + if ( 12 * n > size ) + return; + for (i = 0; i < n; i++) { tag = exif_get_short (d + 12 * i, order); Index: mnote-canon-entry.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-entry.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mnote-canon-entry.c 28 Aug 2003 15:43:50 -0000 1.6 +++ mnote-canon-entry.c 29 Aug 2003 11:18:21 -0000 1.7 @@ -175,13 +175,12 @@ switch (entry->tag) { case MNOTE_CANON_TAG_SETTINGS_1: CF (entry->format, EXIF_FORMAT_SHORT, v); - n = exif_get_short (data, order); + n = exif_get_short (data, order)/2; data+=2; + CC (entry->components, n, v); #ifdef DEBUG printf ("Setting1 size %d %d\n",n,entry->size); #endif - n=((entry->size>n)?n:entry->size)/2;//sanity check - for (i=1;i<n;i++) { vs = exif_get_short (data, order); @@ -539,13 +538,12 @@ case MNOTE_CANON_TAG_SETTINGS_2: CF (entry->format, EXIF_FORMAT_SHORT, v); - n = exif_get_short (data, order); + n = exif_get_short (data, order)/2; data += 2; + CC (entry->components, n, v); #ifdef DEBUG printf ("Setting2 size %d %d\n",n,entry->size); #endif - n=((entry->size>n)?n:entry->size)/2;//sanity check - for (i=1;i<n;i++) { vs = exif_get_short (data, order); @@ -654,12 +652,12 @@ case MNOTE_CANON_TAG_CUSTOM_FUNCS: CF (entry->format, EXIF_FORMAT_SHORT, v); - n = exif_get_short (data, order); + n = exif_get_short (data, order)/2; data+=2; + CC (entry->components, n, v); #ifdef DEBUG printf ("Custom Function size %d %d\n",n,entry->size); #endif - n=((entry->size>n)?n:entry->size)/2;//sanity check for (i=1;i<n;i++) { vs = exif_get_short (data, order); |
From: Matthieu C. <ma...@us...> - 2003-08-29 11:18:27
|
Update of /cvsroot/libexif/libmnote In directory sc8-pr-cvs1:/tmp/cvs-serv19184 Modified Files: ChangeLog Log Message: More sanity check Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libmnote/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ChangeLog 29 Aug 2003 09:36:19 -0000 1.14 +++ ChangeLog 29 Aug 2003 11:18:19 -0000 1.15 @@ -1,6 +1,8 @@ 2003-08-29 Matthieu Castet <ma...@us...> * libmnote/olympus/mnote-olympus-entry.c: strncat fixe. + * libmnote/canon/mnote-canon-data.c: More sanity check. + * libmnote/canon/mnote-entry-data.c: More sanity check. 2003-08-28 Matthieu Castet <ma...@us...> |
From: Matthieu C. <ma...@us...> - 2003-08-29 09:36:24
|
Update of /cvsroot/libexif/libmnote/libmnote/olympus In directory sc8-pr-cvs1:/tmp/cvs-serv3738/libmnote/olympus Modified Files: mnote-olympus-entry.c Log Message: strncat fixe Index: mnote-olympus-entry.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/olympus/mnote-olympus-entry.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mnote-olympus-entry.c 24 Jul 2003 20:18:11 -0000 1.5 +++ mnote-olympus-entry.c 29 Aug 2003 09:36:19 -0000 1.6 @@ -184,28 +184,32 @@ snprintf (buf, sizeof (buf), "%li", vl); strncpy (v, buf, sizeof (v)); } - strncat (v, "/", sizeof (v)); + strncat (v, "/", sizeof (v) - 1 - strlen(v)); vl = exif_get_long (entry->data + 4, order); snprintf (buf, sizeof (buf), "%li", vl); - strncat (v, buf, sizeof (v)); - strncat (v, "/", sizeof (v)); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); + strncat (v, "/", sizeof (v) - 1 - strlen(v)); vl = exif_get_long (entry->data + 4, order); switch (vl) { case 1: - strncat (v, _("left to right"), sizeof (v)); + strncat (v, _("left to right"), + sizeof (v) - 1 - strlen(v)); break; case 2: - strncat (v, _("right to left"), sizeof (v)); + strncat (v, _("right to left"), + sizeof (v) - 1 - strlen(v)); break; case 3: - strncat (v, _("bottom to top"), sizeof (v)); + strncat (v, _("bottom to top"), + sizeof (v) - 1 - strlen(v)); break; case 4: - strncat (v, _("top to bottom"), sizeof (v)); + strncat (v, _("top to bottom"), + sizeof (v) - 1 - strlen(v)); break; default: snprintf (buf, sizeof (buf), "%li", vl); - strncat (v, buf, sizeof (v)); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); } break; case MNOTE_OLYMPUS_TAG_QUALITY: |
From: Matthieu C. <ma...@us...> - 2003-08-29 09:36:23
|
Update of /cvsroot/libexif/libmnote In directory sc8-pr-cvs1:/tmp/cvs-serv3738 Modified Files: ChangeLog Log Message: strncat fixe Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libmnote/ChangeLog,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ChangeLog 28 Aug 2003 15:43:50 -0000 1.13 +++ ChangeLog 29 Aug 2003 09:36:19 -0000 1.14 @@ -1,62 +1,66 @@ +2003-08-29 Matthieu Castet <ma...@us...> + + * libmnote/olympus/mnote-olympus-entry.c: strncat fixe. + 2003-08-28 Matthieu Castet <ma...@us...> - - * libmnote/mnote-data.c: Better detection of canon maker note - if we have EXIF data. - * libmnote/test/test-mnote.c: if USE_EXIF_DATA is define, - handles EXIF data. - * libmnote/canon/mnote-canon-data.c: Works also if we don't - have EXIF data. - * Add Changelog for 2003-08-26. + + * libmnote/mnote-data.c: Better detection of canon maker note + if we have EXIF data. + * libmnote/test/test-mnote.c: if USE_EXIF_DATA is define, + handles EXIF data. + * libmnote/canon/mnote-canon-data.c: Works also if we don't + have EXIF data. + * Add Changelog for 2003-08-26. 2003-08-26 Lutz Mueller <lu...@us...> - * libmnote/canon/*: Lots of improvements from matthieu - <ma...@if...> Canon Maker note works (at less - the tags describe at http://www.burren.cx/david/canon.html). + * libmnote/canon/*: Lots of improvements from matthieu + <ma...@if...> Canon Maker note works (at less + the tags describe at http://www.burren.cx/david/canon.html). 2003-08-25 Lutz Mueller <lu...@us...> - * libmnote/mnote-data.c (mnote_data_new_from_path): New - (mnote_data_new_from_data): Now handles EXIF data, too (instead - of only MakerNote data). + * libmnote/mnote-data.c (mnote_data_new_from_path): New + (mnote_data_new_from_data): Now handles EXIF data, too (instead + of only MakerNote data). 2003-07-24 Lutz Mueller <lu...@us...> - * libmnote: Lots of improvements from Al Evans <al...@tb...>. + * libmnote: Lots of improvements from Al Evans <al...@tb...>. 2002-11-19 Lutz Müller <lu...@us...> - * libmnote.spec.in - * COPYING: LGPL + * libmnote.spec.in + * COPYING: LGPL 2002-11-15 Rod Whitby <sof...@rw...> - * README: - * AUTHORS: Added my details. + * README: + * AUTHORS: Added my details. 2002-11-15 Lutz Müller <lu...@us...> - * configure.in: AC_DEFINE(HAVE_MNOTE) + * configure.in: AC_DEFINE(HAVE_MNOTE) 2002-11-15 Lutz Müller <lu...@us...> - * test: New + * test: New 2002-11-15 Lutz Müller <lu...@us...> - * README: - * AUTHORS: Correct. + * README: + * AUTHORS: Correct. 2002-11-15 Lutz Müller <lu...@us...> - * configure.in: Or should we leave the gettext stuff in? - * libmnote/*/Makefile.am: Make the library compile. + * configure.in: Or should we leave the gettext stuff in? + * libmnote/*/Makefile.am: Make the library compile. 2002-11-15 Lutz Müller <lu...@us...> - * configure.in: Don't check the gettext stuff in CVS. + * configure.in: Don't check the gettext stuff in CVS. 2002-11-15 Lutz Müller <lu...@us...> - * .cvsignore: New + * .cvsignore: New |
From: Matthieu C. <ma...@us...> - 2003-08-28 15:44:36
|
Update of /cvsroot/libexif/libmnote/test In directory sc8-pr-cvs1:/tmp/cvs-serv23705/test Modified Files: test-mnote.c Log Message: Canon bugfixe Index: test-mnote.c =================================================================== RCS file: /cvsroot/libexif/libmnote/test/test-mnote.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- test-mnote.c 15 Nov 2002 22:10:08 -0000 1.1 +++ test-mnote.c 28 Aug 2003 15:43:50 -0000 1.2 @@ -7,15 +7,17 @@ int main (int argc, char **argv) { +#ifndef USE_EXIF_DATA ExifData *ed; ExifEntry *e; +#endif MNoteData *md; if (argc < 2) { fprintf (stderr, "You need to supply a file!\n"); return (1); } - +#ifndef USE_EXIF_DATA ed = exif_data_new_from_file (argv[1]); if (!ed) { fprintf (stderr, "Could not retreive EXIF data from '%s'!\n", @@ -35,7 +37,9 @@ md = mnote_data_new_from_data (e->data, e->size); exif_data_unref (ed); - +#else + md = mnote_data_new_from_file(argv[1]); +#endif if (!md) { fprintf (stderr, "Could not parse EXIF tag MakerNote!\n"); return (1); |
From: Matthieu C. <ma...@us...> - 2003-08-28 15:44:35
|
Update of /cvsroot/libexif/libmnote/libmnote In directory sc8-pr-cvs1:/tmp/cvs-serv23705/libmnote Modified Files: mnote-data.c Log Message: Canon bugfixe Index: mnote-data.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/mnote-data.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mnote-data.c 25 Aug 2003 21:00:23 -0000 1.5 +++ mnote-data.c 28 Aug 2003 15:43:50 -0000 1.6 @@ -109,7 +109,7 @@ { MNoteData *note = NULL; ExifData *d = NULL; - ExifEntry *e = NULL; + ExifEntry *e = NULL, *cons = NULL; const unsigned char *p = data; if (!size || !data) return NULL; @@ -119,12 +119,18 @@ * to figure out which parser to use. */ d = exif_data_new_from_data (data, size); - if (d) e = exif_content_get_entry (d->ifd[EXIF_IFD_EXIF], + if (d) { + e = exif_content_get_entry (d->ifd[EXIF_IFD_EXIF], EXIF_TAG_MAKER_NOTE); + cons = exif_content_get_entry (d->ifd[EXIF_IFD_0], + EXIF_TAG_MAKE); + } if (e) p = e->data; /* Canon notes begin with 0x0000 */ - if ((size > 1) && (p[0] == 0x00) && (p[1] == 0x00)) { + if ((size > 1) && (( (p[0] == 0x00) && (p[1] == 0x00)) || + /*canon G3*/( (p[0] == 0x0E) && (p[1] == 0x00) ) || + (cons && !strcmp(exif_entry_get_value(cons), "Canon")) )){ #ifdef DEBUG printf ("Detected Canon maker note.\n"); #endif |
From: Matthieu C. <ma...@us...> - 2003-08-28 15:44:35
|
Update of /cvsroot/libexif/libmnote/libmnote/canon In directory sc8-pr-cvs1:/tmp/cvs-serv23705/libmnote/canon Modified Files: mnote-canon-data.c mnote-canon-entry.c Log Message: Canon bugfixe Index: mnote-canon-data.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-data.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mnote-canon-data.c 26 Aug 2003 20:51:33 -0000 1.5 +++ mnote-canon-data.c 28 Aug 2003 15:43:50 -0000 1.6 @@ -1,7 +1,7 @@ /* mnote-canon-data.c * * Copyright © 2002 Lutz Müller <lu...@us...> - * Copyright © 2003 Matthieu Castet <ma...@us...> + * Copyright © 2003 Matthieu Castet <ma...@us...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -90,14 +90,15 @@ } static void -mnote_canon_data_load_data_entry (MNoteCanonData *note, - MNoteCanonEntry *entry, - const unsigned char *d, - unsigned int size, unsigned int offset, - const unsigned char *exifdata, unsigned int exifsize) +mnote_canon_data_load_data_entry_with_exif (MNoteCanonData *note, + MNoteCanonEntry *entry, + const unsigned char *d, + unsigned int size, unsigned int offset, + const unsigned char *exifdata, + unsigned int exifsize) { unsigned int s, doff, sizetmp = size; - const unsigned char *temp=d; + const unsigned char *temp = d; ExifByteOrder order = mnote_data_get_byte_order ((MNoteData *) note); entry->tag = exif_get_short (d + offset + 0, order); @@ -134,6 +135,46 @@ } +static void +mnote_canon_data_load_data_entry (MNoteCanonData *note, + MNoteCanonEntry *entry, + const unsigned char *d, + unsigned int size, unsigned int offset) +{ + unsigned int s, doff; + ExifByteOrder order = mnote_data_get_byte_order ((MNoteData *) note); + + entry->tag = exif_get_short (d + offset + 0, order); + entry->format = exif_get_short (d + offset + 2, order); + entry->components = exif_get_long (d + offset + 4, order); + + /* + * Size? If bigger than 4 bytes, the actual data is not + * in the entry but somewhere else (offset). + */ + s = exif_format_get_size (entry->format) * entry->components; + if (!s) + return; + if (s > 4) + //FIXME works on g3, but other should send exif data... + doff = exif_get_long (d + offset + 8, order)-0x3B0 ; + else + doff = offset + 8; + +#ifdef DEBUG + printf ("Comp %x %d %d %x %x\n",doff, s,size,d[doff],d[doff+1]); +#endif + /* Sanity check */ + if (size < doff + s) + return; + entry->data = malloc (sizeof (char) * s); + if (!entry->data) + return; + entry->size = s; + memcpy (entry->data, d + doff, s); + +} + static void mnote_canon_data_load_data (MNoteData *ne, const unsigned char *d_exif, unsigned int size_exif) @@ -160,11 +201,14 @@ if (ed) { e = exif_content_get_entry (ed->ifd[EXIF_IFD_EXIF], EXIF_TAG_MAKER_NOTE); - order = exif_data_get_byte_order (ed); if (e) { d = e->data; size = e->size; + order = exif_data_get_byte_order (ed); +#ifdef DEBUG + printf ("Exif data\n"); +#endif } } @@ -173,7 +217,16 @@ #ifdef DEBUG printf ("Parsing %i byte(s) Mnote data...\n", size); #endif - +#ifdef DEBUG + int j; + for (j=0;j<size;j++) + { + if (!(j%16)) printf("\n"); + printf("%02X ",d[j]);} + + printf("\n%d\n",size); + printf("%d\n",order); +#endif /* Read the number of entries */ n = exif_get_short (d ,order); @@ -191,21 +244,17 @@ #endif entry = mnote_canon_entry_new (); mnote_canon_data_add_entry (data, entry); - mnote_canon_data_load_data_entry (data, entry, d, size, - 12 * i, d_exif, size_exif); + if (e) //we have exif data + mnote_canon_data_load_data_entry_with_exif (data, entry, + d, size, 12 * i, + d_exif, size_exif); + else + mnote_canon_data_load_data_entry (data, entry, d, size, + 12 * i); mnote_canon_entry_unref (entry); } exif_data_unref (ed); -#ifdef DEBUG - int j; - for (j=0;j<size;j++) - { - if (!(j%16)) printf("\n"); - printf("%02X ",d[j]);} - printf("\n%d\n",size); - printf("%d",order); -#endif } static unsigned int Index: mnote-canon-entry.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-entry.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mnote-canon-entry.c 26 Aug 2003 20:52:33 -0000 1.5 +++ mnote-canon-entry.c 28 Aug 2003 15:43:50 -0000 1.6 @@ -1,7 +1,7 @@ /* mnote-canon-entry.c * * Copyright © 2002 Lutz Müller <lu...@us...> - * Copyright © 2003 Matthieu Castet <ma...@us...> + * Copyright © 2003 Matthieu Castet <ma...@us...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public |
From: Matthieu C. <ma...@us...> - 2003-08-28 15:44:34
|
Update of /cvsroot/libexif/libmnote In directory sc8-pr-cvs1:/tmp/cvs-serv23705 Modified Files: ChangeLog Log Message: Canon bugfixe Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libmnote/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ChangeLog 26 Aug 2003 20:51:33 -0000 1.12 +++ ChangeLog 28 Aug 2003 15:43:50 -0000 1.13 @@ -1,7 +1,18 @@ +2003-08-28 Matthieu Castet <ma...@us...> + + * libmnote/mnote-data.c: Better detection of canon maker note + if we have EXIF data. + * libmnote/test/test-mnote.c: if USE_EXIF_DATA is define, + handles EXIF data. + * libmnote/canon/mnote-canon-data.c: Works also if we don't + have EXIF data. + * Add Changelog for 2003-08-26. + 2003-08-26 Lutz Mueller <lu...@us...> * libmnote/canon/*: Lots of improvements from matthieu - <ma...@if...> (without ChangeLog entry). + <ma...@if...> Canon Maker note works (at less + the tags describe at http://www.burren.cx/david/canon.html). 2003-08-25 Lutz Mueller <lu...@us...> |
From: Lutz M?l. <lu...@us...> - 2003-08-26 20:52:36
|
Update of /cvsroot/libexif/libmnote/libmnote/canon In directory sc8-pr-cvs1:/tmp/cvs-serv31714 Modified Files: mnote-canon-entry.c Log Message: Index: mnote-canon-entry.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-entry.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mnote-canon-entry.c 26 Aug 2003 20:51:34 -0000 1.4 +++ mnote-canon-entry.c 26 Aug 2003 20:52:33 -0000 1.5 @@ -686,6 +686,7 @@ else if (entry->format == EXIF_FORMAT_ASCII) strncpy (v, data, sizeof (v)); #endif + break; } return strdup (v); |
From: Lutz M?l. <lu...@us...> - 2003-08-26 20:51:46
|
Update of /cvsroot/libexif/libmnote/libmnote/canon In directory sc8-pr-cvs1:/tmp/cvs-serv31473/libmnote/canon Modified Files: mnote-canon-data.c mnote-canon-entry.c mnote-canon-entry.h mnote-canon-tag.c Log Message: 2003-08-26 Lutz Mueller <lu...@us...> * libmnote/canon/*: Lots of improvements from matthieu <ma...@if...> (without ChangeLog entry). Index: mnote-canon-entry.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-entry.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mnote-canon-entry.c 15 Dec 2002 11:44:18 -0000 1.3 +++ mnote-canon-entry.c 26 Aug 2003 20:51:34 -0000 1.4 @@ -1,6 +1,7 @@ /* mnote-canon-entry.c * * Copyright © 2002 Lutz Müller <lu...@us...> + * Copyright © 2003 Matthieu Castet <ma...@us...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,11 +20,19 @@ */ #include "config.h" +#include "i18n.h" + #include "mnote-canon-entry.h" +#include <stdio.h> #include <stdlib.h> #include <string.h> +#include <libexif/exif-format.h> +#include <libexif/exif-utils.h> + +//#define DEBUG + struct _MNoteCanonEntryPrivate { unsigned int ref_count; }; @@ -87,4 +96,597 @@ } free (entry); +} + +void +mnote_canon_entry_dump (MNoteEntry *e, unsigned int indent) +{ + MNoteCanonEntry *entry = (MNoteCanonEntry *)e; + + char buf[1024]; + unsigned int i; + + for (i = 0; i < 2 * indent; i++) + buf[i] = ' '; + buf[i] = '\0'; + + if (!e) + return; +#ifndef DEBUG + if (mnote_canon_tag_get_name (entry->tag)!=NULL) + { +#endif + printf ("%sTag: 0x%x ('%s')\n", buf, entry->tag, + mnote_canon_tag_get_name (entry->tag)); +#ifdef DEBUG + printf ("%s Format: %i ('%s')\n", buf, entry->format, + exif_format_get_name (entry->format)); + printf ("%s Components: %i\n", buf, (int) entry->components); + printf ("%s Size: %i\n", buf, entry->size); +#endif + printf ("%s Value: %s\n", buf, mnote_canon_entry_get_value (entry)); +#ifndef DEBUG + } +#endif +} + +#define CF(format,target,v) \ +{ \ + if (format != target) { \ + snprintf (v, sizeof (v), \ + _("Invalid format '%s', " \ + "expected '%s'."), \ + exif_format_get_name (format), \ + exif_format_get_name (target)); \ + break; \ + } \ +} + +#define CC(number,target,v) \ +{ \ + if (number != target) { \ + snprintf (v, sizeof (v), \ + _("Invalid number of components (%i, " \ + "expected %i)."), (int) number, (int) target); \ + break; \ + } \ +} + +char * +mnote_canon_entry_get_value (const MNoteCanonEntry *entry) +{ + char v[1024], buf[1024]; + ExifByteOrder order; + ExifLong vl; + ExifShort vs,n; + int i; + unsigned char *data = entry->data; + + if (!entry) + return (NULL); + if (!entry->parent) + return (NULL); + + memset (v, 0, sizeof (v)); + order = mnote_data_get_byte_order ((MNoteData *) &entry->parent->parent); +#ifdef DEBUG + printf ("Processing Tag %x\n",entry->tag); +#endif + switch (entry->tag) { + case MNOTE_CANON_TAG_SETTINGS_1: + CF (entry->format, EXIF_FORMAT_SHORT, v); + n = exif_get_short (data, order); + data+=2; +#ifdef DEBUG + printf ("Setting1 size %d %d\n",n,entry->size); +#endif + n=((entry->size>n)?n:entry->size)/2;//sanity check + + for (i=1;i<n;i++) + { + vs = exif_get_short (data, order); + data+=2; + switch(i) { + case 1: + strncpy (v, _("Macro mode : "), sizeof (v) - 1); + switch (vs) { + case 1: + strncat (v, _("Macro"), sizeof (v) - 1 - strlen(v)); + break; + case 2: + strncat (v, _("Normal"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 2: + if (vs) + { + snprintf (buf, sizeof (buf), _(" / Self Timer : %i (ms)"), vs*100); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 4: + strncat (v,_(" / Flash mode : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("Flash not fired"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("auto"), sizeof (v) - 1 - strlen(v)); + break; + case 2: + strncat (v, _("on"), sizeof (v) - 1 - strlen(v)); + break; + case 3: + strncat (v, _("red eyes reduction"), sizeof (v) - 1 - strlen(v)); + break; + case 4: + strncat (v, _("slow synchro"), sizeof (v) - 1 - strlen(v)); + break; + case 5: + strncat (v, _("auto + red eyes reduction"), sizeof (v) - 1 - strlen(v)); + break; + case 6: + strncat (v, _("on + red eyes reduction"), sizeof (v) - 1 - strlen(v)); + break; + case 16: + strncat (v, _("external"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 5: + strncat (v, _(" / Continuous drive mode : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("single or timer"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("continuous"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 7: + strncat (v, _(" / Focus mode : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("One-Shot"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("AI Servo"), sizeof (v) - 1 - strlen(v)); + break; + case 2: + strncat (v, _("AI Focus"), sizeof (v) - 1 - strlen(v)); + break; + case 3: + strncat (v, _("MF"), sizeof (v) - 1 - strlen(v)); + break; + case 4: + strncat (v, _("Single"), sizeof (v) - 1 - strlen(v)); + break; + case 5: + strncat (v, _("Continuous"), sizeof (v) - 1 - strlen(v)); + break; + case 6: + strncat (v, _("MF"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 10: + strncat (v, _(" / Image size : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("Large"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("Medium"), sizeof (v) - 1 - strlen(v)); + break; + case 2: + strncat (v, _("Small"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 11: + strncat (v, _(" / Easy shooting mode : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("Full Auto"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("Manual"), sizeof (v) - 1 - strlen(v)); + break; + case 2: + strncat (v, _("Landscape"), sizeof (v) - 1 - strlen(v)); + break; + case 3: + strncat (v, _("Fast Shutter"), sizeof (v) - 1 - strlen(v)); + break; + case 4: + strncat (v, _("Slow Shutter"), sizeof (v) - 1 - strlen(v)); + break; + case 5: + strncat (v, _("Night"), sizeof (v) - 1 - strlen(v)); + break; + case 6: + strncat (v, _("Black & White"), sizeof (v) - 1 - strlen(v)); + break; + case 7: + strncat (v, _("Sepia"), sizeof (v) - 1 - strlen(v)); + break; + case 8: + strncat (v, _("Portrait"), sizeof (v) - 1 - strlen(v)); + break; + case 9: + strncat (v, _("Sports"), sizeof (v) - 1 - strlen(v)); + break; + case 10: + strncat (v, _("Macro / Close-Up"), sizeof (v) - 1 - strlen(v)); + break; + case 11: + strncat (v, _("Pan Focus"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 13: + strncat (v, _(" / Contrast : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0xffff: + strncat (v, _("Low"), sizeof (v) - 1 - strlen(v)); + break; + case 0x0000: + strncat (v, _("Normal"), sizeof (v) - 1 - strlen(v)); + break; + case 0x0001: + strncat (v, _("High"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 14: + strncat (v, _(" / Saturation : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0xffff: + strncat (v, _("Low"), sizeof (v) - 1 - strlen(v)); + break; + case 0x0000: + strncat (v, _("Normal"), sizeof (v) - 1 - strlen(v)); + break; + case 0x0001: + strncat (v, _("High"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 15: + strncat (v, _(" / Sharpness : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0xffff: + strncat (v, _("Low"), sizeof (v) - 1 - strlen(v)); + break; + case 0x0000: + strncat (v, _("Normal"), sizeof (v) - 1 - strlen(v)); + break; + case 0x0001: + strncat (v, _("High"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 16: + if (vs) + { + strncat (v, _(" / ISO : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 15: + strncat (v, _("auto"), sizeof (v) - 1 - strlen(v)); + break; + case 16: + strncat (v, _("50"), sizeof (v) - 1 - strlen(v)); + break; + case 17: + strncat (v, _("100"), sizeof (v) - 1 - strlen(v)); + break; + case 18: + strncat (v, _("200"), sizeof (v) - 1 - strlen(v)); + break; + case 19: + strncat (v, _("400"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + } + case 17: + strncat (v, _(" / Metering mode : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 3: + strncat (v, _("Evaluative"), sizeof (v) - 1 - strlen(v)); + break; + case 4: + strncat (v, _("Partial"), sizeof (v) - 1 - strlen(v)); + break; + case 5: + strncat (v, _("Center-weighted"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 19: + strncat (v, _(" / AF point selected : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0x3000: + strncat (v, _("none (MF)"), sizeof (v) - 1 - strlen(v)); + break; + case 0x3001: + strncat (v, _("auto-selected"), sizeof (v) - 1 - strlen(v)); + break; + case 0x3002: + strncat (v, _("right"), sizeof (v) - 1 - strlen(v)); + break; + case 0x3003: + strncat (v, _("center"), sizeof (v) - 1 - strlen(v)); + break; + case 0x3004: + strncat (v, _("left"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "0x%x???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 20: + strncat (v, _(" / Exposure mode : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("Easy shooting"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("Program"), sizeof (v) - 1 - strlen(v)); + break; + case 2: + strncat (v, _("Tv-priority"), sizeof (v) - 1 - strlen(v)); + break; + case 3: + strncat (v, _("Av-priority"), sizeof (v) - 1 - strlen(v)); + break; + case 4: + strncat (v, _("Manual"), sizeof (v) - 1 - strlen(v)); + break; + case 5: + strncat (v, _("A-DEP"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 23: + snprintf (buf, sizeof (buf), " / %s : %u", _("long focal length of lens (in focal units)"), vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + break; + case 24: + snprintf (buf, sizeof (buf), " / %s : %u", _("short focal length of lens (in focal units)"), vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + break; + case 25: + snprintf (buf, sizeof (buf), " / %s : %u", _("focal units per mm"), vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + break; + case 29: + strncat (v, _(" / Flash details : "), sizeof (v) - 1 - strlen(v)); + if ((vs>>14)&1) + strncat (v, _("External E-TTL"), sizeof (v) - 1 - strlen(v)); + if ((vs>>13)&1) + strncat (v, _("Internal flash"), sizeof (v) - 1 - strlen(v)); + if ((vs>>11)&1) + strncat (v, _("FP sync used"), sizeof (v) - 1 - strlen(v)); + if ((vs>>4)&1) + strncat (v, _("FP sync enabled"), sizeof (v) - 1 - strlen(v)); +#ifdef DEBUG + printf ("Value29=0x%08x\n", vs); +#endif + break; + case 32: + snprintf (buf, sizeof (buf), " / %s : ", _("Focus mode2")); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("Single"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("Continuous"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; +#ifdef DEBUG + default: + printf ("Value%d=%d\n", i, vs); +#endif + } + } + + break; + + case MNOTE_CANON_TAG_SETTINGS_2: + CF (entry->format, EXIF_FORMAT_SHORT, v); + n = exif_get_short (data, order); + data += 2; +#ifdef DEBUG + printf ("Setting2 size %d %d\n",n,entry->size); +#endif + n=((entry->size>n)?n:entry->size)/2;//sanity check + + for (i=1;i<n;i++) + { + vs = exif_get_short (data, order); + data+=2; + switch(i) { + case 7: + strncpy (v, _("White balance : "), sizeof (v) - 1 - strlen(v)); + switch (vs) { + case 0: + strncat (v, _("Auto"), sizeof (v) - 1 - strlen(v)); + break; + case 1: + strncat (v, _("Sunny"), sizeof (v) - 1 - strlen(v)); + break; + case 2: + strncat (v, _("Cloudy"), sizeof (v) - 1 - strlen(v)); + break; + case 3: + strncat (v, _("Tungsten"), sizeof (v) - 1 - strlen(v)); + break; + case 4: + strncat (v, _("Flourescent"), sizeof (v) - 1 - strlen(v)); + break; + case 5: + strncat (v, _("Flash"), sizeof (v) - 1 - strlen(v)); + break; + case 6: + strncat (v, _("Custom"), sizeof (v) - 1 - strlen(v)); + break; + default: + snprintf (buf, sizeof (buf), "%i???", vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + case 9: + snprintf (buf, sizeof (buf), " / %s : %u", _("Sequence number"), vs); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); + + break; + case 14: + if (vs>>12) + { + strncat (v, _(" / AF point used : "), sizeof (v) - 1 - strlen(v)); + if (vs&1) + strncat (v, _("Right"), sizeof (v) - 1 - strlen(v)); + if ((vs>>1)&1) + strncat (v, _("Center"), sizeof (v) - 1 - strlen(v)); + if ((vs>>2)&1) + strncat (v, _("Left"), sizeof (v) - 1 - strlen(v)); + snprintf (buf, sizeof (buf), " (%u %s)", vs>>12, _("available focus point")); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); + } +#ifdef DEBUG + printf ("0x%08x\n", vs); +#endif + break; + case 15: + snprintf (buf, sizeof (buf), " / %s : %.2f EV", _("Flash bias"), vs/32.0); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); + + break; + case 19: + snprintf (buf, sizeof (buf), " / %s : %u", _("Subject Distance (mm)"), vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + break; +#ifdef DEBUG + default: + printf ("Value%d=%d\n", i, vs); +#endif + } + } + + break; + + case MNOTE_CANON_TAG_IMAGE_TYPE: + CF (entry->format, EXIF_FORMAT_ASCII, v); + CC (entry->components, 32, v); + strncpy (v,data,sizeof (v)); + break; + + case MNOTE_CANON_TAG_FIRMWARE: + CF (entry->format, EXIF_FORMAT_ASCII, v); + CC (entry->components, 24, v); + strncpy (v,data,sizeof (v)); + break; + + case MNOTE_CANON_TAG_IMAGE_NUMBER: + CF (entry->format, EXIF_FORMAT_LONG, v); + CC (entry->components, 1, v); + vl = exif_get_long (data, order); + snprintf (v, sizeof (v), "%03lu-%04lu", vl/10000,vl%10000); + break; + + case MNOTE_CANON_TAG_OWNER: + CF (entry->format, EXIF_FORMAT_ASCII, v); + CC (entry->components, 32, v); + strncpy (v,data,sizeof (v)); + break; + + case MNOTE_CANON_TAG_SERIAL_NUMBER: + CF (entry->format, EXIF_FORMAT_LONG, v); + CC (entry->components, 1, v); + vl = exif_get_long (data, order); + snprintf (v, sizeof (v), "%04X-%05d", (int)vl>>16,(int)vl&0xffff); + break; + + case MNOTE_CANON_TAG_CUSTOM_FUNCS: + CF (entry->format, EXIF_FORMAT_SHORT, v); + n = exif_get_short (data, order); + data+=2; +#ifdef DEBUG + printf ("Custom Function size %d %d\n",n,entry->size); +#endif + n=((entry->size>n)?n:entry->size)/2;//sanity check + for (i=1;i<n;i++) + { + vs = exif_get_short (data, order); + data += 2; + snprintf (buf, sizeof(buf), "C.F%d : %u", i, vs); + strncat (v,buf, sizeof (v) - 1 - strlen(v)); + } + break; + + default: +#ifdef DEBUG + if (entry->format == EXIF_FORMAT_SHORT) + for(i=0;i<entry->components;i++) { + vs = exif_get_short (data, order); + data+=2; + printf ("Value%d=%d\n", i, vs); + } + else if (entry->format == EXIF_FORMAT_LONG) + for(i=0;i<entry->components;i++) { + vl = exif_get_long (data, order); + data+=4; + printf ("Value%d=%d\n", i, vs); + } + else if (entry->format == EXIF_FORMAT_ASCII) + strncpy (v, data, sizeof (v)); +#endif + } + + return strdup (v); } Index: mnote-canon-entry.h =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-entry.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mnote-canon-entry.h 15 Dec 2002 11:44:18 -0000 1.2 +++ mnote-canon-entry.h 26 Aug 2003 20:51:34 -0000 1.3 @@ -49,4 +49,8 @@ void mnote_canon_entry_unref (MNoteCanonEntry *entry); void mnote_canon_entry_free (MNoteCanonEntry *entry); +char *mnote_canon_entry_get_value (const MNoteCanonEntry *entry); + +void mnote_canon_entry_dump (MNoteEntry *entry, unsigned int indent); + #endif /* __MNOTE_CANON_ENTRY_H__ */ Index: mnote-canon-data.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-data.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mnote-canon-data.c 15 Dec 2002 11:44:18 -0000 1.4 +++ mnote-canon-data.c 26 Aug 2003 20:51:33 -0000 1.5 @@ -1,6 +1,7 @@ /* mnote-canon-data.c * * Copyright © 2002 Lutz Müller <lu...@us...> + * Copyright © 2003 Matthieu Castet <ma...@us...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,24 +23,47 @@ #include "mnote-canon-data.h" #include <stdlib.h> +#include <stdio.h> #include <string.h> +#include <libexif/exif-byte-order.h> +#include <libexif/exif-utils.h> +#include <libexif/exif-data.h> + +//#define DEBUG + static void mnote_canon_data_free (MNoteData *n) { - MNoteCanonData *note = (MNoteCanonData *) n; - - note = NULL; + MNoteCanonData *note = (MNoteCanonData *) n; + unsigned int i; + + if (note->entries) { + for (i = 0; i < note->count; i++) + mnote_canon_entry_unref (note->entries[i]); + free (note->entries); + note->entries = NULL; + note->count = 0; + } } static char * mnote_canon_data_get_value (MNoteData *n, MNoteTag t) { - MNoteCanonData *note = (MNoteCanonData *) n; + + char *value = NULL; + unsigned int i, count; - note = NULL; + MNoteCanonData *note = (MNoteCanonData *) n; + MNoteCanonTag tag = (MNoteCanonTag) t; - return (NULL); + for (count = i = 0; !value && i < note->count; i++) { + if (note->entries[i]->tag == tag) { + value = mnote_canon_entry_get_value (note->entries[i]); + } + } + + return (value); } static void @@ -52,12 +76,174 @@ } static void -mnote_canon_data_load_data (MNoteData *n, const unsigned char *data, - unsigned int size) +mnote_canon_data_add_entry (MNoteCanonData *note, MNoteCanonEntry *entry) +{ + if (!note || !entry) + return; + + entry->parent = note; + note->entries = realloc (note->entries, + sizeof (MNoteCanonEntry) * (note->count + 1)); + note->entries[note->count] = entry; + mnote_canon_entry_ref (entry); + note->count++; +} + +static void +mnote_canon_data_load_data_entry (MNoteCanonData *note, + MNoteCanonEntry *entry, + const unsigned char *d, + unsigned int size, unsigned int offset, + const unsigned char *exifdata, unsigned int exifsize) { - MNoteCanonData *note = (MNoteCanonData *) n; + unsigned int s, doff, sizetmp = size; + const unsigned char *temp=d; + ExifByteOrder order = mnote_data_get_byte_order ((MNoteData *) note); + + entry->tag = exif_get_short (d + offset + 0, order); + entry->format = exif_get_short (d + offset + 2, order); + entry->components = exif_get_long (d + offset + 4, order); - note = NULL; + /* + * Size? If bigger than 4 bytes, the actual data is not + * in the entry but somewhere else (offset). + */ + s = exif_format_get_size (entry->format) * entry->components; + if (!s) + return; + if (s > 4) + { + doff = exif_get_long (d + offset + 8, order) + 0xC; + sizetmp = exifsize; + temp = exifdata; + } + else + doff = offset + 8; + +#ifdef DEBUG + printf ("Comp %x %d %d %x %x\n",doff, s, sizetmp,temp[doff],temp[doff+1]); +#endif + /* Sanity check */ + if (sizetmp < doff + s) + return; + entry->data = malloc (sizeof (char) * s); + if (!entry->data) + return; + entry->size = s; + memcpy (entry->data, temp + doff, s); + +} + +static void +mnote_canon_data_load_data (MNoteData *ne, const unsigned char *d_exif, + unsigned int size_exif) +{ + MNoteCanonData *data = (MNoteCanonData *) ne; + + const unsigned char *d = d_exif; + ExifData *ed = NULL; + ExifEntry *e = NULL; + ExifByteOrder order = EXIF_BYTE_ORDER_INTEL; + ExifShort n; + unsigned int i; + unsigned int size = size_exif; + MNoteCanonEntry *entry; + MNoteCanonTag tag; + + if (!data) + return; + if (!d_exif || !size_exif) + return; + + /* If we got EXIF data, go to the MakerNote tag. */ + ed = exif_data_new_from_data (d_exif, size); + if (ed) { + e = exif_content_get_entry (ed->ifd[EXIF_IFD_EXIF], + EXIF_TAG_MAKER_NOTE); + order = exif_data_get_byte_order (ed); + if (e) + { + d = e->data; + size = e->size; + } + } + + mnote_data_set_byte_order (ne,order); + +#ifdef DEBUG + printf ("Parsing %i byte(s) Mnote data...\n", size); +#endif + + + /* Read the number of entries */ + n = exif_get_short (d ,order); +#ifdef DEBUG + printf ("Loading %i entries...\n", n); +#endif + d+=2; + size-=2; + for (i = 0; i < n; i++) { + + tag = exif_get_short (d + 12 * i, order); +#ifdef DEBUG + printf ("Loading entry '%s' (%i of %i)...\n", + mnote_canon_tag_get_name (tag), i + 1, n); +#endif + entry = mnote_canon_entry_new (); + mnote_canon_data_add_entry (data, entry); + mnote_canon_data_load_data_entry (data, entry, d, size, + 12 * i, d_exif, size_exif); + mnote_canon_entry_unref (entry); + } + exif_data_unref (ed); +#ifdef DEBUG + int j; + for (j=0;j<size;j++) + { + if (!(j%16)) printf("\n"); + printf("%02X ",d[j]);} + + printf("\n%d\n",size); + printf("%d",order); +#endif +} + +static unsigned int +mnote_canon_get_count (MNoteData *n) +{ + MNoteCanonData *note = (MNoteCanonData *) n; + + return (note->count); +} + +static MNoteEntry * +mnote_canon_get_entry (MNoteData *n, MNoteTag t) +{ + MNoteCanonData *note = (MNoteCanonData *) n; + MNoteCanonTag tag = (MNoteCanonTag) t; + unsigned int i; + MNoteEntry *entry = NULL; + + for (i = 0; !entry && i < note->count; i++) { + if (note->entries[i]->tag == tag) { + entry = note->entries[i]; + } + } + + return (entry); +} + +static void +mnote_canon_foreach_entry (MNoteData *n, MNoteDataForeachEntryFunc func, void *data) +{ + MNoteCanonData *note = (MNoteCanonData *) n; + unsigned int i; + + if (!note || !func) + return; + + for (i = 0; i < note->count; i++) + func (n, (MNoteTag)note->entries[i]->tag, data); } MNoteData * @@ -72,8 +258,16 @@ ((MNoteData *) note)->methods.free = mnote_canon_data_free; ((MNoteData *) note)->methods.load_data = mnote_canon_data_load_data; ((MNoteData *) note)->methods.save_data = mnote_canon_data_save_data; + ((MNoteData *) note)->methods.set_order = NULL; + ((MNoteData *) note)->methods.get_order = NULL; + ((MNoteData *) note)->methods.get_count = mnote_canon_get_count; + ((MNoteData *) note)->methods.get_entry = mnote_canon_get_entry; + ((MNoteData *) note)->methods.foreach_entry = mnote_canon_foreach_entry; ((MNoteData *) note)->methods.get_tag_name = mnote_canon_tag_get_name; + ((MNoteData *) note)->methods.get_tag_title = mnote_canon_tag_get_title; + ((MNoteData *) note)->methods.get_tag_description = mnote_canon_tag_get_description; ((MNoteData *) note)->methods.get_value = mnote_canon_data_get_value; - + ((MNoteData *) note)->methods.dump_entry = mnote_canon_entry_dump; + return ((MNoteData *) note); } Index: mnote-canon-tag.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/canon/mnote-canon-tag.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mnote-canon-tag.c 15 Dec 2002 11:44:18 -0000 1.4 +++ mnote-canon-tag.c 26 Aug 2003 20:51:34 -0000 1.5 @@ -59,7 +59,6 @@ mnote_canon_tag_get_title (MNoteTag t) { MNoteCanonTag tag = (MNoteCanonTag) t; - unsigned int i; bindtextdomain (GETTEXT_PACKAGE, LIBMNOTE_LOCALEDIR); |
From: Lutz M?l. <lu...@us...> - 2003-08-26 20:51:44
|
Update of /cvsroot/libexif/libmnote In directory sc8-pr-cvs1:/tmp/cvs-serv31473 Modified Files: ChangeLog Log Message: 2003-08-26 Lutz Mueller <lu...@us...> * libmnote/canon/*: Lots of improvements from matthieu <ma...@if...> (without ChangeLog entry). Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libmnote/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ChangeLog 25 Aug 2003 21:00:17 -0000 1.11 +++ ChangeLog 26 Aug 2003 20:51:33 -0000 1.12 @@ -1,3 +1,8 @@ +2003-08-26 Lutz Mueller <lu...@us...> + + * libmnote/canon/*: Lots of improvements from matthieu + <ma...@if...> (without ChangeLog entry). + 2003-08-25 Lutz Mueller <lu...@us...> * libmnote/mnote-data.c (mnote_data_new_from_path): New |
From: Lutz M?l. <lu...@us...> - 2003-08-25 21:06:31
|
Update of /cvsroot/libexif/libmnote/libmnote In directory sc8-pr-cvs1:/tmp/cvs-serv3220/libmnote Modified Files: mnote-data.c mnote-data.h Log Message: 2003-08-25 Lutz Mueller <lu...@us...> * libmnote/mnote-data.c (mnote_data_new_from_path): New (mnote_data_new_from_data): Now handles EXIF data, too (instead of only MakerNote data). Index: mnote-data.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/mnote-data.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mnote-data.c 24 Jul 2003 20:18:10 -0000 1.4 +++ mnote-data.c 25 Aug 2003 21:00:23 -0000 1.5 @@ -30,6 +30,10 @@ #include <olympus/mnote-olympus-data.h> #include <pentax/mnote-pentax-data.h> +#include <libexif/exif-data.h> + +#define DEBUG + struct _MNoteDataPrivate { ExifByteOrder order; @@ -98,30 +102,81 @@ note->methods.load_data (note, data, size); } +static const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; + MNoteData * mnote_data_new_from_data (const unsigned char *data, unsigned int size) { MNoteData *note = NULL; + ExifData *d = NULL; + ExifEntry *e = NULL; + const unsigned char *p = data; if (!size || !data) return NULL; + /* + * If we got the full EXIF data, goto the tag MakerNote in order + * to figure out which parser to use. + */ + d = exif_data_new_from_data (data, size); + if (d) e = exif_content_get_entry (d->ifd[EXIF_IFD_EXIF], + EXIF_TAG_MAKER_NOTE); + if (e) p = e->data; + /* Canon notes begin with 0x0000 */ - if ((size > 1) && (data[0] == 0x00) && (data[1] == 0x00)) + if ((size > 1) && (p[0] == 0x00) && (p[1] == 0x00)) { +#ifdef DEBUG + printf ("Detected Canon maker note.\n"); +#endif note = mnote_canon_data_new (); + } /* Olympus notes begin with "OLYMP" */ - else if ((size >= 5) && !memcmp (data, "OLYMP", 5)) { + else if ((size >= 5) && !memcmp (p, "OLYMP", 5)) { note = mnote_olympus_data_new (); /* Pentax notes have 27 tag entries */ - } else if (size >= 2 && (data[0] == 0x00) && (data[1] == 0x1b)) { + } else if (size >= 2 && (p[0] == 0x00) && (p[1] == 0x1b)) { note = mnote_pentax_data_new (); } else note = NULL; + if (d) exif_data_unref (d); + if (note) mnote_data_load_data (note, data, size); return (note); +} + +MNoteData * +mnote_data_new_from_file (const char *path) +{ + FILE *f; + int size = 0, s; + unsigned char *data = NULL; + MNoteData *d; + +#ifdef DEBUG + printf ("Reading file...\n"); +#endif + f = fopen (path, "rb"); + if (!f) return NULL; + while (1) { + data = realloc (data, sizeof (char) * (size + 1024)); + if (!data) {fclose (f); return NULL;} + s = fread (data + size, 1, 1024, f); + if (s <= 0) break; + size += s; + if (size > 200000) break; + } + fclose (f); +#ifdef DEBUG + printf ("%i byte(s) read.\n", size); +#endif + d = mnote_data_new_from_data (data, size); + free (data); + + return d; } void Index: mnote-data.h =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/mnote-data.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mnote-data.h 15 Dec 2002 11:44:18 -0000 1.2 +++ mnote-data.h 25 Aug 2003 21:00:23 -0000 1.3 @@ -65,12 +65,6 @@ MNoteDataPrivate *priv; }; -void mnote_data_construct (MNoteData *note); - -void mnote_data_ref (MNoteData *note); -void mnote_data_unref (MNoteData *note); -void mnote_data_free (MNoteData *note); - const char *mnote_tag_get_name (MNoteData *note, MNoteTag tag); const char *mnote_tag_get_title (MNoteData *note, MNoteTag tag); const char *mnote_tag_get_description (MNoteData *note, MNoteTag tag); @@ -81,11 +75,16 @@ void mnote_data_dump (MNoteData *note, unsigned int indent); -MNoteData *mnote_data_new_from_data (const unsigned char *data, - unsigned int size); +/* Life-cycle */ +void mnote_data_construct (MNoteData *note); +void mnote_data_ref (MNoteData *note); +void mnote_data_unref (MNoteData *note); +void mnote_data_free (MNoteData *note); /* Do not use! */ -void mnote_data_save_to_data (MNoteData *note, - unsigned char **data, unsigned int *size); +MNoteData *mnote_data_new_from_data (const unsigned char *, unsigned int); +MNoteData *mnote_data_new_from_file (const char *path); +void mnote_data_save_to_data (MNoteData *note, + unsigned char **, unsigned int *); void mnote_data_set_byte_order (MNoteData *note, ExifByteOrder order); ExifByteOrder mnote_data_get_byte_order (MNoteData *note); |
From: Lutz M?l. <lu...@us...> - 2003-08-25 21:06:29
|
Update of /cvsroot/libexif/libmnote In directory sc8-pr-cvs1:/tmp/cvs-serv3220 Modified Files: ChangeLog Log Message: 2003-08-25 Lutz Mueller <lu...@us...> * libmnote/mnote-data.c (mnote_data_new_from_path): New (mnote_data_new_from_data): Now handles EXIF data, too (instead of only MakerNote data). Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libmnote/ChangeLog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ChangeLog 24 Jul 2003 20:18:10 -0000 1.10 +++ ChangeLog 25 Aug 2003 21:00:17 -0000 1.11 @@ -1,3 +1,9 @@ +2003-08-25 Lutz Mueller <lu...@us...> + + * libmnote/mnote-data.c (mnote_data_new_from_path): New + (mnote_data_new_from_data): Now handles EXIF data, too (instead + of only MakerNote data). + 2003-07-24 Lutz Mueller <lu...@us...> * libmnote: Lots of improvements from Al Evans <al...@tb...>. |
From: Lutz M?l. <lu...@us...> - 2003-08-25 21:06:29
|
Update of /cvsroot/libexif/libmnote/libmnote/olympus In directory sc8-pr-cvs1:/tmp/cvs-serv3220/libmnote/olympus Modified Files: mnote-olympus-data.c mnote-olympus-tag.h Log Message: 2003-08-25 Lutz Mueller <lu...@us...> * libmnote/mnote-data.c (mnote_data_new_from_path): New (mnote_data_new_from_data): Now handles EXIF data, too (instead of only MakerNote data). Index: mnote-olympus-data.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/olympus/mnote-olympus-data.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mnote-olympus-data.c 24 Jul 2003 20:18:11 -0000 1.4 +++ mnote-olympus-data.c 25 Aug 2003 21:00:24 -0000 1.5 @@ -27,6 +27,7 @@ #include <libexif/exif-byte-order.h> #include <libexif/exif-utils.h> +#include <libexif/exif-data.h> #define DEBUG @@ -138,8 +139,8 @@ doff = exif_get_long (d + offset + 8, order); d_orig = d + doff; #ifdef DEBUG - printf("**** data offset is %i\n", doff); - dump_memory_around(d_orig); + printf ("**** data offset is %i\n", doff); + dump_memory_around (d_orig); #endif } else { @@ -160,7 +161,6 @@ memcpy (entry->data, d_orig, s); } - static void mnote_olympus_data_load_data (MNoteData *en, const unsigned char *data, unsigned int size) @@ -168,38 +168,49 @@ MNoteOlympusData *note = (MNoteOlympusData *) en; MNoteOlympusTag tag; MNoteOlympusEntry *entry; + const unsigned char *p = data; + ExifData *ed = NULL; + ExifEntry *e = NULL; + ExifByteOrder o = EXIF_BYTE_ORDER_INTEL; + short nEntries; + const unsigned char *tagEntries; + unsigned int i; - // Check for reality and usefulness - // -- needs to start with OLYMP - // -- if < 22 bytes, hasn't got space for any entries - if ((size < 22) || memcmp(data, "OLYMP", 5)) { -#ifdef DEBUG - printf("Olympus maker note malformed or too small\n"); -#endif - return; + /* If we got EXIF data, go to the MakerNote tag. */ + ed = exif_data_new_from_data (data, size); + if (ed) { + e = exif_content_get_entry (ed->ifd[EXIF_IFD_EXIF], + EXIF_TAG_MAKER_NOTE); + o = exif_data_get_byte_order (ed); + if (e) p = e->data; } - else { - ExifByteOrder order = mnote_data_get_byte_order (en); - short nEntries = exif_get_short (data + 8, order); - const unsigned char *tagEntries = data + 10; - unsigned int i; - for (i = 0; i < nEntries; i++) { - tag = exif_get_short (tagEntries + 12 * i, order); + /* + * Olympus headers start with "OLYMP" and need to have at least + * a size of 22 bytes. + */ + if ((size < 22) || memcmp (p, "OLYMP", 5)) { + exif_data_unref (ed); + return; + } + + nEntries = exif_get_short (p + 8, o); + tagEntries = p + 10; + + for (i = 0; i < nEntries; i++) { + tag = exif_get_short (tagEntries + 12 * i, o); #ifdef DEBUG - printf ("Loading entry '%s' (%x) (%i)...\n", - mnote_olympus_tag_get_name (tag), tag, i + 1); + printf ("Loading entry '%s' (%x) (%i)...\n", + mnote_olympus_tag_get_name (tag), tag, i + 1); #endif entry = mnote_olympus_entry_new (); mnote_olympus_data_add_entry (note, entry); - mnote_olympus_data_load_data_entry (note, entry, tagEntries, size, - 12 * i); + mnote_olympus_data_load_data_entry (note, entry, + tagEntries, size, 12 * i); mnote_olympus_entry_unref (entry); } - } - - } + static unsigned int mnote_olympus_get_count (MNoteData *n) { @@ -233,12 +244,12 @@ if (!note || !func) { #ifdef DEBUG - if (!note) printf("No note in foreach_entry\n"); - if (!func) printf("No func in foreach_entry\n"); + if (!note) printf ("No note in foreach_entry\n"); + if (!func) printf ("No func in foreach_entry\n"); #endif return; } - printf("In mnote_olympus_foreach_entry for %d entries\n", note->count); + printf ("In mnote_olympus_foreach_entry for %d entries\n", note->count); for (i = 0; i < note->count; i++) { printf ("Calling func for i = %i\n", i); func (n, (MNoteTag)note->entries[i]->tag, data); Index: mnote-olympus-tag.h =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/olympus/mnote-olympus-tag.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mnote-olympus-tag.h 24 Jul 2003 20:18:11 -0000 1.3 +++ mnote-olympus-tag.h 25 Aug 2003 21:00:24 -0000 1.4 @@ -32,7 +32,7 @@ MNOTE_OLYMPUS_TAG_QUALITY = 0x0201, MNOTE_OLYMPUS_TAG_MACRO = 0x0202, MNOTE_OLYMPUS_TAG_UNKNOWN_1 = 0x0203, - MNOTE_OLYMPUS_TAG_DIGIZOOM = 0x0204, + MNOTE_OLYMPUS_TAG_DIGIZOOM = 0x0204, MNOTE_OLYMPUS_TAG_UNKNOWN_2 = 0x0205, MNOTE_OLYMPUS_TAG_UNKNOWN_3 = 0x0206, MNOTE_OLYMPUS_TAG_VERSION = 0x0207, |
From: matthieu <ma...@if...> - 2003-08-25 11:39:40
|
I have first to correct a bug with strncat(dest,source,size)= that i made : the argument size is for source and not for dest so strncat(v,"foo",sizeof(v)) is usless... I see that you have also this bug in your lib, please correc= t it... [mat@localhost libmnote-0.5.6]$ grep -r strncat ../libexif-0= .5.12/* ../libmnote-=20 0.5.6/* | grep -v binaire| grep -v "~" ../libexif-0.5.12/libexif/exif-entry.c: strncat (v, = " ", sizeof (v) - 1)=20 ; ../libexif-0.5.12/libexif/exif-entry.c: strncat (v, _("(Photographer)"),=20 sizeof (v) - 1); ../libexif-0.5.12/libexif/exif-entry.c: strncat (v, = " - ", sizeof (v) - =20 1); ../libexif-0.5.12/libexif/exif-entry.c: strn= cat (v, e->data + st=20 rlen (e->data) + 1, ../libexif-0.5.12/libexif/exif-entry.c: strn= cat (v, _("[None]"),=20 sizeof (v) - 1); ../libexif-0.5.12/libexif/exif-entry.c: strncat (v, = " ", sizeof (v) - 1)=20 ; ../libexif-0.5.12/libexif/exif-entry.c: strncat (v, _("(Editor)"), sizeo=20 f (v) - 1); ../libexif-0.5.12/libexif/exif-entry.c: strn= cat (v, c, sizeof (v=20 )); ../libexif-0.5.12/libexif/exif-entry.c: if (= i < 3) strncat (v, "=20 ", sizeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, ", "=20 , sizeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, b, s=20 izeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, ", "=20 , sizeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, b, s=20 izeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, ", "=20 , sizeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, b, s=20 izeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, ", "=20 , sizeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, b, s=20 izeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, ", "=20 , sizeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, b, s=20 izeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, ", "=20 , sizeof (v)); ../libexif-0.5.12/libexif/exif-entry.c: = strncat (v, b, s=20 izeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 strncat =20 (v, "/", sizeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 strncat =20 (v, buf, sizeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 strncat =20 (v, "/", sizeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 s=20 trncat (v, _("left to right"), sizeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 s=20 trncat (v, _("right to left"), sizeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 s=20 trncat (v, _("bottom to top"), sizeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 s=20 trncat (v, _("top to bottom"), sizeof (v)); ../libmnote-0.5.6/libmnote/olympus/mnote-olympus-entry.c: = =20 s=20 trncat (v, buf, sizeof (v)); Also what about the probing in mnote_data_new_from_data and = the byte order : actualy because the lib have only acess to makernote data it= is imposible and i have to force it... ____________________________________________________________= _________ MSN Messenger, nouvelle version ! Personnalisez vos messages= , jouez en ligne et communiquez en temps r=E9el par vid=E9o! http://ifr= ance.com/_reloc/m |
From: Lutz M?l. <lu...@us...> - 2003-08-25 04:44:33
|
Update of /cvsroot/libexif/libexif In directory sc8-pr-cvs1:/tmp/cvs-serv769 Modified Files: ChangeLog Log Message: 2003-08-25 Lutz Mueller <lu...@us...> * libexif/exif-data.c: Fill unneeded bytes with 0. Suggestion by Roberto Costa <rob...@en...>. Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- ChangeLog 6 Aug 2003 19:47:53 -0000 1.71 +++ ChangeLog 25 Aug 2003 04:44:30 -0000 1.72 @@ -1,3 +1,8 @@ +2003-08-25 Lutz Mueller <lu...@us...> + + * libexif/exif-data.c: Fill unneeded bytes with 0. Suggestion by + Roberto Costa <rob...@en...>. + 2003-08-06 Lutz Mueller <lu...@us...> * libexif/exif-entry.c (exif_entry_initialize): Support some more |
From: Lutz M?l. <lu...@us...> - 2003-08-25 04:44:33
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs1:/tmp/cvs-serv769/libexif Modified Files: exif-data.c Log Message: 2003-08-25 Lutz Mueller <lu...@us...> * libexif/exif-data.c: Fill unneeded bytes with 0. Suggestion by Roberto Costa <rob...@en...>. Index: exif-data.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- exif-data.c 29 Jul 2003 22:45:10 -0000 1.25 +++ exif-data.c 25 Aug 2003 04:44:30 -0000 1.26 @@ -150,7 +150,10 @@ data->priv->order, doff); } else doff = offset + 8; + + /* Write the data. Fill unneeded bytes with 0. */ memcpy (*d + 6 + doff, entry->data, entry->size); + if (s < 4) memset (*d + 6 + doff + s, 0, (4 - s)); } static void |
From: Hans U. N. <hu...@us...> - 2003-08-24 19:15:23
|
Update of /cvsroot/libexif/libexif In directory sc8-pr-cvs1:/tmp/cvs-serv5043 Modified Files: Makefile.am Log Message: po Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/libexif/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Makefile.am 24 Aug 2003 17:30:05 -0000 1.20 +++ Makefile.am 24 Aug 2003 17:33:35 -0000 1.21 @@ -1,4 +1,4 @@ -SUBDIRS = libexif libjpeg test +SUBDIRS = libexif libjpeg test po EXTRA_DIST = config.rpath mkinstalldirs @PACKAGE@.spec |
From: Hans U. N. <hu...@us...> - 2003-08-24 19:12:39
|
Update of /cvsroot/libexif/libexif In directory sc8-pr-cvs1:/tmp/cvs-serv5825 Modified Files: Makefile.am Log Message: working towards working build Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/libexif/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile.am 24 Aug 2003 17:33:35 -0000 1.21 +++ Makefile.am 24 Aug 2003 17:40:02 -0000 1.22 @@ -1,5 +1,3 @@ SUBDIRS = libexif libjpeg test po -EXTRA_DIST = config.rpath mkinstalldirs @PACKAGE@.spec - -ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = @PACKAGE@.spec |
From: Hans U. N. <hu...@us...> - 2003-08-24 18:39:35
|
Update of /cvsroot/libexif/exif In directory sc8-pr-cvs1:/tmp/cvs-serv15224 Modified Files: configure.in Log Message: fixing build system Index: configure.in =================================================================== RCS file: /cvsroot/libexif/exif/configure.in,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- configure.in 5 May 2003 21:13:43 -0000 1.25 +++ configure.in 24 Aug 2003 18:39:30 -0000 1.26 @@ -104,7 +104,6 @@ exif.spec libjpeg/Makefile exif/Makefile - po/Makefile.in ]) echo " |
From: Hans U. N. <hu...@us...> - 2003-08-24 18:35:18
|
Update of /cvsroot/libexif/exif In directory sc8-pr-cvs1:/tmp/cvs-serv14486 Modified Files: Makefile.am Log Message: fixing build system Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/exif/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 5 May 2003 21:13:43 -0000 1.12 +++ Makefile.am 24 Aug 2003 18:35:15 -0000 1.13 @@ -1,8 +1,6 @@ -SUBDIRS = libjpeg exif po intl +SUBDIRS = libjpeg exif po man_MANS = exif.1 # newer versions of automake/autoconf require this, OK? -EXTRA_DIST = config.rpath exif.1 exif.spec - -ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = exif.1 exif.spec |