remove alpha channel

This commit is contained in:
deeppomf 2018-02-26 21:07:01 -05:00
parent 7e8c8c2967
commit 6477410f06

View File

@ -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)