python图片旋转去黑边 简单的图片旋转但是出现黑边 import cv2 #opencv-python库 import random import numpy as np for i in range(1, 10): img = cv2.imread('D:/xxx/'+str(i)+'.png') imginfo = img.shape height = imginfo[0] width = imginfo[1] a = random.randint(1, 3) * 90 #随机旋转90 180 270度 mat