f
This commit is contained in:
parent
32069e5b1f
commit
bc7992f405
2 changed files with 2 additions and 2 deletions
2
a.py
2
a.py
|
@ -119,7 +119,7 @@ def get_bg():
|
||||||
imgn = Image.open(io.BytesIO(base64.b64decode(line[5:-1])))
|
imgn = Image.open(io.BytesIO(base64.b64decode(line[5:-1])))
|
||||||
assert imgn.size == (X, Y)
|
assert imgn.size == (X, Y)
|
||||||
#print(imgn.mode)
|
#print(imgn.mode)
|
||||||
if img is None:
|
if imgn.mode == 'RGB':
|
||||||
img = imgn.convert(mode='RGBA')
|
img = imgn.convert(mode='RGBA')
|
||||||
else:
|
else:
|
||||||
assert imgn.mode == 'RGBA'
|
assert imgn.mode == 'RGBA'
|
||||||
|
|
|
@ -118,7 +118,7 @@ def get_bg():
|
||||||
imgn = Image.open(io.BytesIO(base64.b64decode(line[5:-1])))
|
imgn = Image.open(io.BytesIO(base64.b64decode(line[5:-1])))
|
||||||
assert imgn.size == (X, Y)
|
assert imgn.size == (X, Y)
|
||||||
#print(imgn.mode)
|
#print(imgn.mode)
|
||||||
if img is None:
|
if imgn.mode == 'RGB':
|
||||||
img = imgn.convert(mode='RGBA')
|
img = imgn.convert(mode='RGBA')
|
||||||
else:
|
else:
|
||||||
assert imgn.mode == 'RGBA'
|
assert imgn.mode == 'RGBA'
|
||||||
|
|
Loading…
Reference in a new issue