flip_top_bottom -> rotate_180

This commit is contained in:
samerbam 2023-08-23 20:08:05 -04:00
parent becb7a28bd
commit 3a739ede9c
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -131,7 +131,7 @@ def convert_to_image(sudoku, size=16, flipped=False):
# fn = lambda x : 255 if x > 200 else 0
# canvas.convert('L').point(fn, mode='1')
if flipped:
canvas = canvas.transpose(Image.FLIP_TOP_BOTTOM)
canvas = canvas.transpose(Image.ROTATE_180)
canvas.save("sudoku_" + str(size) +".png", "PNG")
# img = Image.new('RGB', (200, 100))
# d = ImageDraw.Draw(img)