psd: Fix alpha blending (KF5)
PSD files are saved with as alpha premultiplied. The problem is that alpha refers to white instead of black so it requires transformation formulas. Then, to conver PS premultiplied to QImage premultiplied you have to use the following formula:
- V = Alpha + Vps - Max (C, M, Y, K, R, G, B, Gray, L* components)
- V = Vps + (Alpha - Max + 1) / 2 (a*, b* components)
Where Max is the maximum value depending on the image depth and Vps is the valued read from the file.
This is a port of MR !143 (merged) to KF5.
Edited by Mirco Miranda