From 1c4f5b471d05c28b96795cab0b40666f3c0f4d56 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 Apr 2019 07:58:07 +0530 Subject: [PATCH] Fix #1575 --- kittens/tui/images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kittens/tui/images.py b/kittens/tui/images.py index 76195c806..544fc2af7 100644 --- a/kittens/tui/images.py +++ b/kittens/tui/images.py @@ -61,7 +61,7 @@ def run_imagemagick(path, cmd, keep_stdout=True): def identify(path): - p = run_imagemagick(path, ['identify', '-format', '%m %w %h %A', path]) + p = run_imagemagick(path, ['identify', '-format', '%m %w %h %A', '--', path]) parts = tuple(filter(None, p.stdout.decode('utf-8').split())) mode = 'rgb' if parts[3].lower() == 'false' else 'rgba' return ImageData(parts[0].lower(), int(parts[1]), int(parts[2]), mode) @@ -70,7 +70,7 @@ def identify(path): def convert(path, m, available_width, available_height, scale_up, tdir=None): from tempfile import NamedTemporaryFile width, height = m.width, m.height - cmd = ['convert', '-background', 'none', path] + cmd = ['convert', '-background', 'none', '--', path] scaled = False if scale_up: if width < available_width: