summaryrefslogtreecommitdiff
path: root/data-image.c
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2006-01-14 11:09:41 +0000
committerAndreas Brachold <vdr07@deltab.de>2006-01-14 11:09:41 +0000
commit09842bddc7ce23b92648b95004407679be99cb03 (patch)
tree2d66d078d2d1bf2cc9b96e1154c08be36c0bea8d /data-image.c
parent928853f57f548b9a301811cf374b9a4889b68f17 (diff)
downloadvdr-plugin-image-09842bddc7ce23b92648b95004407679be99cb03.tar.gz
vdr-plugin-image-09842bddc7ce23b92648b95004407679be99cb03.tar.bz2
now inital rotation depends founded exif data
Diffstat (limited to 'data-image.c')
-rw-r--r--data-image.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/data-image.c b/data-image.c
index 0e8c778..137e264 100644
--- a/data-image.c
+++ b/data-image.c
@@ -29,6 +29,10 @@
#include "data.h"
#include "setup-image.h"
+#ifdef HAVE_LIBEXIF
+#include "exif.h"
+#endif
+
cFileSources ImageSources;
// --- cImage -------------------------------------------------------------
@@ -40,9 +44,17 @@ cImage::cImage(const char *szName, cFileSource * pSource)
, m_szFileNameIndex(NULL)
, m_szFileNameZoom(NULL)
{
- if(szName)
+ if(szName) {
m_szFileName = m_pSource->BuildName(szName);
+#ifdef HAVE_LIBEXIF
+ ImageMirror mirror = NONE;
+ GetRotationFromExifData (m_szFileName, m_nDefaultRotate, mirror);
+ if(mirror != NONE)
+ isyslog("imageplugin: automated rotation from exif data with mirroring (%d) is'nt supported, found at file '%s' \n", mirror, m_szFileName);
+#endif
+ }
m_pSource->Block();
+
}
cImage::~cImage()