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.
This commit is contained in:
Daniel Eklöf 2023-06-27 15:49:47 +02:00
parent 75f9bed6b6
commit fc46087ce9
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -207,8 +207,8 @@ def main():
six_height, six_width = last_size six_height, six_width = last_size
six_rows = (six_height + 5) // 6 # Round up; each sixel is 6 pixels six_rows = (six_height + 5) // 6 # Round up; each sixel is 6 pixels
# Begin sixel # Begin sixel (with P2=1 - empty sixels are transparent)
out.write('\033Pq') out.write('\033P;1q')
# Sixel size. Without this, sixels will be # Sixel size. Without this, sixels will be
# auto-resized on cell-boundaries. # auto-resized on cell-boundaries.