Numpy create an empty alpha image
问题 I wanted to create a blank alpha image to parse some data from py-opencv and save it on an transparent background png file. I tried : blank_image = np.zeros((H,W,4), np.uint8) and blank_image = np.full((H, W, 4) , (0, 0, 0, 0), np.uint8) (H and W are Height and Width) Both still render a black background instead of a transparent one. how to get a blank alpha transparent image? Thanks in advance :) Edits: as mentioned by Mark Setchell: you need to specify the alpha channel on other colors