mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Fix #1575
This commit is contained in:
parent
d5846282a9
commit
1c4f5b471d
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue