aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-27 13:49:47 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-06-29 13:40:00 +0000
commitfc46087ce9c451acded2692bcb9064ba7a716e60 (patch)
tree35bd9635bb86e46265caa3b94de835d5134bb1ef /scripts
parentsixel: refactor: shorten very verbose switch case statements (diff)
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate-alt-random-writes.py4
1 files 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.