Define white and black outside the loops

This commit is contained in:
Theelgirl 2020-10-07 14:56:09 +00:00 committed by GitHub
parent deb427ca31
commit da69b90dc8
1 changed files with 3 additions and 2 deletions

View File

@ -39,6 +39,9 @@ def get_bits_from_image(image):
pbar = tqdm(range(height), desc="Getting bits from frame")
white = (255, 255, 255)
black = (0, 0, 0)
for y in pbar:
for x in range(width):
@ -54,8 +57,6 @@ def get_bits_from_image(image):
return (bits, True)
pixel = px[x, y]
white = (255, 255, 255)
black = (0, 0, 0)
pixel_bin_rep = 0