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. <lu...@us...> - 2009-03-21 22:03:14
|
Update of /cvsroot/libexif/libexif/libexif/fuji In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31085/libexif/fuji Modified Files: exif-mnote-data-fuji.c Log Message: 2009-03-21 Lutz Mueller <lu...@us...> Meder Kydyraliev <me...@gm...> suggested to add some sanity checks: * libexif/exif-data.c (exif_data_load_entry), (exif_data_load_data_thumbnail) * libexif/canon/exif_mnote-data-canon.c (exif_mnote_data_canon_load) * libexif/fuji/exif-mnote-data-fuji.c (exif_mnote_data_fuji_load) * libexif/olympus/exif-mnote-data-olympus.c (exif_mnote_data_olympus_load) * libexif/pentax/exif-mnote-data-pentax.c (exif_mnote_data_pentax_load) Index: exif-mnote-data-fuji.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/fuji/exif-mnote-data-fuji.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -p -d -r1.7 -r1.8 --- exif-mnote-data-fuji.c 14 Jan 2009 06:31:18 -0000 1.7 +++ exif-mnote-data-fuji.c 21 Mar 2009 22:03:09 -0000 1.8 @@ -155,11 +155,15 @@ exif_mnote_data_fuji_load (ExifMnoteData size_t i, o, s, datao = 6 + n->offset; MnoteFujiEntry *t; - if (!n || !buf || !buf_size || (buf_size < datao + 12)) return; + if (!n || !buf || !buf_size || (datao + 12 < datao) || + (datao + 12 < 12) || (datao + 12 > buf_size)) + return; /* Read the number of entries and remove old ones. */ n->order = EXIF_BYTE_ORDER_INTEL; datao += exif_get_long (buf + datao + 8, EXIF_BYTE_ORDER_INTEL); + if ((datao + 2 < datao) || (datao + 2 < 2)) + return; c = exif_get_short (buf + datao, EXIF_BYTE_ORDER_INTEL); datao += 2; exif_mnote_data_fuji_clear (n); @@ -192,10 +196,10 @@ exif_mnote_data_fuji_load (ExifMnoteData if (!s) return; o += 8; if (s > 4) o = exif_get_long (buf + o, n->order) + 6 + n->offset; - if (o + s > buf_size) { - exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteDataFuji", - "Tag data past end of buffer (%u > %u)", - o+s, buf_size); + if ((o + s < o) || (o + s < s) || (o + s > buf_size)) { + exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, + "ExifMnoteDataFuji", "Tag data past end of " + "buffer (%u > %u)", o + s, buf_size); return; } |
From: Lutz M. <lu...@us...> - 2009-03-16 22:37:48
|
Update of /cvsroot/libexif/libexif/libexif/canon In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv668/libexif/canon Modified Files: exif-mnote-data-canon.c Log Message: 2009-03-16 Lutz Mueller <lu...@us...> * libexif/canon/exif-mnote-data-canon.c: (exif_mnote_data_canon_load): Fix the coding style in this function to make it easier to read. Index: exif-mnote-data-canon.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/canon/exif-mnote-data-canon.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -p -d -r1.20 -r1.21 --- exif-mnote-data-canon.c 14 Jan 2009 06:31:17 -0000 1.20 +++ exif-mnote-data-canon.c 16 Mar 2009 22:36:13 -0000 1.21 @@ -208,47 +208,46 @@ exif_mnote_data_canon_load (ExifMnoteDat for (i = 0; i < c; i++) { o = 6 + 2 + n->offset + 12 * i; if (o + 8 > buf_size) { - exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, - "ExifMnoteCanon", - "Short MakerNote"); - return; + exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, + "ExifMnoteCanon", "Short MakerNote"); + return; } t = exif_mem_realloc (ne->mem, n->entries, - sizeof (MnoteCanonEntry) * (i + 1)); + sizeof (MnoteCanonEntry) * (i + 1)); if (!t) return; /* out of memory */ n->count = i + 1; n->entries = t; memset (&n->entries[i], 0, sizeof (MnoteCanonEntry)); - n->entries[i].tag = exif_get_short (buf + o, n->order); - n->entries[i].format = exif_get_short (buf + o + 2, n->order); - n->entries[i].components = exif_get_long (buf + o + 4, n->order); - n->entries[i].order = n->order; + n->entries[i].tag = exif_get_short (buf + o, n->order); + n->entries[i].format = exif_get_short (buf + o + 2, n->order); + n->entries[i].components = exif_get_long (buf + o + 4, n->order); + n->entries[i].order = n->order; - exif_log (ne->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteCanon", - "Loading entry 0x%x ('%s')...", n->entries[i].tag, - mnote_canon_tag_get_name (n->entries[i].tag)); + exif_log (ne->log, EXIF_LOG_CODE_DEBUG, "ExifMnoteCanon", + "Loading entry 0x%x ('%s')...", n->entries[i].tag, + mnote_canon_tag_get_name (n->entries[i].tag)); - /* - * Size? If bigger than 4 bytes, the actual data is not - * in the entry but somewhere else (offset). - */ - s = exif_format_get_size (n->entries[i].format) * n->entries[i].components; + /* + * Size? If bigger than 4 bytes, the actual data is not + * in the entry but somewhere else (offset). + */ + s = exif_format_get_size (n->entries[i].format) * n->entries[i].components; if (!s) { - exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, - "ExifMnoteCanon", - "Invalid zero-length tag size"); - return; - } + exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, + "ExifMnoteCanon", + "Invalid zero-length tag size"); + return; + } o += 8; if (s > 4) o = exif_get_long (buf + o, n->order) + 6; if (o + s > buf_size) { exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, - "ExifMnoteCanon", - "Tag data past end of buffer (%u > %u)", - o+s, buf_size); + "ExifMnoteCanon", + "Tag data past end of buffer (%u > %u)", + o + s, buf_size); return; - } + } /* Sanity check */ n->entries[i].data = exif_mem_alloc (ne->mem, sizeof (char) * s); |
From: Lutz M. <lu...@us...> - 2009-03-16 22:37:43
|
Update of /cvsroot/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv668 Modified Files: ChangeLog Log Message: 2009-03-16 Lutz Mueller <lu...@us...> * libexif/canon/exif-mnote-data-canon.c: (exif_mnote_data_canon_load): Fix the coding style in this function to make it easier to read. Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.303 retrieving revision 1.304 diff -u -p -d -r1.303 -r1.304 --- ChangeLog 3 Feb 2009 04:43:12 -0000 1.303 +++ ChangeLog 16 Mar 2009 22:36:10 -0000 1.304 @@ -1,3 +1,9 @@ +2009-03-16 Lutz Mueller <lu...@us...> + + * libexif/canon/exif-mnote-data-canon.c: + (exif_mnote_data_canon_load): Fix the coding style in this function + to make it easier to read. + 2009-02-02 Dan Fandrich <da...@co...> * Added AC_C_INLINE to configure.ac to define the inline keyword |
From: Marcus M. <mar...@us...> - 2009-02-18 15:39:26
|
Update of /cvsroot/libexif/libexif-gtk In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29038 Modified Files: Makefile.am Log Message: fixed EXTRA_DIST Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/libexif-gtk/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -d -r1.14 -r1.15 --- Makefile.am 18 Feb 2009 15:38:29 -0000 1.14 +++ Makefile.am 18 Feb 2009 15:39:16 -0000 1.15 @@ -3,7 +3,7 @@ SUBDIRS = m4m po gtk-extensions libexif- pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libexif-gtk.pc -EXTRA_DIST += libexif-gtk.pc.in +EXTRA_DIST = libexif-gtk.pc.in noinst_DATA = libexif-gtk-uninstalled.pc EXTRA_DIST += libexif-gtk-uninstalled.pc.in |
From: Marcus M. <mar...@us...> - 2009-02-18 15:38:44
|
Update of /cvsroot/libexif/libexif-gtk In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28832 Modified Files: Makefile.am Log Message: removed autogen.sh from EXTRA_DIST Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/libexif-gtk/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -d -r1.13 -r1.14 --- Makefile.am 21 May 2007 18:36:10 -0000 1.13 +++ Makefile.am 18 Feb 2009 15:38:29 -0000 1.14 @@ -1,7 +1,5 @@ SUBDIRS = m4m po gtk-extensions libexif-gtk tests -EXTRA_DIST = autogen.sh - pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libexif-gtk.pc |
From: Dan F. <dfa...@us...> - 2009-02-03 04:43:20
|
Update of /cvsroot/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19593 Modified Files: ChangeLog configure.ac Log Message: Added AC_C_INLINE to configure.ac to define the inline keyword if the compiler doesn't handle it already. Index: configure.ac =================================================================== RCS file: /cvsroot/libexif/libexif/configure.ac,v retrieving revision 1.50 retrieving revision 1.51 diff -u -p -d -r1.50 -r1.51 --- configure.ac 23 Dec 2008 08:24:44 -0000 1.50 +++ configure.ac 3 Feb 2009 04:43:12 -0000 1.51 @@ -63,6 +63,7 @@ AC_SUBST([LIBEXIF_VERSION_INFO]) AC_PROG_CC AC_C_CONST +AC_C_INLINE dnl FIXME: AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AM_CPPFLAGS="$CPPFLAGS" Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.302 retrieving revision 1.303 diff -u -p -d -r1.302 -r1.303 --- ChangeLog 31 Jan 2009 23:36:17 -0000 1.302 +++ ChangeLog 3 Feb 2009 04:43:12 -0000 1.303 @@ -1,3 +1,8 @@ +2009-02-02 Dan Fandrich <da...@co...> + + * Added AC_C_INLINE to configure.ac to define the inline keyword + if the compiler doesn't handle it already. + 2009-01-28 Dan Fandrich <da...@co...> * Decode the value for EXIF_TAG_LIGHT_SOURCE and EXIF_TAG_SCENE_TYPE |
From: Marcus M. <ma...@je...> - 2009-02-01 14:49:52
|
On Sun, Feb 01, 2009 at 03:05:13PM +0100, Jan Patera wrote: > Dan, > > unfortunately this doesn't compile with every compiler. > For example MSVC at least versions 6 through 8 don't support this way of > inlining in C (it is OK in C++). > For 'C', the right syntax there is > > static __declspec(inline) ExifShort > > My suggestion is to create a macro INLINE and use it instead. > FYI: when MSVC is used, macro _MSC_VER is defined. Run AC_C_INLINE() in the autoconf script, it will define "inline" to empty on compilers that dont know it. > > file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v > > +static inline ExifShort > > +exif_get_short_convert (const unsigned char *buf, ExifFormat format, > > + ExifByteOrder order) And inline is not really necessary, gcc will just decide on its own whether to inline or not. Ciao, Marcus |
From: Jan P. <pa...@pi...> - 2009-02-01 14:05:24
|
Dan, unfortunately this doesn't compile with every compiler. For example MSVC at least versions 6 through 8 don't support this way of inlining in C (it is OK in C++). For 'C', the right syntax there is static __declspec(inline) ExifShort My suggestion is to create a macro INLINE and use it instead. FYI: when MSVC is used, macro _MSC_VER is defined. -- Jan > file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v > +static inline ExifShort > +exif_get_short_convert (const unsigned char *buf, ExifFormat format, > + ExifByteOrder order) |
From: Dan F. <dfa...@us...> - 2009-01-31 23:39:33
|
Update of /cvsroot/libexif/libexif/po In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv675 Modified Files: cs.po Log Message: Updated to latest POT file Index: cs.po =================================================================== RCS file: /cvsroot/libexif/libexif/po/cs.po,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -d -r1.14 -r1.15 --- cs.po 6 Nov 2008 01:38:00 -0000 1.14 +++ cs.po 31 Jan 2009 23:39:26 -0000 1.15 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: libexif 0.6.17-pre1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-11-04 15:06-0800\n" +"POT-Creation-Date: 2009-01-31 15:37-0800\n" "PO-Revision-Date: 2007-12-15 16:51+0000\n" "Last-Translator: Jan Patera <pa...@us...>\n" "Language-Team: Czech <tra...@li...>\n" @@ -36,8 +36,8 @@ msgid "Invalid number of components (%i, msgstr "Spatný poÄet položek (%i, oÄekáváno %i nebo %i)." [...4604 lines suppressed...] +#~ msgstr "SQ" + +#~ msgid "HQ" +#~ msgstr "HQ" + +#~ msgid "SHQ" +#~ msgstr "SHQ" + +#~ msgid "SQ1" +#~ msgstr "SQ1" + +#~ msgid "SQ2" +#~ msgstr "SQ2" + +#~ msgid "Lenstype" +#~ msgstr "Druh ÄoÄek" + #~ msgid "Unknown tag." #~ msgstr "Neznámá znaÄka" |
From: Dan F. <dfa...@us...> - 2009-01-31 23:36:24
|
Update of /cvsroot/libexif/libexif/libexif/olympus In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv320/libexif/olympus Modified Files: mnote-olympus-entry.c mnote-olympus-tag.c mnote-olympus-tag.h Log Message: Separated the MNOTE_SANYO_TAG_SELFTIMER 2 sec. case from the other On/Off cases Renamed MNOTE_NIKON_TAG_PREVIEWIMAGE_IFD_POINTERS to show that it's an IFD. The case of IFDs in MakerNotes needs to be handled better because right now, those MakerNote IFD tags are corrupted since the sub-IFDs aren't being read and written. Index: mnote-olympus-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/mnote-olympus-entry.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -p -d -r1.48 -r1.49 --- mnote-olympus-entry.c 20 Jan 2009 20:40:07 -0000 1.48 +++ mnote-olympus-entry.c 31 Jan 2009 23:36:18 -0000 1.49 @@ -516,7 +516,6 @@ mnote_olympus_entry_get_value (MnoteOlym case MNOTE_SANYO_TAG_WIDERANGE: case MNOTE_SANYO_TAG_COLORADJUSTMENTMODE: case MNOTE_SANYO_TAG_QUICKSHOT: - case MNOTE_SANYO_TAG_SELFTIMER: case MNOTE_SANYO_TAG_VOICEMEMO: case MNOTE_SANYO_TAG_FLICKERREDUCE: case MNOTE_SANYO_TAG_OPTICALZOOM: @@ -533,7 +532,28 @@ mnote_olympus_entry_get_value (MnoteOlym strncpy (v, _("On"), maxlen); break; default: - strncpy (v, _("Unknown"), maxlen); + sprintf (buf, _("Unknown %hu"), vs); + strncat (v, buf, maxlen - strlen (v)); + break; + } + break; + case MNOTE_SANYO_TAG_SELFTIMER: + CF (entry->format, EXIF_FORMAT_SHORT, v, maxlen); + CC (entry->components, 1, v, maxlen); + vs = exif_get_short (entry->data, entry->order); + switch (vs) { + case 0: + strncpy (v, _("Off"), maxlen); + break; + case 1: + strncpy (v, _("On"), maxlen); + break; + case 2: + strncpy (v, _("2 sec."), maxlen); + break; + default: + sprintf (buf, _("Unknown %hu"), vs); + strncat (v, buf, maxlen - strlen (v)); break; } break; Index: mnote-olympus-tag.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/mnote-olympus-tag.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -d -r1.12 -r1.13 --- mnote-olympus-tag.h 18 Jan 2009 09:38:29 -0000 1.12 +++ mnote-olympus-tag.h 31 Jan 2009 23:36:18 -0000 1.13 @@ -42,7 +42,7 @@ enum _MnoteOlympusTag { MNOTE_NIKON_TAG_UNKNOWN_0X000D = 0x000d, MNOTE_NIKON_TAG_EXPOSUREDIFF = 0x000e, MNOTE_NIKON_TAG_ISOSELECTION = 0x000f, - MNOTE_NIKON_TAG_PREVIEWIMAGE = 0x0011, + MNOTE_NIKON_TAG_PREVIEWIMAGE_IFD_POINTER= 0x0011, MNOTE_NIKON_TAG_FLASHEXPCOMPENSATION = 0x0012, MNOTE_NIKON_TAG_ISO2 = 0x0013, MNOTE_NIKON_TAG_IMAGEBOUNDARY = 0x0016, @@ -163,6 +163,11 @@ enum _MnoteOlympusTag { MNOTE_OLYMPUS_TAG_LIGHTVALUECENTER = 0x103d, MNOTE_OLYMPUS_TAG_LIGHTVALUEPERIPHERY = 0x103e, + /* Epson */ + MNOTE_EPSON_TAG_IMAGE_WIDTH = 0x020b, + MNOTE_EPSON_TAG_IMAGE_HEIGHT = 0x020c, + MNOTE_EPSON_TAG_SOFTWARE = 0x020d, + /* Sanyo */ MNOTE_SANYO_TAG_SEQUENTIALSHOT = 0x020e, MNOTE_SANYO_TAG_WIDERANGE = 0x020f, @@ -181,11 +186,6 @@ enum _MnoteOlympusTag { MNOTE_SANYO_TAG_SCENESELECT = 0x021f, MNOTE_SANYO_TAG_MANUALFOCUSDISTANCE = 0x0223, MNOTE_SANYO_TAG_SEQUENCESHOTINTERVAL = 0x0224, - - /* Epson */ - MNOTE_EPSON_TAG_IMAGE_WIDTH = 0x020b, - MNOTE_EPSON_TAG_IMAGE_HEIGHT = 0x020c, - MNOTE_EPSON_TAG_SOFTWARE = 0x020d, }; typedef enum _MnoteOlympusTag MnoteOlympusTag; @@ -194,6 +194,7 @@ typedef enum _MnoteOlympusTag MnoteOlymp #define MNOTE_OLYMPUS_TAG_UNKNOWN_2 MNOTE_OLYMPUS_TAG_FOCALPLANEDIAGONAL #define MNOTE_OLYMPUS_TAG_UNKNOWN_3 MNOTE_OLYMPUS_TAG_LENSDISTORTION #define MNOTE_OLYMPUS_TAG_UNKNOWN_5 MNOTE_OLYMPUS_TAG_DATADUMP +#define MNOTE_NIKON_TAG_PREVIEWIMAGE MNOTE_NIKON_TAG_PREVIEWIMAGE_IFD_POINTER /*! Return a textual name of the given tag within the Olympus-style MakerNote. * The name is a short, unique, non-localized text string containing only @@ -217,7 +218,6 @@ const char *mnote_olympus_tag_get_title * The description is a verbose, localized description of the tag. * * \param[in] tag EXIF tag - * \param[in] ifd IFD * \return textual description of the tag, or NULL if the tag is unknown */ const char *mnote_olympus_tag_get_description (MnoteOlympusTag tag); Index: mnote-olympus-tag.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/olympus/mnote-olympus-tag.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -p -d -r1.20 -r1.21 --- mnote-olympus-tag.c 18 Jan 2009 09:38:29 -0000 1.20 +++ mnote-olympus-tag.c 31 Jan 2009 23:36:18 -0000 1.21 @@ -47,7 +47,7 @@ static const struct { {MNOTE_NIKON_TAG_WHITEBALANCERB, "WHITEBALANCERB", N_("White Balance RB"), ""}, {MNOTE_NIKON_TAG_UNKNOWN_0X000D, NULL, NULL, NULL}, {MNOTE_NIKON_TAG_ISOSELECTION, "ISOSELECTION", N_("ISO Selection"), ""}, - {MNOTE_NIKON_TAG_PREVIEWIMAGE, "PREVIEWIMAGE", N_("Preview Image"), ""}, + {MNOTE_NIKON_TAG_PREVIEWIMAGE_IFD_POINTER, "PREVIEWIMAGE", N_("Preview Image IFD"), ""}, {MNOTE_NIKON_TAG_EXPOSUREDIFF, "EXPOSUREDIFF", N_("Exposurediff ?"), ""}, {MNOTE_NIKON_TAG_FLASHEXPCOMPENSATION, "FLASHEXPCOMPENSATION", N_("Flash Exposure Compensation"), ""}, {MNOTE_NIKON_TAG_ISO2, "ISO", N_("ISO Setting"), ""}, |
From: Dan F. <dfa...@us...> - 2009-01-31 23:36:24
|
Update of /cvsroot/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv320 Modified Files: ChangeLog Log Message: Separated the MNOTE_SANYO_TAG_SELFTIMER 2 sec. case from the other On/Off cases Renamed MNOTE_NIKON_TAG_PREVIEWIMAGE_IFD_POINTERS to show that it's an IFD. The case of IFDs in MakerNotes needs to be handled better because right now, those MakerNote IFD tags are corrupted since the sub-IFDs aren't being read and written. Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.301 retrieving revision 1.302 diff -u -p -d -r1.301 -r1.302 --- ChangeLog 31 Jan 2009 23:32:39 -0000 1.301 +++ ChangeLog 31 Jan 2009 23:36:17 -0000 1.302 @@ -6,6 +6,12 @@ * Fixed some signed vs unsigned formatting errors * Format the EXIF_TAG_GPS_TIME_STAMP & EXIF_TAG_GPS_ALTITUDE_REF tags * Improved the wrong data type fixup + * Separated the MNOTE_SANYO_TAG_SELFTIMER 2 sec. case from the other + On/Off cases + * Renamed MNOTE_NIKON_TAG_PREVIEWIMAGE_IFD_POINTERS to show that it's + an IFD. The case of IFDs in MakerNotes needs to be handled better + because right now, those MakerNote IFD tags are corrupted since + the sub-IFDs aren't being read and written. 2009-01-22 Dan Fandrich <da...@co...> |
From: Dan F. <dfa...@us...> - 2009-01-31 23:32:45
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32445/libexif Modified Files: exif-entry.c exif-entry.h Log Message: Decode the value for EXIF_TAG_LIGHT_SOURCE and EXIF_TAG_SCENE_TYPE Split out the generic ExifEntry formatting code into a new function exif_entry_format_value() Fixed some signed vs unsigned formatting errors Format the EXIF_TAG_GPS_TIME_STAMP & EXIF_TAG_GPS_ALTITUDE_REF tags Improved the wrong data type fixup Index: exif-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -p -d -r1.128 -r1.129 --- exif-entry.c 22 Jan 2009 07:29:14 -0000 1.128 +++ exif-entry.c 31 Jan 2009 23:32:37 -0000 1.129 @@ -162,6 +162,32 @@ exif_entry_free (ExifEntry *e) } } +/*! Get a value and convert it to an ExifShort. + * \bug Not all types are converted that could be converted and no indication + * is made when that occurs + */ +static inline ExifShort +exif_get_short_convert (const unsigned char *buf, ExifFormat format, + ExifByteOrder order) +{ + switch (format) { + case EXIF_FORMAT_LONG: + return (ExifShort) exif_get_long (buf, order); + case EXIF_FORMAT_SLONG: + return (ExifShort) exif_get_slong (buf, order); + case EXIF_FORMAT_SHORT: + return (ExifShort) exif_get_short (buf, order); + case EXIF_FORMAT_SSHORT: + return (ExifShort) exif_get_sshort (buf, order); + case EXIF_FORMAT_BYTE: + case EXIF_FORMAT_SBYTE: + return (ExifShort) buf[0]; + default: + /* Unsupported type */ + return (ExifShort) 0; + } +} + void exif_entry_fix (ExifEntry *e) { @@ -193,31 +219,46 @@ exif_entry_fix (ExifEntry *e) case EXIF_TAG_SHARPNESS: switch (e->format) { case EXIF_FORMAT_LONG: + case EXIF_FORMAT_SLONG: + case EXIF_FORMAT_BYTE: + case EXIF_FORMAT_SBYTE: + case EXIF_FORMAT_SSHORT: if (!e->parent || !e->parent->parent) break; + exif_entry_log (e, EXIF_LOG_CODE_DEBUG, + _("Tag '%s' was of format '%s' (which is " + "against specification) and has been " + "changed to format '%s'."), + exif_tag_get_name_in_ifd(e->tag, + exif_entry_get_ifd(e)), + exif_format_get_name (e->format), + exif_format_get_name (EXIF_FORMAT_SHORT)); o = exif_data_get_byte_order (e->parent->parent); for (i = 0; i < e->components; i++) exif_set_short ( e->data + i * exif_format_get_size ( - EXIF_FORMAT_SHORT), o, - (ExifShort) exif_get_long ( - e->data + i * - exif_format_get_size ( - EXIF_FORMAT_LONG), o)); + EXIF_FORMAT_SHORT), o, + exif_get_short_convert ( + e->data + i * + exif_format_get_size (e->format), + e->format, o)); e->format = EXIF_FORMAT_SHORT; e->size = e->components * exif_format_get_size (e->format); e->data = exif_entry_realloc (e, e->data, e->size); - exif_entry_log (e, EXIF_LOG_CODE_DEBUG, - _("Tag '%s' was of format '%s' (which is " - "against specification) and has been " - "changed to format '%s'."), - exif_tag_get_name (e->tag), - exif_format_get_name (EXIF_FORMAT_LONG), - exif_format_get_name (EXIF_FORMAT_SHORT)); break; case EXIF_FORMAT_SHORT: + /* No conversion necessary */ + break; default: + exif_entry_log (e, EXIF_LOG_CODE_CORRUPT_DATA, + _("Tag '%s' is of format '%s' (which is " + "against specification) but cannot be changed " + "to format '%s'."), + exif_tag_get_name_in_ifd(e->tag, + exif_entry_get_ifd(e)), + exif_format_get_name (e->format), + exif_format_get_name (EXIF_FORMAT_SHORT)); break; } break; @@ -246,7 +287,8 @@ exif_entry_fix (ExifEntry *e) _("Tag '%s' was of format '%s' (which is " "against specification) and has been " "changed to format '%s'."), - exif_tag_get_name (e->tag), + exif_tag_get_name_in_ifd(e->tag, + exif_entry_get_ifd(e)), exif_format_get_name (EXIF_FORMAT_SRATIONAL), exif_format_get_name (EXIF_FORMAT_RATIONAL)); break; @@ -255,6 +297,39 @@ exif_entry_fix (ExifEntry *e) } break; + /* All these tags need to be of format 'SRational'. */ + case EXIF_TAG_EXPOSURE_BIAS_VALUE: + case EXIF_TAG_BRIGHTNESS_VALUE: + case EXIF_TAG_SHUTTER_SPEED_VALUE: + switch (e->format) { + case EXIF_FORMAT_RATIONAL: + if (!e->parent || !e->parent->parent) break; + o = exif_data_get_byte_order (e->parent->parent); + for (i = 0; i < e->components; i++) { + r = exif_get_rational (e->data + i * + exif_format_get_size ( + EXIF_FORMAT_RATIONAL), o); + sr.numerator = (ExifLong) r.numerator; + sr.denominator = (ExifLong) r.denominator; + exif_set_srational (e->data + i * + exif_format_get_size ( + EXIF_FORMAT_SRATIONAL), o, sr); + } + e->format = EXIF_FORMAT_SRATIONAL; + exif_entry_log (e, EXIF_LOG_CODE_DEBUG, + _("Tag '%s' was of format '%s' (which is " + "against specification) and has been " + "changed to format '%s'."), + exif_tag_get_name_in_ifd(e->tag, + exif_entry_get_ifd(e)), + exif_format_get_name (EXIF_FORMAT_RATIONAL), + exif_format_get_name (EXIF_FORMAT_SRATIONAL)); + break; + default: + break; + } + break; + case EXIF_TAG_USER_COMMENT: /* Format needs to be UNDEFINED. */ @@ -330,7 +405,7 @@ exif_entry_fix (ExifEntry *e) e->size += 8; e->components += 8; exif_entry_log (e, EXIF_LOG_CODE_DEBUG, - _("Tag 'UserComment' did not start with " + _("Tag 'UserComment' did not start with a " "format identifier. This has been fixed.")); break; } @@ -341,6 +416,167 @@ exif_entry_fix (ExifEntry *e) } } +/*! Format the value of an ExifEntry for human display in a generic way. + * The output is localized. The formatting is independent of the tag number. + * \pre The buffer at val is entirely cleared to 0. This guarantees that the + * resulting string will be NUL terminated. + * \pre The ExifEntry is already a member of an ExifData. + * \param[in] e EXIF entry + * \param[out] val buffer in which to store value + * \param[in] maxlen one less than the length of the buffer val + */ +static void +exif_entry_format_value(ExifEntry *e, char *val, size_t maxlen) +{ + ExifByte v_byte; + ExifShort v_short; + ExifSShort v_sshort; + ExifLong v_long; + ExifRational v_rat; + ExifSRational v_srat; + ExifSLong v_slong; + char b[64]; + unsigned int i; + const ExifByteOrder o = exif_data_get_byte_order (e->parent->parent); + + if (!e->size) + return; + switch (e->format) { + case EXIF_FORMAT_UNDEFINED: + snprintf (val, maxlen, _("%i bytes undefined data"), e->size); + break; + case EXIF_FORMAT_BYTE: + case EXIF_FORMAT_SBYTE: + v_byte = e->data[0]; + snprintf (val, maxlen, "0x%02x", v_byte); + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_byte = e->data[i]; + snprintf (b, sizeof (b), ", 0x%02x", v_byte); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed)maxlen <= 0) break; + } + break; + case EXIF_FORMAT_SHORT: + v_short = exif_get_short (e->data, o); + snprintf (val, maxlen, "%u", v_short); + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_short = exif_get_short (e->data + + exif_format_get_size (e->format) * i, o); + snprintf (b, sizeof (b), ", %u", v_short); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed)maxlen <= 0) break; + } + break; + case EXIF_FORMAT_SSHORT: + v_sshort = exif_get_sshort (e->data, o); + snprintf (val, maxlen, "%i", v_sshort); + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_sshort = exif_get_short (e->data + + exif_format_get_size (e->format) * + i, o); + snprintf (b, sizeof (b), ", %i", v_sshort); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed)maxlen <= 0) break; + } + break; + case EXIF_FORMAT_LONG: + v_long = exif_get_long (e->data, o); + snprintf (val, maxlen, "%lu", (long int) v_long); + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_long = exif_get_long (e->data + + exif_format_get_size (e->format) * + i, o); + snprintf (b, sizeof (b), ", %lu", (long int) v_long); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed)maxlen <= 0) break; + } + break; + case EXIF_FORMAT_SLONG: + v_slong = exif_get_slong (e->data, o); + snprintf (val, maxlen, "%li", (long) v_slong); + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_slong = exif_get_slong (e->data + + exif_format_get_size (e->format) * i, o); + snprintf (b, sizeof (b), ", %li", (long) v_slong); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed)maxlen <= 0) break; + } + break; + case EXIF_FORMAT_ASCII: + strncpy (val, (char *) e->data, MIN (maxlen, e->size)); + break; + case EXIF_FORMAT_RATIONAL: + v_rat = exif_get_rational (e->data, o); + if (v_rat.denominator) + snprintf (val, maxlen, "%2.2lf", + (double) v_rat.numerator / + (double) v_rat.denominator); + else + snprintf (val, maxlen, "%lu/%lu", + (unsigned long) v_rat.numerator, + (unsigned long) v_rat.denominator); + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_rat = exif_get_rational ( + e->data + 8 * i, o); + if (v_rat.denominator) + snprintf (b, sizeof (b), ", %2.2lf", + (double) v_rat.numerator / + (double) v_rat.denominator); + else + snprintf (b, sizeof (b), ", %lu/%lu", + (unsigned long) v_rat.numerator, + (unsigned long) v_rat.denominator); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed) maxlen <= 0) break; + } + break; + case EXIF_FORMAT_SRATIONAL: + v_srat = exif_get_srational (e->data, o); + if (v_srat.denominator) { + snprintf (val, maxlen, "%2.2f", + (double)v_srat.numerator / v_srat.denominator); + } else { + snprintf (val, maxlen, "%li/%li", + (long) v_srat.numerator, + (long) v_srat.denominator); + } + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_srat = exif_get_srational ( + e->data + 8 * i, o); + if (v_srat.denominator) + snprintf (b, sizeof (b), ", %2.2f", + (double)v_srat.numerator / v_srat.denominator); + else + snprintf (b, sizeof (b), ", %li/%li", + (long) v_srat.numerator, + (long) v_srat.denominator); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed) maxlen <= 0) break; + } + break; + case EXIF_FORMAT_DOUBLE: + case EXIF_FORMAT_FLOAT: + default: + snprintf (val, maxlen, _("%i bytes unsupported data type"), + e->size); + break; + } +} + void exif_entry_dump (ExifEntry *e, unsigned int indent) { @@ -408,7 +644,7 @@ static const struct { { EXIF_TAG_YCBCR_POSITIONING, { "", N_("centered"), N_("co-sited"), NULL}}, { EXIF_TAG_PHOTOMETRIC_INTERPRETATION, - {N_("Reversed mono"), N_("Normal mono"), N_("RGB"), N_("Palette"), "", + { N_("Reversed mono"), N_("Normal mono"), N_("RGB"), N_("Palette"), "", N_("CMYK"), N_("YCbCr"), "", N_("CieLAB"), NULL}}, { EXIF_TAG_CUSTOM_RENDERED, { N_("Normal process"), N_("Custom process"), NULL}}, @@ -502,43 +738,43 @@ static const struct { "in focus)"), N_("Landscape"), NULL}}, {0, {NULL}}}}, { EXIF_TAG_FLASH, - { {0x0000, {N_("Flash did not fire."), N_("no flash"), NULL}}, - {0x0001, {N_("Flash fired."), N_("flash"), N_("Yes"), NULL}}, - {0x0005, {N_("Strobe return light not detected."), N_("W/o strobe"), + { {0x0000, {N_("Flash did not fire"), N_("no flash"), NULL}}, + {0x0001, {N_("Flash fired"), N_("flash"), N_("Yes"), NULL}}, + {0x0005, {N_("Strobe return light not detected"), N_("W/o strobe"), NULL}}, - {0x0007, {N_("Strobe return light detected."), N_("W. strobe"), NULL}}, - {0x0008, {N_("Flash did not fire."), NULL}}, /* Olympus E-330 */ - {0x0009, {N_("Flash fired, compulsory flash mode."), NULL}}, + {0x0007, {N_("Strobe return light detected"), N_("W. strobe"), NULL}}, + {0x0008, {N_("Flash did not fire"), NULL}}, /* Olympus E-330 */ + {0x0009, {N_("Flash fired, compulsory flash mode"), NULL}}, {0x000d, {N_("Flash fired, compulsory flash mode, return light " - "not detected."), NULL}}, + "not detected"), NULL}}, {0x000f, {N_("Flash fired, compulsory flash mode, return light " - "detected."), NULL}}, - {0x0010, {N_("Flash did not fire, compulsory flash mode."), NULL}}, - {0x0018, {N_("Flash did not fire, auto mode."), NULL}}, - {0x0019, {N_("Flash fired, auto mode."), NULL}}, - {0x001d, {N_("Flash fired, auto mode, return light not detected."), + "detected"), NULL}}, + {0x0010, {N_("Flash did not fire, compulsory flash mode"), NULL}}, + {0x0018, {N_("Flash did not fire, auto mode"), NULL}}, + {0x0019, {N_("Flash fired, auto mode"), NULL}}, + {0x001d, {N_("Flash fired, auto mode, return light not detected"), NULL}}, - {0x001f, {N_("Flash fired, auto mode, return light detected."), NULL}}, - {0x0020, {N_("No flash function."),NULL}}, - {0x0041, {N_("Flash fired, red-eye reduction mode."), NULL}}, + {0x001f, {N_("Flash fired, auto mode, return light detected"), NULL}}, + {0x0020, {N_("No flash function"),NULL}}, + {0x0041, {N_("Flash fired, red-eye reduction mode"), NULL}}, {0x0045, {N_("Flash fired, red-eye reduction mode, return light " - "not detected."), NULL}}, + "not detected"), NULL}}, {0x0047, {N_("Flash fired, red-eye reduction mode, return light " - "detected."), NULL}}, + "detected"), NULL}}, {0x0049, {N_("Flash fired, compulsory flash mode, red-eye reduction " - "mode."), NULL}}, + "mode"), NULL}}, {0x004d, {N_("Flash fired, compulsory flash mode, red-eye reduction " - "mode, return light not detected."), NULL}}, + "mode, return light not detected"), NULL}}, {0x004f, {N_("Flash fired, compulsory flash mode, red-eye reduction mode, " - "return light detected."), NULL}}, - {0x0058, {N_("Flash did not fire, auto mode, red-eye reduction mode."), NULL}}, - {0x0059, {N_("Flash fired, auto mode, red-eye reduction mode."), NULL}}, + "return light detected"), NULL}}, + {0x0058, {N_("Flash did not fire, auto mode, red-eye reduction mode"), NULL}}, + {0x0059, {N_("Flash fired, auto mode, red-eye reduction mode"), NULL}}, {0x005d, {N_("Flash fired, auto mode, return light not detected, " - "red-eye reduction mode."), NULL}}, + "red-eye reduction mode"), NULL}}, {0x005f, {N_("Flash fired, auto mode, return light detected, " - "red-eye reduction mode."), NULL}}, + "red-eye reduction mode"), NULL}}, {0x0000, {NULL}}}}, - {EXIF_TAG_SUBJECT_DISTANCE_RANGE, + { EXIF_TAG_SUBJECT_DISTANCE_RANGE, { {0, {N_("Unknown"), N_("?"), NULL}}, {1, {N_("Macro"), NULL}}, {2, {N_("Close view"), N_("Close"), NULL}}, @@ -558,10 +794,8 @@ exif_entry_get_value (ExifEntry *e, char { unsigned int i, j, k; const unsigned char *t; - ExifByte v_byte; ExifShort v_short, v_short2, v_short3, v_short4; - ExifLong v_long; - ExifSLong v_slong; + ExifByte v_byte; ExifRational v_rat; ExifSRational v_srat; char b[64]; @@ -728,7 +962,10 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_rat = exif_get_rational (e->data, o); - if (!v_rat.denominator) return val; + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } d = (double) v_rat.numerator / (double) v_rat.denominator; snprintf (val, maxlen, "f/%.01lf", d); break; @@ -737,7 +974,10 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_rat = exif_get_rational (e->data, o); - if (!v_rat.denominator) return val; + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } d = (double) v_rat.numerator / (double) v_rat.denominator; snprintf (val, maxlen, _("%.02lf EV"), d); snprintf (b, sizeof (b), _(" (f/%.01f)"), pow (2, d / 2.)); @@ -748,7 +988,10 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_rat = exif_get_rational (e->data, o); - if (!v_rat.denominator) return val; + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } /* * For calculation of the 35mm equivalent, @@ -784,7 +1027,10 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_rat = exif_get_rational (e->data, o); - if (!v_rat.denominator) return val; + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } d = (double) v_rat.numerator / (double) v_rat.denominator; snprintf (val, maxlen, "%.1lf m", d); break; @@ -792,7 +1038,10 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_rat = exif_get_rational (e->data, o); - if (!v_rat.denominator) return val; + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } d = (double) v_rat.numerator / (double) v_rat.denominator; if (d < 1) snprintf (val, maxlen, _("1/%d"), (int) (0.5 + 1. / d)); @@ -805,7 +1054,10 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_srat = exif_get_srational (e->data, o); - if (!v_srat.denominator) return val; + if (!v_srat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } d = (double) v_srat.numerator / (double) v_srat.denominator; snprintf (val, maxlen, _("%.02f EV"), d); snprintf (b, sizeof (b), " (APEX: %i)", (int) pow (sqrt(2), d)); @@ -825,7 +1077,10 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_srat = exif_get_srational (e->data, o); - if (!v_srat.denominator) return val; + if (!v_srat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } d = (double) v_srat.numerator / (double) v_srat.denominator; snprintf (val, maxlen, _("%.02f EV"), d); snprintf (b, sizeof (b), _(" (%.02f cd/m^2)"), @@ -836,10 +1091,12 @@ exif_entry_get_value (ExifEntry *e, char case EXIF_TAG_FILE_SOURCE: CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); CC (e, 1, val, maxlen); - switch (e->data[0]) { - case 0x03: strncpy (val, _("DSC"), maxlen); break; - default: snprintf (val, maxlen, "0x%02x", e->data[0]); break; - } + v_byte = e->data[0]; + if (v_byte == 3) + strncpy (val, _("DSC"), maxlen); + else + snprintf (val, maxlen, _("Internal error (unknown " + "value %i)"), v_byte); break; case EXIF_TAG_COMPONENTS_CONFIGURATION: CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); @@ -863,10 +1120,23 @@ exif_entry_get_value (ExifEntry *e, char CF (e, EXIF_FORMAT_SRATIONAL, val, maxlen); CC (e, 1, val, maxlen); v_srat = exif_get_srational (e->data, o); - if (!v_srat.denominator) return val; + if (!v_srat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } d = (double) v_srat.numerator / (double) v_srat.denominator; snprintf (val, maxlen, _("%.02f EV"), d); break; + case EXIF_TAG_SCENE_TYPE: + CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); + CC (e, 1, val, maxlen); + v_byte = e->data[0]; + if (v_byte == 1) + strncpy (val, _("Directly photographed"), maxlen); + else + snprintf (val, maxlen, _("Internal error (unknown " + "value %i)"), v_byte); + break; case EXIF_TAG_YCBCR_SUB_SAMPLING: CF (e, EXIF_FORMAT_SHORT, val, maxlen); CC (e, 2, val, maxlen); @@ -879,7 +1149,7 @@ exif_entry_get_value (ExifEntry *e, char else if ((v_short == 2) && (v_short2 == 2)) strncpy (val, _("YCbCr4:2:0"), maxlen); else - snprintf (val, maxlen, "%i, %i", v_short, v_short2); + snprintf (val, maxlen, "%u, %u", v_short, v_short2); break; case EXIF_TAG_SUBJECT_AREA: CF (e, EXIF_FORMAT_SHORT, val, maxlen); @@ -914,9 +1184,81 @@ exif_entry_get_value (ExifEntry *e, char e->components); } break; + case EXIF_TAG_GPS_VERSION_ID: + /* This is only valid in the GPS IFD */ + CF (e, EXIF_FORMAT_BYTE, val, maxlen); + CC (e, 4, val, maxlen); + v_byte = e->data[0]; + snprintf (val, maxlen, "%u", v_byte); + maxlen -= strlen (val); + for (i = 1; i < e->components; i++) { + v_byte = e->data[i]; + snprintf (b, sizeof (b), ".%u", v_byte); + strncat (val, b, maxlen); + maxlen -= strlen (b); + if ((signed)maxlen <= 0) break; + } + break; + case EXIF_TAG_INTEROPERABILITY_VERSION: + /* a.k.a. case EXIF_TAG_GPS_LATITUDE: */ + /* This tag occurs in EXIF_IFD_INTEROPERABILITY */ + if (e->format == EXIF_FORMAT_UNDEFINED) { + strncpy (val, (char *) e->data, MIN (maxlen, e->size)); + break; + } + /* EXIF_TAG_GPS_LATITUDE is the same numerically as + * EXIF_TAG_INTEROPERABILITY_VERSION but in EXIF_IFD_GPS + */ + exif_entry_format_value(e, val, maxlen); + break; + case EXIF_TAG_GPS_ALTITUDE_REF: + /* This is only valid in the GPS IFD */ + CF (e, EXIF_FORMAT_BYTE, val, maxlen); + CC (e, 1, val, maxlen); + v_byte = e->data[0]; + if (v_byte == 0) + strncpy (val, _("Sea level"), maxlen); + else if (v_byte == 1) + strncpy (val, _("Sea level reference"), maxlen); + else + snprintf (val, maxlen, _("Internal error (unknown " + "value %i)"), v_byte); + break; + case EXIF_TAG_GPS_TIME_STAMP: + /* This is only valid in the GPS IFD */ + CF (e, EXIF_FORMAT_RATIONAL, val, maxlen); + CC (e, 3, val, maxlen); + + v_rat = exif_get_rational (e->data, o); + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } + i = v_rat.numerator / v_rat.denominator; + + v_rat = exif_get_rational (e->data + + exif_format_get_size (e->format), + o); + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } + j = v_rat.numerator / v_rat.denominator; + + v_rat = exif_get_rational (e->data + + 2*exif_format_get_size (e->format), + o); + if (!v_rat.denominator) { + exif_entry_format_value(e, val, maxlen); + break; + } + d = (double) v_rat.numerator / (double) v_rat.denominator; + snprintf (val, maxlen, "%02u:%02u:%05.2f", i, j, d); + break; case EXIF_TAG_METERING_MODE: case EXIF_TAG_COMPRESSION: + case EXIF_TAG_LIGHT_SOURCE: case EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT: case EXIF_TAG_RESOLUTION_UNIT: case EXIF_TAG_EXPOSURE_PROGRAM: @@ -954,6 +1296,7 @@ exif_entry_get_value (ExifEntry *e, char if (!val[0]) snprintf (val, maxlen, "%i", v_short); break; + case EXIF_TAG_PLANAR_CONFIGURATION: case EXIF_TAG_SENSING_METHOD: case EXIF_TAG_ORIENTATION: @@ -984,10 +1327,11 @@ exif_entry_get_value (ExifEntry *e, char if (!list[i].strings[j]) snprintf (val, maxlen, "%i", v_short); else if (!*list[i].strings[j]) - val[0] = 0; + snprintf (val, maxlen, _("Unknown value %i"), v_short); else strncpy (val, _(list[i].strings[j]), maxlen); break; + case EXIF_TAG_XP_TITLE: case EXIF_TAG_XP_COMMENT: case EXIF_TAG_XP_AUTHOR: @@ -997,135 +1341,10 @@ exif_entry_get_value (ExifEntry *e, char /* FIXME: use iconv to convert into the locale encoding */ exif_convert_utf16_to_utf8(val, (unsigned short*)e->data, MIN(maxlen, e->size)); break; - case EXIF_TAG_INTEROPERABILITY_VERSION: - if (e->format == EXIF_FORMAT_UNDEFINED) { - strncpy (val, (char *) e->data, MIN (maxlen, e->size)); - break; - } - /* Fall through - EXIF_TAG_GPS_LATITUDE is same as INTEROPERABILITY_VERSION */ + default: - if (!e->size) break; - switch (e->format) { - case EXIF_FORMAT_UNDEFINED: - if ((e->tag == EXIF_TAG_SCENE_TYPE) && (e->size == 1)) { - snprintf (val, maxlen, "%i", e->data[0]); - } else { - snprintf (val, maxlen, _("%i bytes undefined data"), - e->size); - } - break; - case EXIF_FORMAT_BYTE: - case EXIF_FORMAT_SBYTE: - v_byte = e->data[0]; - snprintf (val, maxlen, "0x%02x", v_byte); - maxlen -= strlen (val); - for (i = 1; i < e->components; i++) { - v_byte = e->data[i]; - snprintf (b, sizeof (b), ", 0x%02x", v_byte); - strncat (val, b, maxlen); - maxlen -= strlen (b); - if ((signed)maxlen <= 0) break; - } - break; - case EXIF_FORMAT_SHORT: - case EXIF_FORMAT_SSHORT: - v_short = exif_get_short (e->data, o); - snprintf (val, maxlen, "%i", v_short); - maxlen -= strlen (val); - for (i = 1; i < e->components; i++) { - v_short = exif_get_short (e->data + - exif_format_get_size (e->format) * - i, o); - snprintf (b, sizeof (b), ", %i", v_short); - strncat (val, b, maxlen); - maxlen -= strlen (b); - if ((signed)maxlen <= 0) break; - } - break; - case EXIF_FORMAT_LONG: - v_long = exif_get_long (e->data, o); - snprintf (val, maxlen, "%li", (long int) v_long); - maxlen -= strlen (val); - for (i = 1; i < e->components; i++) { - v_long = exif_get_long (e->data + - exif_format_get_size (e->format) * - i, o); - snprintf (b, sizeof (b), ", %li", - (long int) v_long); - strncat (val, b, maxlen); - maxlen -= strlen (b); - if ((signed)maxlen <= 0) break; - } - break; - case EXIF_FORMAT_SLONG: - v_slong = exif_get_slong (e->data, o); - snprintf (val, maxlen, "%li", (long int) v_slong); - maxlen -= strlen (val); - for (i = 1; i < e->components; i++) { - v_long = exif_get_slong (e->data + - exif_format_get_size (e->format) * - i, o); - snprintf (b, sizeof (b), ", %li", - (long int) v_long); - strncat (val, b, maxlen); - maxlen -= strlen (b); - if ((signed)maxlen <= 0) break; - } - break; - case EXIF_FORMAT_ASCII: - strncpy (val, (char *) e->data, MIN (maxlen, e->size)); - break; - case EXIF_FORMAT_RATIONAL: - v_rat = exif_get_rational (e->data, o); - if (v_rat.denominator) - snprintf (val, maxlen, "%2.2lf", - (double) v_rat.numerator / - (double) v_rat.denominator); - else - snprintf (val, maxlen, "%2.2lf/%2.2lf", - (double) v_rat.numerator, - (double) v_rat.denominator); - maxlen -= strlen (val); - for (i = 1; i < e->components; i++) { - v_rat = exif_get_rational ( - e->data + 8 * i, o); - if (v_rat.denominator) - snprintf (b, sizeof (b), ", %2.2lf", - (double) v_rat.numerator / - (double) v_rat.denominator); - else - snprintf (b, sizeof (b), ", %2.2lf/%2.2lf", - (double) v_rat.numerator, - (double) v_rat.denominator); - strncat (val, b, maxlen); - maxlen -= strlen (b); - if ((signed) maxlen <= 0) break; - } - break; - case EXIF_FORMAT_SRATIONAL: - v_srat = exif_get_srational (e->data, o); - if (v_srat.denominator) { - snprintf (val, maxlen, "%2.2f", (double)v_srat.numerator / v_srat.denominator); - } else { - snprintf (val, maxlen, "%i/%i", v_srat.numerator, v_srat.denominator); - } - maxlen -= strlen (val); - for (i = 1; i < e->components; i++) { - v_srat = exif_get_srational ( - e->data + 8 * i, o); - snprintf (b, sizeof (b), ", %2.2f", - (double)v_srat.numerator / v_srat.denominator); - strncat (val, b, maxlen); - maxlen -= strlen (b); - if ((signed) maxlen <= 0) break; - } - break; - case EXIF_FORMAT_DOUBLE: - case EXIF_FORMAT_FLOAT: - default: - /* What to do here? */ - break; - } + /* Use a generic value formatting */ + exif_entry_format_value(e, val, maxlen); } return val; Index: exif-entry.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -p -d -r1.21 -r1.22 --- exif-entry.h 23 Dec 2008 08:33:55 -0000 1.21 +++ exif-entry.h 31 Jan 2009 23:32:37 -0000 1.22 @@ -142,11 +142,18 @@ void exif_entry_fix (ExifE /* For your convenience */ -/*! Return a textual representation of the value of the EXIF entry. +/*! Return a localized textual representation of the value of the EXIF entry. + * This is meant for display to the user. The format of each tag is subject + * to change between locales and in newer versions of libexif. Users who + * require the tag data in an unambiguous form should access the data members + * of the #ExifEntry structure directly. * * \warning The character set of the returned string may be in * the encoding of the current locale or the native encoding * of the camera. + * \bug The EXIF_TAG_XP_* tags are currently always returned in UTF-8, + * regardless of locale, and code points above U+FFFF are not + * supported. * * \param[in] entry EXIF entry * \param[out] val buffer in which to store value |
From: Dan F. <dfa...@us...> - 2009-01-31 23:32:45
|
Update of /cvsroot/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32445 Modified Files: ChangeLog Log Message: Decode the value for EXIF_TAG_LIGHT_SOURCE and EXIF_TAG_SCENE_TYPE Split out the generic ExifEntry formatting code into a new function exif_entry_format_value() Fixed some signed vs unsigned formatting errors Format the EXIF_TAG_GPS_TIME_STAMP & EXIF_TAG_GPS_ALTITUDE_REF tags Improved the wrong data type fixup Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.300 retrieving revision 1.301 diff -u -p -d -r1.300 -r1.301 --- ChangeLog 23 Jan 2009 00:12:26 -0000 1.300 +++ ChangeLog 31 Jan 2009 23:32:39 -0000 1.301 @@ -1,3 +1,12 @@ +2009-01-28 Dan Fandrich <da...@co...> + + * Decode the value for EXIF_TAG_LIGHT_SOURCE and EXIF_TAG_SCENE_TYPE + * Split out the generic ExifEntry formatting code into a new function + exif_entry_format_value() + * Fixed some signed vs unsigned formatting errors + * Format the EXIF_TAG_GPS_TIME_STAMP & EXIF_TAG_GPS_ALTITUDE_REF tags + * Improved the wrong data type fixup + 2009-01-22 Dan Fandrich <da...@co...> * Fix exif_tag_get_support_level_in_ifd() to handle the case where two |
From: Dan F. <dfa...@us...> - 2009-01-24 00:50:21
|
Update of /cvsroot/libexif/libexif/contrib/examples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20094 Modified Files: photographer.c Log Message: Removed a C99ism Index: photographer.c =================================================================== RCS file: /cvsroot/libexif/libexif/contrib/examples/photographer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -d -r1.1 -r1.2 --- photographer.c 3 Jan 2009 08:17:37 -0000 1.1 +++ photographer.c 24 Jan 2009 00:50:13 -0000 1.2 @@ -68,6 +68,7 @@ static void show_mnote_tag(ExifData *d, int main(int argc, char **argv) { ExifData *ed; + ExifEntry *entry; if (argc < 2) { printf("Usage: %s image.jpg\n", argv[0]); @@ -99,8 +100,7 @@ int main(int argc, char **argv) * manufacturer tag to see if this image could have one of the recognized * MakerNote tags. */ - ExifEntry *entry = - exif_content_get_entry(ed->ifd[EXIF_IFD_0], EXIF_TAG_MAKE); + entry = exif_content_get_entry(ed->ifd[EXIF_IFD_0], EXIF_TAG_MAKE); if (entry) { char buf[64]; @@ -109,13 +109,11 @@ int main(int argc, char **argv) trim_spaces(buf); if (!strcmp(buf, "Canon")) { - /* MNOTE_CANON_TAG_OWNER */ - show_mnote_tag(ed, 9); + show_mnote_tag(ed, 9); /* MNOTE_CANON_TAG_OWNER */ } else if (!strcmp(buf, "Asahi Optical Co.,Ltd.") || !strcmp(buf, "PENTAX Corporation")) { - /* MNOTE_PENTAX2_TAG_HOMETOWN_CITY */ - show_mnote_tag(ed, 0x23); + show_mnote_tag(ed, 0x23); /* MNOTE_PENTAX2_TAG_HOMETOWN_CITY */ } } } |
From: Dan F. <dfa...@us...> - 2009-01-23 00:12:45
|
Update of /cvsroot/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4655 Modified Files: ChangeLog Log Message: Added test-tagtable to do some tests on the static EXIF tag information table. Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.299 retrieving revision 1.300 diff -u -p -d -r1.299 -r1.300 --- ChangeLog 22 Jan 2009 07:38:17 -0000 1.299 +++ ChangeLog 23 Jan 2009 00:12:26 -0000 1.300 @@ -1,3 +1,10 @@ +2009-01-22 Dan Fandrich <da...@co...> + + * Fix exif_tag_get_support_level_in_ifd() to handle the case where two + tags with the same number exist in different IFDs. + * Added test-tagtable to do some tests on the static EXIF tag + information table. + 2009-01-21 Dan Fandrich <da...@co...> * libexif/exif-entry.c: Initialize the default for EXIF_TAG_COLOR_SPACE |
From: Dan F. <dfa...@us...> - 2009-01-23 00:12:40
|
Update of /cvsroot/libexif/libexif/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4655/test Modified Files: Makefile.am Added Files: test-tagtable.c Log Message: Added test-tagtable to do some tests on the static EXIF tag information table. --- NEW FILE: test-tagtable.c --- (This appears to be a binary file; contents omitted.) Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/libexif/test/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -p -d -r1.21 -r1.22 --- Makefile.am 29 Jun 2007 11:37:36 -0000 1.21 +++ Makefile.am 23 Jan 2009 00:12:27 -0000 1.22 @@ -10,12 +10,13 @@ SUBDIRS = nls # And this is just the lib - we don't have the program available # here yet. -TESTS = test-mem test-value test-integers test-parse +TESTS = test-mem test-value test-integers test-parse test-tagtable TEST_IMAGES = $(top_srcdir)/daniel-andrews-sample.jpg export TEST_IMAGES -check_PROGRAMS = test-mem test-mnote test-value test-integers test-parse +check_PROGRAMS = test-mem test-mnote test-value test-integers test-parse \ + test-tagtable test_mem_LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL) @@ -24,3 +25,5 @@ test_mnote_LDADD = $(top_builddir)/libex test_value_LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL) test_parse_LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL) + +test_tagtable_LDADD = $(top_builddir)/libexif/libexif.la $(LTLIBINTL) |
From: Dan F. <dfa...@us...> - 2009-01-23 00:06:44
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4253/libexif Modified Files: exif-tag.c exif-tag.h Log Message: Fix exif_tag_get_support_level_in_ifd() to handle the case where two tags with the same number exist in different IFDs. Index: exif-tag.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -p -d -r1.23 -r1.24 --- exif-tag.h 22 Jan 2009 07:38:19 -0000 1.23 +++ exif-tag.h 23 Jan 2009 00:06:36 -0000 1.24 @@ -234,11 +234,15 @@ const char *exif_tag_get_title_in_i const char *exif_tag_get_description_in_ifd (ExifTag tag, ExifIfd ifd); /*! Return whether the given tag is mandatory or not in the given IFD and - * data type according to the EXIF specification. + * data type according to the EXIF specification. If the IFD given is + * EXIF_IFD_COUNT, the result is EXIF_SUPPORT_LEVEL_UNKNOWN. If the data + * type is EXIF_DATA_TYPE_COUNT, the result is + * EXIF_SUPPORT_LEVEL_UNKNOWN unless the support level is the same for + * all data types. * * \param[in] tag EXIF tag - * \param[in] ifd IFD - * \param[in] t data type + * \param[in] ifd IFD or EXIF_IFD_COUNT + * \param[in] t data type or EXIF_DATA_TYPE_COUNT * \return the level of support for this tag */ ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, Index: exif-tag.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -p -d -r1.53 -r1.54 --- exif-tag.c 22 Jan 2009 23:28:22 -0000 1.53 +++ exif-tag.c 23 Jan 2009 00:06:36 -0000 1.54 @@ -1023,8 +1023,12 @@ get_support_level_in_ifd (ExifTag tag, E { unsigned int i; for (i = 0; ExifTagTable[i].description; i++) { - if (ExifTagTable[i].tag == tag) - return ExifTagTable[i].esl[ifd][t]; + if (ExifTagTable[i].tag == tag) { + const ExifSupportLevel supp = ExifTagTable[i].esl[ifd][t]; + if (supp != EXIF_SUPPORT_LEVEL_NOT_RECORDED) + return supp; + /* Try looking for another entry */ + } } return EXIF_SUPPORT_LEVEL_NOT_RECORDED; } |
From: Dan F. <dfa...@us...> - 2009-01-22 23:28:33
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2467/libexif Modified Files: exif-tag.c exif-utils.c exif.h Log Message: Document the Microsoft XP tags as being in UTF-16LE Index: exif-tag.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -p -d -r1.52 -r1.53 --- exif-tag.c 22 Jan 2009 07:38:19 -0000 1.52 +++ exif-tag.c 22 Jan 2009 23:28:22 -0000 1.53 @@ -615,15 +615,30 @@ static const struct { N_("A tag used to record fractions of seconds for the " "<DateTimeDigitized> tag."), { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } }, - {EXIF_TAG_XP_TITLE, "XPTitle", N_("XP Title"), "", + /* Not in EXIF 2.2 (Microsoft extension) */ + {EXIF_TAG_XP_TITLE, "XPTitle", N_("XP Title"), + N_("A character string giving the title of the image, encoded in " + "UTF-16LE."), { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, - {EXIF_TAG_XP_COMMENT, "XPComment", N_("XP Comment"), "", + /* Not in EXIF 2.2 (Microsoft extension) */ + {EXIF_TAG_XP_COMMENT, "XPComment", N_("XP Comment"), + N_("A character string containing a comment about the image, encoded " + "in UTF-16LE."), { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, - {EXIF_TAG_XP_AUTHOR, "XPAuthor", N_("XP Author"), "", + /* Not in EXIF 2.2 (Microsoft extension) */ + {EXIF_TAG_XP_AUTHOR, "XPAuthor", N_("XP Author"), + N_("A character string containing the name of the image creator, " + "encoded in UTF-16LE."), { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, - {EXIF_TAG_XP_KEYWORDS, "XPKeywords", N_("XP Keywords"), "", + /* Not in EXIF 2.2 (Microsoft extension) */ + {EXIF_TAG_XP_KEYWORDS, "XPKeywords", N_("XP Keywords"), + N_("A character string containing key words describing the image, " + "encoded in UTF-16LE."), { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, - {EXIF_TAG_XP_SUBJECT, "XPSubject", N_("XP Subject"), "", + /* Not in EXIF 2.2 (Microsoft extension) */ + {EXIF_TAG_XP_SUBJECT, "XPSubject", N_("XP Subject"), + N_("A character string giving the image subject, encoded in " + "UTF-16LE."), { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_FLASH_PIX_VERSION, "FlashPixVersion", "FlashPixVersion", N_("The FlashPix format version supported by a FPXR file."), @@ -833,6 +848,7 @@ static const struct { /* Not in EXIF 2.2 */ {EXIF_TAG_GAMMA, "Gamma", N_("Gamma"), N_("Indicates the value of coefficient gamma.")}, + /* Not in EXIF 2.2 */ {EXIF_TAG_PRINT_IMAGE_MATCHING, "PrintImageMatching", N_("PRINT Image Matching"), N_("Related to Epson's PRINT Image Matching technology")}, #endif @@ -1033,6 +1049,7 @@ get_support_level_any_type (ExifTag tag, * data types and isn't marked not recorded. */ const ExifSupportLevel supp = ExifTagTable[i].esl[ifd][0]; + /* If level is not recorded, keep searching for another */ if (supp != EXIF_SUPPORT_LEVEL_NOT_RECORDED) { unsigned int dt; for (dt = 0; dt < EXIF_DATA_TYPE_COUNT; ++dt) { Index: exif-utils.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-utils.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -p -d -r1.14 -r1.15 --- exif-utils.c 17 Feb 2008 18:31:56 -0000 1.14 +++ exif-utils.c 22 Jan 2009 23:28:22 -0000 1.15 @@ -213,10 +213,12 @@ exif_set_srational (unsigned char *buf, exif_set_slong (buf + 4, order, value.denominator); } +/*! This function converts rather UCS-2LE than UTF-16 to UTF-8. + * It should really be replaced by iconv(). + */ void exif_convert_utf16_to_utf8 (char *out, const unsigned short *in, int maxlen) { - /* This function converts rather UCS2 than UTF16 to UTF8 */ if (maxlen <= 0) { return; } Index: exif.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -p -d -r1.11 -r1.12 --- exif.h 27 Nov 2008 06:54:45 -0000 1.11 +++ exif.h 22 Jan 2009 23:28:22 -0000 1.12 @@ -17,6 +17,17 @@ * libexif installation. If you are using libtool to build your * package, you can also integrate make use of libexif-uninstalled.pc. * + * An application using libexif would typically first create an #ExifLoader to + * load EXIF data into memory. From there, it would extract that data as + * an #ExifData to start manipulating it. Each IFD is represented by its own + * #ExifContent within that #ExifData, which contains all the tag data in + * #ExifEntry form. If the MakerNote data is required, an #ExifMnoteData + * can be extracted from the #ExifData and manipulated with the MakerNote + * functions. + * + * libexif is written in C using an object-based style that defines + * sets of functions that operate on each data structure. + * * \section data_structures Primary Data Structures * * #ExifLoader @@ -43,7 +54,11 @@ * Strings of 8 bit characters ("char*"). When libexif is compiled with * NLS, character set and encoding are as set in the current locale, * except for strings that come directly from the data in EXIF - * tags which are generally returned in raw form. + * tags which are generally returned in raw form. Most EXIF strings are + * defined to be plain 7-bit ASCII so this raw form should be acceptable in + * any UNIX locale, but some software ignores the specification and + * writes 8-bit characters. It is up to the application to detect this + * and deal with it intelligently. * * \section memory_management Memory Management Patterns * |
From: Dan F. <dfa...@us...> - 2009-01-22 07:48:01
|
Update of /cvsroot/libexif/libexif-testsuite In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31361 Modified Files: NEWS Log Message: Added check-all-mandatory-tags.sh test to ensure that no EXIF tags need to be added because they are mandatory Index: NEWS =================================================================== RCS file: /cvsroot/libexif/libexif-testsuite/NEWS,v retrieving revision 1.8 retrieving revision 1.9 diff -u -p -d -r1.8 -r1.9 --- NEWS 13 Jan 2009 01:51:51 -0000 1.8 +++ NEWS 22 Jan 2009 07:47:49 -0000 1.9 @@ -4,6 +4,8 @@ New in 0.7.x: * Made the tests work in non-English locales * Added check-no-unknown-tags.sh test to ensure that all EXIF tags are recognized + * Added check-all-mandatory-tags.sh test to ensure that no EXIF tags need + to be added because they are mandatory New in 0.7.13: * Working with libexif and exif ver. 0.6.17 |
From: Dan F. <dfa...@us...> - 2009-01-22 07:48:01
|
Update of /cvsroot/libexif/libexif-testsuite/tests In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31361/tests Modified Files: Makefile.am Added Files: check-all-mandatory-tags.sh Log Message: Added check-all-mandatory-tags.sh test to ensure that no EXIF tags need to be added because they are mandatory Index: Makefile.am =================================================================== RCS file: /cvsroot/libexif/libexif-testsuite/tests/Makefile.am,v retrieving revision 1.22 retrieving revision 1.23 diff -u -p -d -r1.22 -r1.23 --- Makefile.am 13 Jan 2009 01:51:52 -0000 1.22 +++ Makefile.am 22 Jan 2009 07:47:50 -0000 1.23 @@ -10,6 +10,7 @@ EXTRA_DIST = \ check-exif-executable.sh \ check-general-images.sh \ check-no-unknown-tags.sh \ + check-all-mandatory-tags.sh \ check-994706.sh check-994706.b.patch \ check-1054321.sh 1054321.jpg \ check-1054322.sh 1054322.jpg \ @@ -26,7 +27,8 @@ check_SCRIPTS = \ # This check script may take a little long - but it is invaluable. :) check_SCRIPTS += check-general-images.sh \ - check-no-unknown-tags.sh + check-no-unknown-tags.sh \ + check-all-mandatory-tags.sh TESTS = $(check_SCRIPTS) --- NEW FILE: check-all-mandatory-tags.sh --- #!/bin/sh # Run all test images through exif and ensure that all the mandatory tags are # available . check-vars.sh tmpfile="./output.tmp" # Display ok or FAILED depending on the result code check_result () { s="$?" if test "$s" -eq 0; then echo " ok." else echo " FAILED (${s})." errors=$(expr $errors + 1) if [ -z "$1" ] ; then true cat "$tmpfile" else true cat "$1" fi continue fi } echo Testing "$EXIFEXE" errors=0 total=0 total_img=0 for img in $ALLFILES do test -f "$img" || continue if noexiftags "$img" ; then continue # skip image fi total_img=$(expr $total_img + 1) echo -n "#${total_img} " # Capture the debug logs echo -n "Reading image \`${img}'..." # Run this in the C language locale so the messages are known env LANG=C LANGUAGE=C "$EXIFEXE" -d "${img}" > "$tmpfile" 2>&1 check_result # Ensure all tags were understood echo -n "Looking for all mandatory tags..." ! grep -q "is mandatory in IFD" "$tmpfile" check_result done rm "$tmpfile" self="$(basename "$0")" echo "$self: Checked $total_img images." echo "$self: $errors checks failed." test "$errors" -eq 0 |
From: Dan F. <dfa...@us...> - 2009-01-22 07:41:17
|
Update of /cvsroot/libexif/exif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30967 Modified Files: ChangeLog NEWS exif.1 Log Message: Create mandatory EXIF tags with the --create-exif option Index: NEWS =================================================================== RCS file: /cvsroot/libexif/exif/NEWS,v retrieving revision 1.26 retrieving revision 1.27 diff -u -p -d -r1.26 -r1.27 --- NEWS 15 Jan 2009 02:32:31 -0000 1.26 +++ NEWS 22 Jan 2009 07:41:09 -0000 1.27 @@ -5,6 +5,7 @@ exif-0.6.x: (bug #2034873) * Allow setting --tag=0 (needed for the GPS IFD) * --ifd is now honoured while displaying tag contents + * --create-exif now creates mandatory EXIF tags with default data exif-0.6.17 (2008-11-06): * Fixed the output of -s and -t when iconv is configured Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/exif/ChangeLog,v retrieving revision 1.86 retrieving revision 1.87 diff -u -p -d -r1.86 -r1.87 --- ChangeLog 15 Jan 2009 02:32:31 -0000 1.86 +++ ChangeLog 22 Jan 2009 07:41:09 -0000 1.87 @@ -1,3 +1,7 @@ +2009-01-21 Dan Fandrich <da...@co...> + + * exif/main.c: Create mandatory EXIF tags with the --create-exif option + 2009-01-14 Dan Fandrich <da...@co...> * exif/main.c: Clarify the error when a file can't be read Index: exif.1 =================================================================== RCS file: /cvsroot/libexif/exif/exif.1,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -d -r1.12 -r1.13 --- exif.1 19 Nov 2008 05:36:53 -0000 1.12 +++ exif.1 22 Jan 2009 07:41:09 -0000 1.13 @@ -1,4 +1,4 @@ -.\" © 2002 by Thomas Pircher (tehpeh at gmx dot net) +.\" © 2002-2009 by Thomas Pircher (tehpeh at gmx dot net) et. al. .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are @@ -12,12 +12,8 @@ .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" License. -.\" Modified 2002-09-08 by thomas -.\" Modified 2005-03-23 by hun -.\" Modified 2008-01-24 by dfandrich -.\" Modified 2008-02-05 by Benno Schulenberg .\" -.TH exif 1 "2008-11-04" "exif 0.6.17" "libexif command line front-end" +.TH exif 1 "2009-01-21" "exif 0.6.17.1" "libexif command line front-end" .SH "NAME" exif \- shows EXIF information in JPEG files .SH "SYNOPSIS" @@ -37,6 +33,10 @@ library. Each input file given on the command line is acted upon in turn, using all the options given. Execution will be aborted immediately if one file is not readable or does not contain EXIF tags. +.PP +As EXIF tags are read, any unknown ones are discarded and known ones are +automatically converted into the correct format, if they aren't already. +Corrupted MakerNote tags are also removed, but no format changes are made. .SH "OPTIONS" .TP .BI "\-v, \-\-version" @@ -55,7 +55,7 @@ with \-\-ifd. The tag title is dependen name and number are locale-independent. .TP .BI "\-\-ifd=" "IFD" -Select a tag from this +Select a tag or tags from this .IR "IFD" . Valid IFDs are "0", "1", "EXIF", "GPS", and "Interoperability". Defaults to "0". @@ -115,7 +115,9 @@ Produce output in an XML format (when po The \-\-xml-output and \-\-machine\-readable options are mutually exclusive. .TP .BI "\-d, \-\-debug" -Show debugging messages. +Show debugging messages. Also, when processing a file that contains corrupted +data, this option cases exif to attempt to continue processing. Normally, +corrupted data causes an abort. .SS "Help options" .TP .BI "\-?, \-\-help" |
From: Dan F. <dfa...@us...> - 2009-01-22 07:41:17
|
Update of /cvsroot/libexif/exif/exif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30967/exif Modified Files: actions.c actions.h main.c Log Message: Create mandatory EXIF tags with the --create-exif option Index: main.c =================================================================== RCS file: /cvsroot/libexif/exif/exif/main.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -p -d -r1.72 -r1.73 --- main.c 20 Jan 2009 23:46:09 -0000 1.72 +++ main.c 22 Jan 2009 07:41:11 -0000 1.73 @@ -355,8 +355,15 @@ main (int argc, const char **argv) exif_loader_unref (l); if (!ed) { if (create_exif) { + /* Create a new EXIF data set */ ed = exif_data_new (); exif_data_log (ed, log); + exif_data_set_data_type(ed, EXIF_DATA_TYPE_COMPRESSED); + /* Add all the mandatory fields */ + exif_data_fix(ed); + + /* Create a new date tag */ + action_create_value (ed, log, EXIF_TAG_DATE_TIME, EXIF_IFD_0); } else { exif_log (log, -1, "exif", _("'%s' is not " "readable or does not contain EXIF data!"), Index: actions.c =================================================================== RCS file: /cvsroot/libexif/exif/exif/actions.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -p -d -r1.41 -r1.42 --- actions.c 15 Jan 2009 02:32:30 -0000 1.41 +++ actions.c 22 Jan 2009 07:41:11 -0000 1.42 @@ -214,18 +214,26 @@ show_entry (ExifEntry *entry, unsigned i exif_entry_dump (entry, 0); } -void -action_set_value (ExifData *ed, ExifLog *log, ExifParams p) +/*! If the entry doesn't exist, create it. */ +ExifEntry * +action_create_value (ExifData *ed, ExifLog *log, ExifTag tag, ExifIfd ifd) { ExifEntry *e; - /* If the entry doesn't exist, create it. */ - if (!((e = exif_content_get_entry (ed->ifd[p.ifd], p.tag)))) { + if (!((e = exif_content_get_entry (ed->ifd[ifd], tag)))) { exif_log (log, EXIF_LOG_CODE_DEBUG, "exif", "Adding entry..."); e = exif_entry_new (); - exif_content_add_entry (ed->ifd[p.ifd], e); - exif_entry_initialize (e, p.tag); + exif_content_add_entry (ed->ifd[ifd], e); + exif_entry_initialize (e, tag); } + return e; +} + +void +action_set_value (ExifData *ed, ExifLog *log, ExifParams p) +{ + /* If the entry doesn't exist, create it. */ + ExifEntry *e = action_create_value(ed, log, p.tag, p.ifd); /* Now set the value and save the data. */ convert_arg_to_entry (p.set_value, e, exif_data_get_byte_order (ed), log); Index: actions.h =================================================================== RCS file: /cvsroot/libexif/exif/exif/actions.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -p -d -r1.10 -r1.11 --- actions.h 17 Feb 2008 18:17:08 -0000 1.10 +++ actions.h 22 Jan 2009 07:41:11 -0000 1.11 @@ -41,6 +41,8 @@ void action_remove_thumb (ExifData * void action_show_tag (ExifData *, ExifLog *, ExifParams); void action_set_value (ExifData *, ExifLog *, ExifParams); void action_remove_tag (ExifData *, ExifLog *, ExifParams); +ExifEntry * +action_create_value (ExifData *ed, ExifLog *log, ExifTag tag, ExifIfd ifd); void action_save (ExifData *, ExifLog *, ExifParams, const char *); void action_save_thumb (ExifData *, ExifLog *, ExifParams, const char *); |
From: Dan F. <dfa...@us...> - 2009-01-22 07:38:29
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30749/libexif Modified Files: exif-tag.c exif-tag.h Log Message: When the data type is not known in exif_tag_get_support_level_in_ifd check the support level for all data types and if it's all the same, return that. This means that fixing a new EXIF tag block will actually create some tags in it now. Index: exif-tag.h =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -p -d -r1.22 -r1.23 --- exif-tag.h 14 Jan 2009 06:27:35 -0000 1.22 +++ exif-tag.h 22 Jan 2009 07:38:19 -0000 1.23 @@ -188,7 +188,7 @@ typedef enum { /*! The meaning of this tag is unknown */ EXIF_SUPPORT_LEVEL_UNKNOWN = 0, - /*! This tag is not found in the given IFD */ + /*! This tag is not allowed in the given IFD */ EXIF_SUPPORT_LEVEL_NOT_RECORDED, /*! This tag is mandatory in the given IFD */ @@ -239,6 +239,7 @@ const char *exif_tag_get_descriptio * \param[in] tag EXIF tag * \param[in] ifd IFD * \param[in] t data type + * \return the level of support for this tag */ ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t); Index: exif-tag.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-tag.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -p -d -r1.51 -r1.52 --- exif-tag.c 21 Jan 2009 00:09:44 -0000 1.51 +++ exif-tag.c 22 Jan 2009 07:38:19 -0000 1.52 @@ -39,6 +39,8 @@ #define ESL_GPS { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN } static const struct { + /*! Tag ID. There may be duplicate tags when the same number is used for + * different meanings in different IFDs. */ ExifTag tag; const char *name; const char *title; @@ -991,17 +993,70 @@ exif_tag_from_name (const char *name) return result; } +/*! Return the support level of a tag in the given IFD with the given data + * type. If the tag is not specified in the EXIF standard, this function + * returns EXIF_SUPPORT_LEVEL_NOT_RECORDED. + * + * \param[in] tag EXIF tag + * \param[in] ifd a valid IFD (not EXIF_IFD_COUNT) + * \param[in] t a valid data type (not EXIF_DATA_TYPE_COUNT) + * \return the level of support for this tag + */ +static inline ExifSupportLevel +get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t) +{ + unsigned int i; + for (i = 0; ExifTagTable[i].description; i++) { + if (ExifTagTable[i].tag == tag) + return ExifTagTable[i].esl[ifd][t]; + } + return EXIF_SUPPORT_LEVEL_NOT_RECORDED; +} + +/*! Return the support level of a tag in the given IFD, regardless of the + * data type. If the support level varies depending on the data type, this + * function returns EXIF_SUPPORT_LEVEL_UNKNOWN. If the tag is not specified + * in the EXIF standard, this function returns EXIF_SUPPORT_LEVEL_UNKNOWN. + * + * \param[in] tag EXIF tag + * \param[in] ifd a valid IFD (not EXIF_IFD_COUNT) + * \return the level of support for this tag + */ +static inline ExifSupportLevel +get_support_level_any_type (ExifTag tag, ExifIfd ifd) +{ + unsigned int i; + for (i = 0; ExifTagTable[i].description; i++) { + if (ExifTagTable[i].tag == tag) { + /* + * Check whether the support level is the same for all possible + * data types and isn't marked not recorded. + */ + const ExifSupportLevel supp = ExifTagTable[i].esl[ifd][0]; + if (supp != EXIF_SUPPORT_LEVEL_NOT_RECORDED) { + unsigned int dt; + for (dt = 0; dt < EXIF_DATA_TYPE_COUNT; ++dt) { + if (ExifTagTable[i].esl[ifd][dt] != supp) + break; + } + if (dt == EXIF_DATA_TYPE_COUNT) + /* Support level is always the same, so return it */ + return supp; + } + /* Keep searching the table for another tag for our IFD */ + } + } + return EXIF_SUPPORT_LEVEL_UNKNOWN; +} + ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t) { - unsigned int i; + if (ifd >= EXIF_IFD_COUNT) + return EXIF_SUPPORT_LEVEL_UNKNOWN; - if (ifd >= EXIF_IFD_COUNT) return EXIF_SUPPORT_LEVEL_UNKNOWN; - if (t >= EXIF_DATA_TYPE_COUNT) return EXIF_SUPPORT_LEVEL_UNKNOWN; + if (t >= EXIF_DATA_TYPE_COUNT) + return get_support_level_any_type (tag, ifd); - for (i = 0; ExifTagTable[i].description; i++) - if ((ExifTagTable[i].tag == tag) && - (ExifTagTable[i].esl[ifd][t] != EXIF_SUPPORT_LEVEL_NOT_RECORDED)) - return ExifTagTable[i].esl[ifd][t]; - return EXIF_SUPPORT_LEVEL_NOT_RECORDED; + return get_support_level_in_ifd (tag, ifd, t); } |
From: Dan F. <dfa...@us...> - 2009-01-22 07:38:25
|
Update of /cvsroot/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30749 Modified Files: NEWS ChangeLog Log Message: When the data type is not known in exif_tag_get_support_level_in_ifd check the support level for all data types and if it's all the same, return that. This means that fixing a new EXIF tag block will actually create some tags in it now. Index: NEWS =================================================================== RCS file: /cvsroot/libexif/libexif/NEWS,v retrieving revision 1.50 retrieving revision 1.51 diff -u -p -d -r1.50 -r1.51 --- NEWS 13 Jan 2009 08:26:39 -0000 1.50 +++ NEWS 22 Jan 2009 07:38:17 -0000 1.51 @@ -14,6 +14,8 @@ libexif-0.6.x: * Fixed the interpretation of some tags as being optional in IFD 1 (to match the EXIF 2.2 spec) which stops them from being erroneously removed from a file + * Changed exif_tag_get_support_level_in_ifd() to return a value when possible + when the data type for the given tag is unknown libexif-0.6.17 (2008-11-06): * Updated translations: cs, de, pl, sk, vi Index: ChangeLog =================================================================== RCS file: /cvsroot/libexif/libexif/ChangeLog,v retrieving revision 1.298 retrieving revision 1.299 diff -u -p -d -r1.298 -r1.299 --- ChangeLog 16 Jan 2009 07:07:21 -0000 1.298 +++ ChangeLog 22 Jan 2009 07:38:17 -0000 1.299 @@ -1,3 +1,13 @@ +2009-01-21 Dan Fandrich <da...@co...> + + * libexif/exif-entry.c: Initialize the default for EXIF_TAG_COLOR_SPACE + to "Uncalibrated" + * libexif/exif-data.c: Reduce the recursion limit + * When the data type is not known in exif_tag_get_support_level_in_ifd + check the support level for all data types and if it's all the same, + return that. This means that fixing a new EXIF tag block will + actually create some tags in it now. + 2009-01-15 Dan Fandrich <da...@co...> * Interpret more Sanyo MakerNote tags |
From: Dan F. <dfa...@us...> - 2009-01-22 07:29:31
|
Update of /cvsroot/libexif/libexif/libexif In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30439/libexif Modified Files: exif-entry.c Log Message: Default EXIF_TAG_COLOR_SPACE to 0xffff (uncalibrated) Index: exif-entry.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-entry.c,v retrieving revision 1.127 retrieving revision 1.128 diff -u -p -d -r1.127 -r1.128 --- exif-entry.c 18 Jan 2009 09:56:01 -0000 1.127 +++ exif-entry.c 22 Jan 2009 07:29:14 -0000 1.128 @@ -1174,7 +1174,6 @@ exif_entry_initialize (ExifEntry *e, Exi case EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM: case EXIF_TAG_GAIN_CONTROL: case EXIF_TAG_SUBJECT_DISTANCE_RANGE: - case EXIF_TAG_COLOR_SPACE: case EXIF_TAG_FLASH: /* SHORT, 1 component, default 0 */ @@ -1229,6 +1228,17 @@ exif_entry_initialize (ExifEntry *e, Exi exif_set_short (e->data, o, 3); break; + case EXIF_TAG_COLOR_SPACE: + /* SHORT, 1 component, default 0xffff */ + e->components = 1; + e->format = EXIF_FORMAT_SHORT; + e->size = exif_format_get_size (e->format) * e->components; + e->data = exif_entry_alloc (e, e->size); + if (!e->data) break; + exif_set_short (e->data, o, 0xffff); + break; + + case EXIF_TAG_BITS_PER_SAMPLE: e->components = 3; e->format = EXIF_FORMAT_SHORT; |