I'm trying to set certain pixels to be transparent on an image with the python3 cv2 library. How do I open an image so that it can support transparency?
I looked into this and I can't find good documentation on using transparent pixels.
The current way I'm opening images is the following:
img = cv2.resize(cv2.imread("car.jpeg", cv2.COLOR_B), (0, 0), fx=0.2, fy=0.2)
and I'm setting colors like this:
img.itemset((r, c, 1), val)
How do I edit the alpha channels?