mirror of
https://github.com/Deepshift/DeepCreamPy.git
synced 2024-11-29 05:10:43 +00:00
remove alpha channel
This commit is contained in:
parent
7e8c8c2967
commit
6477410f06
@ -16,6 +16,9 @@ for path in paths:
|
|||||||
#img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
#img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
||||||
#x.append(img)
|
#x.append(img)
|
||||||
temp = Image.open(path)
|
temp = Image.open(path)
|
||||||
|
#remove alpha channel
|
||||||
|
if temp.mode=='RGBA':
|
||||||
|
temp = im.convert('RGB')
|
||||||
keep = temp.copy()
|
keep = temp.copy()
|
||||||
keep = np.array(keep)
|
keep = np.array(keep)
|
||||||
x.append(keep)
|
x.append(keep)
|
||||||
|
Loading…
Reference in New Issue
Block a user