summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/imlib.c3
-rw-r--r--src/options.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/imlib.c b/src/imlib.c
index add88d6..c42c4a4 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -462,8 +462,9 @@ int feh_load_image(Imlib_Image * im, feh_file * file)
if (file->ed) {
ExifByteOrder byteOrder = exif_data_get_byte_order(file->ed);
ExifEntry *exifEntry = exif_data_get_entry(file->ed, EXIF_TAG_ORIENTATION);
- if (exifEntry && opt.auto_rotate)
+ if (exifEntry && opt.auto_rotate) {
orientation = exif_get_short(exifEntry->data, byteOrder);
+ }
}
if (orientation == 2)
diff --git a/src/options.c b/src/options.c
index 4d1e527..71c65e2 100644
--- a/src/options.c
+++ b/src/options.c
@@ -758,7 +758,12 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
opt.draw_exif = 1;
break;
case OPTION_auto_rotate:
+#if defined(IMLIB2_VERSION_MAJOR) && defined(IMLIB2_VERSION_MINOR) && defined(IMLIB2_VERSION_MICRO) && (IMLIB2_VERSION_MAJOR > 1 || IMLIB2_VERSION_MINOR > 7 || IMLIB2_VERSION_MICRO >= 5)
+ weprintf("This feh release was built with Imlib2 version %d.%d.%d, which transparently adjusts for image orientation according to EXIF data.", IMLIB2_VERSION_MAJOR, IMLIB2_VERSION_MINOR, IMLIB2_VERSION_MICRO);
+ weprintf("--auto-rotate would rotate an already correctly oriented image, resulting in incorrect orientation. It has been disabled in this build. Rebuild feh with Imlib2 <1.7.5 to enable --auto-rotate.");
+#else
opt.auto_rotate = 1;
+#endif
break;
#endif
case OPTION_no_xinerama: