I am merging two images and it works fine without transparency but now im adding in transparency and dont know what to do.
I get a unsigned char for each r,g,b,a of the source and the dest so I have
r,g,b,a and destr, destg, destb, desta
then I would do some math
then I have a function dest->SetPixel(x, y, r, g, b, a);
I dont know the math to merge the two and having a hard time finding actual source thats not a library to look at can someone point me in the right direction please?