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 * |