Fix mirror-bug.
This commit is contained in:
parent
161e8cb728
commit
38e68ce92d
@ -1,4 +1,4 @@
|
|||||||
from PIL import Image
|
from PIL import Image, ImageOps
|
||||||
|
|
||||||
# [[0,0, rgb1],... [1,1, rgb2]] -> [[1,1, rgb1],...[0,0, rgb2]]
|
# [[0,0, rgb1],... [1,1, rgb2]] -> [[1,1, rgb1],...[0,0, rgb2]]
|
||||||
def flip(cords):
|
def flip(cords):
|
||||||
@ -28,6 +28,8 @@ def flip(cords):
|
|||||||
# convert("example.png") // png/jpg/gif
|
# convert("example.png") // png/jpg/gif
|
||||||
def convert(filename, move = [0,0]):
|
def convert(filename, move = [0,0]):
|
||||||
im = Image.open(filename).convert('RGB')
|
im = Image.open(filename).convert('RGB')
|
||||||
|
# Fix mirror
|
||||||
|
im = ImageOps.mirror(im)
|
||||||
pxls=im.load()
|
pxls=im.load()
|
||||||
w=im.size[0]
|
w=im.size[0]
|
||||||
h=im.size[1]
|
h=im.size[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user