aboutsummaryrefslogtreecommitdiff
path: root/lib/libexif
diff options
context:
space:
mode:
authorChristian Fetzer <fetzer.ch@googlemail.com>2011-10-17 23:51:58 +0200
committerChristian Fetzer <fetzer.ch@googlemail.com>2012-03-26 18:36:06 +0200
commit3333a9bb22b5fe8c7eba6b4f56e314401c3e0e34 (patch)
tree524895eadd3d9eb7c3a2894f9a59f08a36abf5f1 /lib/libexif
parent8c38ea623f1ddb819d03ffcff7078e7b0b2c4af7 (diff)
Added support for the exif ImageDescription tag to libexif and made it accessible through slideshow.exifdescription.
Diffstat (limited to 'lib/libexif')
-rw-r--r--lib/libexif/ExifParse.cpp8
-rw-r--r--lib/libexif/libexif.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/libexif/ExifParse.cpp b/lib/libexif/ExifParse.cpp
index 74ecbbef78..a905e80c54 100644
--- a/lib/libexif/ExifParse.cpp
+++ b/lib/libexif/ExifParse.cpp
@@ -413,7 +413,13 @@ void CExifParse::ProcessDir(const unsigned char* const DirStart,
// Extract useful components of tag
switch(Tag)
{
-// case TAG_DESCRIPTION: strncpy(m_ExifInfo->Description, ValuePtr, 5); break;
+ case TAG_DESCRIPTION:
+ {
+ int length = max(ByteCount, 0);
+ length = min(length, 2000);
+ strncpy(m_ExifInfo->Description, (char *)ValuePtr, length);
+ break;
+ }
case TAG_MAKE: strncpy(m_ExifInfo->CameraMake, (char *)ValuePtr, 32); break;
case TAG_MODEL: strncpy(m_ExifInfo->CameraModel, (char *)ValuePtr, 40); break;
// case TAG_SOFTWARE: strncpy(m_ExifInfo->Software, ValuePtr, 5); break;
diff --git a/lib/libexif/libexif.h b/lib/libexif/libexif.h
index e889892a73..204f99d35d 100644
--- a/lib/libexif/libexif.h
+++ b/lib/libexif/libexif.h
@@ -98,6 +98,7 @@ typedef struct {
int ISOequivalent;
int LightSource;
char Comments[MAX_COMMENT];
+ char Description[MAX_COMMENT];
unsigned ThumbnailOffset; // Exif offset to thumbnail
unsigned ThumbnailSize; // Size of thumbnail.