From ae2be271732dd0cd0daab7d9c7b44a67bb36cc82 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Thu, 27 Jun 2024 15:04:38 +0800 Subject: [PATCH] =?UTF-8?q?feat=20oss=E6=9B=BF=E6=8D=A2=E4=B8=BAS3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix --- app/service/design/items/pipelines/painting.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/service/design/items/pipelines/painting.py b/app/service/design/items/pipelines/painting.py index 1bbcb51..a738455 100644 --- a/app/service/design/items/pipelines/painting.py +++ b/app/service/design/items/pipelines/painting.py @@ -58,6 +58,8 @@ class Painting(object): # 使用OpenCV解码图像数组 # image = cv2.imdecode(image_array, cv2.IMREAD_COLOR) image = oss_get_image(bucket=bucket_name, object_name=object_name, data_type="cv2") + if image.shape[2] == 4: + image = cv2.cvtColor(image, cv2.COLOR_BGRA2BGR) return image @staticmethod