Этого должно быть достаточно:
Фон сайта белый, поэтому "щелкните правой кнопкой мыши" Выход и "откройте изображение в новой вкладке", и вывидим, что он прозрачный :)
import cv2
import numpy as np
# read the image
image_bgr = cv2.imread('image_bgr.png')
# get the image dimensions (height, width and channels)
h, w, c = image_bgr.shape
# append Alpha channel -- required for BGRA (Blue, Green, Red, Alpha)
image_bgra = np.concatenate([image_bgr, np.full((h, w, 1), 255, dtype=np.uint8)], axis=-1)
# create a mask where white pixels ([255, 255, 255]) are True
white = np.all(image_bgr == [255, 255, 255], axis=-1)
# change the values of Alpha to 0 for all the white pixels
image_bgra[white, -1] = 0
# save the image
cv2.imwrite('image_bgra.png', image_bgra)
![Input](https://i.stack.imgur.com/qdJmv.png)
- Вывод («щелчок правой кнопкой мыши» >> «открыть в новой вкладке»):
![Output](https://i.stack.imgur.com/PHcvj.png)