From 3abba731bf4c78c14619b9f89771d408957b07ef Mon Sep 17 00:00:00 2001 From: ace20022 Date: Fri, 19 Jun 2015 13:31:58 +0200 Subject: [libexif] Add processing of comment tags used by Windows. --- lib/libexif/ExifParse.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/libexif/ExifParse.cpp b/lib/libexif/ExifParse.cpp index 64bb815ced..c36bc1aa45 100755 --- a/lib/libexif/ExifParse.cpp +++ b/lib/libexif/ExifParse.cpp @@ -83,6 +83,7 @@ static void ErrNonfatal(const char* const msg, int a1, int a2); #define TAG_FOCALLENGTH 0x920A #define TAG_MAKER_NOTE 0x927C // Not processed yet. Maybe in the future. #define TAG_USERCOMMENT 0x9286 +#define TAG_XP_COMMENT 0x9c9c #define TAG_FLASHPIX_VERSION 0xA000 // Not processed. #define TAG_COLOUR_SPACE 0xA001 // Not processed. Format int16u. Values: 1-RGB; 2-Adobe RGB 65535-Uncalibrated #define TAG_EXIF_IMAGEWIDTH 0xa002 @@ -480,6 +481,15 @@ void CExifParse::ProcessDir(const unsigned char* const DirStart, } break; + case TAG_XP_COMMENT: + { + // The XP user comment field is always unicode (UCS-2) encoded + m_ExifInfo->CommentsCharset = EXIF_COMMENT_CHARSET_UNICODE; + + memcpy(m_ExifInfo->Comments, ValuePtr, ByteCount); + } + break; + case TAG_FNUMBER: // Simplest way of expressing aperture, so I trust it the most. // (overwrite previously computd value if there is one) -- cgit v1.2.3