Browse Source

less totally wasteful copying around of redundant image data

main
Holly McFarland 1 year ago
parent
commit
315a53ae9e
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      generate.py

+ 2
- 1
generate.py View File

@ -38,8 +38,9 @@ def main():
template = Image.open('img/template.png')
ratio, unknown = process_image(template)
attempt = template.copy()
while True:
attempt = template.copy()
for coords in unknown:
attempt.putpixel(coords, Module.BLACK.value if random.random() < ratio else Module.WHITE.value)
attempt.resize((d*15 for d in attempt.size), Image.NEAREST).show()


Loading…
Cancel
Save