mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
generate-alt-random: emit “Set Raster Attributes” before color definitions
This commit is contained in:
parent
a3f2e2220a
commit
0bc98877f3
1 changed files with 4 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue