I have a png as a base64 that contains some transparent pixels. I read the image through:
vector<uchar> vectordata(string.begin(), strong.end());
mat = imdecode(vectordata, IMREAD_UNCHANGED);
Then I change the pixels, by going one by one in the mat array and converting rgb values of the transparent pixels and fixing their transparency back to 255. Is there a faster way to do that? Like composting with a white image ?