From e5b9ff69a6771a03f97bb0a3b060925f2cba9da1 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Wed, 28 Aug 2024 15:15:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87=E6=97=8B?= =?UTF-8?q?=E8=BD=AC=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/image_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/image_util.py b/util/image_util.py index 0b30cc0..ec80cdf 100644 --- a/util/image_util.py +++ b/util/image_util.py @@ -111,7 +111,7 @@ def rotate(image, angle): :param angle: 逆时针旋转角度 :return: 旋转后的图片NumPy数组 """ - if angle == 0: + if angle == 0 or image is None or image.size == 0: return image height, width = image.shape[:2] if angle == 180: