From fc46087ce9c451acded2692bcb9064ba7a716e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 27 Jun 2023 15:49:47 +0200 Subject: [PATCH] scripts: generate-alt-random: set P2=1 when emitting sixels P2=1 means "empty sixels remain at their current color". This is usually the case with modern sixel encoders. --- scripts/generate-alt-random-writes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate-alt-random-writes.py b/scripts/generate-alt-random-writes.py index 812b0213..789d64e0 100755 --- a/scripts/generate-alt-random-writes.py +++ b/scripts/generate-alt-random-writes.py @@ -207,8 +207,8 @@ def main(): six_height, six_width = last_size six_rows = (six_height + 5) // 6 # Round up; each sixel is 6 pixels - # Begin sixel - out.write('\033Pq') + # Begin sixel (with P2=1 - empty sixels are transparent) + out.write('\033P;1q') # Sixel size. Without this, sixels will be # auto-resized on cell-boundaries.