mirror of
https://github.com/zebrajr/faceswap.git
synced 2025-12-06 00:20:09 +01:00
bugfix: Always load images as 3 channel color
This commit is contained in:
parent
4588adbd16
commit
8388241db9
|
|
@ -297,7 +297,7 @@ def read_image(filename, raise_error=False, with_metadata=False):
|
|||
try:
|
||||
with open(filename, "rb") as infile:
|
||||
raw_file = infile.read()
|
||||
image = cv2.imdecode(np.frombuffer(raw_file, dtype="uint8"), cv2.IMREAD_UNCHANGED)
|
||||
image = cv2.imdecode(np.frombuffer(raw_file, dtype="uint8"), cv2.IMREAD_COLOR)
|
||||
if image is None:
|
||||
raise ValueError("Image is None")
|
||||
if with_metadata:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user