I have been having trouble trying to save a png image with sRGB and an alpha channel. I first crop an image and then save it like this:
from PIL import Image
import cv2
inputPath = 'picture.png'
img = cv2.imread(inputPath)
crop_img = img[bounds[3]:bounds[2], bounds[1]:bounds[0]]
pth = name + ".png"
crop_img.save(pth)
This however creates a file like this:
I want the file to be like this though:
How can I get this result in python?
P.S. The original image does have an alpha channel and sRGB colour profile.
Any help is greatly appreciated!