mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Fix #1575
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user