flip_top_bottom -> rotate_180
This commit is contained in:
parent
becb7a28bd
commit
3a739ede9c
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 |
@ -131,7 +131,7 @@ def convert_to_image(sudoku, size=16, flipped=False):
|
|||||||
# fn = lambda x : 255 if x > 200 else 0
|
# fn = lambda x : 255 if x > 200 else 0
|
||||||
# canvas.convert('L').point(fn, mode='1')
|
# canvas.convert('L').point(fn, mode='1')
|
||||||
if flipped:
|
if flipped:
|
||||||
canvas = canvas.transpose(Image.FLIP_TOP_BOTTOM)
|
canvas = canvas.transpose(Image.ROTATE_180)
|
||||||
canvas.save("sudoku_" + str(size) +".png", "PNG")
|
canvas.save("sudoku_" + str(size) +".png", "PNG")
|
||||||
# img = Image.new('RGB', (200, 100))
|
# img = Image.new('RGB', (200, 100))
|
||||||
# d = ImageDraw.Draw(img)
|
# d = ImageDraw.Draw(img)
|
||||||
|
Loading…
Reference in New Issue
Block a user