我想使用Alpha通道调整图像大小。但是,在调整大小函数后,alpha通道消失了。
import cv2
original_img = cv2.imread('someimg.png', -1) #image size is 100 x 100
print(original_img.shape) # output: (100, 100, 4)
resized_img = cv2.resize(original_img, (50, 50), interpolation=cv2.INTER_CUBIC)
print(resized_img.shape) # output: (50, 50, 3) alpha channel is gone!
我该如何解决这个问题?