From a03b4506db1ebaf82b08a761c79b036134ea8ced Mon Sep 17 00:00:00 2001 From: Alexander Court Date: Fri, 1 May 2020 18:40:29 +0200 Subject: [PATCH] Don't pass alpha channel of image. Alpha channel may contained if no face was detected in original file and was copied with alpha channel. --- merger/InteractiveMergerSubprocessor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/merger/InteractiveMergerSubprocessor.py b/merger/InteractiveMergerSubprocessor.py index bbec108..b813452 100644 --- a/merger/InteractiveMergerSubprocessor.py +++ b/merger/InteractiveMergerSubprocessor.py @@ -387,7 +387,8 @@ class InteractiveMergerSubprocessor(Subprocessor): if cur_frame.is_done: if not cur_frame.is_shown: if cur_frame.image is None: - image = cv2_imread (cur_frame.output_filepath, verbose=False) + # delete alpha channel + image = cv2_imread (cur_frame.output_filepath, verbose=False)[:,:,0:3] image_mask = cv2_imread (cur_frame.output_mask_filepath, verbose=False) if image is None or image_mask is None: # unable to read? recompute then