generate-alt-random: sixel: emit at least 4 color bands

This fixes an issue where there was a relatively high chance of not
emitting any color bands at all, causing the final image size to be
too small.
This commit is contained in:
Daniel Eklöf 2021-03-09 12:02:31 +01:00
parent f3bc5a95b5
commit a8186351d1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -197,7 +197,7 @@ def main():
out.write(f'#{idx};2;{random.randrange(101)};{random.randrange(101)};{random.randrange(101)}')
for row in range(six_rows):
band_count = random.randrange(32)
band_count = random.randrange(4, 33)
for band in range(band_count):
# Choose a random color
out.write(f'#{random.randrange(256)}')