From aeb4073a1e3eb367cc732f37c43800d107ef84fc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 22 Apr 2018 14:29:39 +0200 Subject: push --- test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index ddea76a..9ffdf22 100644 --- a/test.py +++ b/test.py @@ -64,12 +64,12 @@ if __name__ == '__main__': tmp_im = im.copy() array_a = np.multiply(im, 1/frac) array_b = np.multiply(last_im, (frac-1)/frac) - im = np.add(array_a, array_b) + im = np.add(array_a, array_b).clip(0, 255) last_im = tmp_im else: last_im = im.copy() print(im.shape) - image_pil = Image.fromarray(im) + image_pil = Image.fromarray(im, mode='RGB') image_pil.save(save_path) os.rename(save_path, final_path) webpage.save() -- cgit v1.2.3-70-g09d2