From 0bc98877f35ef56e127aecc3df3aff986a4c3c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 9 Mar 2021 11:36:56 +0100 Subject: [PATCH] =?UTF-8?q?generate-alt-random:=20emit=20=E2=80=9CSet=20Ra?= =?UTF-8?q?ster=20Attributes=E2=80=9D=20before=20color=20definitions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/generate-alt-random-writes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate-alt-random-writes.py b/scripts/generate-alt-random-writes.py index ec671fd3..30b7e9c9 100755 --- a/scripts/generate-alt-random-writes.py +++ b/scripts/generate-alt-random-writes.py @@ -184,6 +184,10 @@ def main(): # Begin sixel out.write('\033Pq') + # Sixel size. Without this, sixels will be + # auto-resized on cell-boundaries. + out.write(f'"1;1;{six_width};{six_height}') + # Set up 256 random colors for idx in range(256): # param 2: 1=HLS, 2=RGB. @@ -191,10 +195,6 @@ def main(): # (except 'hue' which is 0..360) out.write(f'#{idx};2;{random.randrange(101)};{random.randrange(101)};{random.randrange(101)}') - # Sixel size. Without this, sixels will be - # auto-resized on cell-boundaries. - out.write(f'"1;1;{six_width};{six_height}') - for row in range(six_height // 6): # Each sixel is 6 pixels band_count = random.randrange(32) for band in range(band_count):