From 5cafe198bfaf85edbe442984054ff36c3a9f414b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Sep 2021 08:45:41 +0530 Subject: [PATCH] icat: Fix EXIF orientation not taken into account when resizing --- kittens/tui/images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kittens/tui/images.py b/kittens/tui/images.py index bdf78ec23..f5b12a45c 100644 --- a/kittens/tui/images.py +++ b/kittens/tui/images.py @@ -202,6 +202,7 @@ def render_image( cmd += ['-background', 'none', '--', path] if only_first_frame and has_multiple_frames: cmd[-1] += '[0]' + cmd.append('-auto-orient') scaled = False width, height = m.width, m.height if scale_up: @@ -216,7 +217,7 @@ def render_image( # we have to coalesce, resize and de-coalesce all frames resize_cmd = ['-coalesce'] + resize_cmd + ['-deconstruct'] cmd += resize_cmd - cmd += ['-depth', '8', '-auto-orient', '-set', 'filename:f', '%w-%h-%g-%p'] + cmd += ['-depth', '8', '-set', 'filename:f', '%w-%h-%g-%p'] ans = RenderedImage(m.fmt, width, height, m.mode) if only_first_frame: ans.frames = [Frame(m.frames[0])]