This commit is contained in:
Kovid Goyal 2020-01-08 18:20:34 +05:30
commit fdb915d0c8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -93,6 +93,12 @@ but you can turn it off or on explicitly, if needed.
--silent --silent
type=bool-set type=bool-set
Do not print out anything to stdout during operation. Do not print out anything to stdout during operation.
--z-index -z
type=int
default=0
Z-index of the image. When negative, text will be displayed on top of the image.
''' '''
@ -182,8 +188,8 @@ def write_chunked(cmd, data):
cmd.clear() cmd.clear()
def show(outfile, width, height, fmt, transmit_mode='t', align='center', place=None): def show(outfile, width, height, zindex, fmt, transmit_mode='t', align='center', place=None):
cmd = {'a': 'T', 'f': fmt, 's': width, 'v': height} cmd = {'a': 'T', 'f': fmt, 's': width, 'v': height, 'z': zindex}
if place: if place:
set_cursor_for_place(place, cmd, width, height, align) set_cursor_for_place(place, cmd, width, height, align)
else: else:
@ -219,7 +225,7 @@ def process(path, args, is_tempfile):
fmt = 24 if m.mode == 'rgb' else 32 fmt = 24 if m.mode == 'rgb' else 32
transmit_mode = 't' transmit_mode = 't'
outfile, width, height = convert(path, m, available_width, available_height, args.scale_up) outfile, width, height = convert(path, m, available_width, available_height, args.scale_up)
show(outfile, width, height, fmt, transmit_mode, align=args.align, place=args.place) show(outfile, width, height, args.z_index, fmt, transmit_mode, align=args.align, place=args.place)
if not args.place: if not args.place:
print() # ensure cursor is on a new line print() # ensure cursor is on a new line
return file_removed return file_removed