Skip to content

Commit bac86a5

Browse files
suquarkmingyuliutw
authored andcommitted
Bugfix: The propagator fails to process images with alpha channels
1 parent e6b5981 commit bac86a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

photo_smooth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def __init__(self, beta=0.9999):
1818
self.beta = beta
1919

2020
def process(self, initImg, contentImg):
21-
content = scipy.misc.imread(contentImg)
22-
B = scipy.misc.imread(initImg).astype(np.float64)/255
21+
content = scipy.misc.imread(contentImg, mode='RGB')
22+
B = scipy.misc.imread(initImg, mode='RGB').astype(np.float64)/255
2323
h1,w1,k = B.shape
2424
h = h1 - 4
2525
w = w1 - 4

0 commit comments

Comments
 (0)