mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-24 21:34:18 -04:00
psd: Fix alpha blending
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 commit is contained in:
committed by
Albert Astals Cid
parent
a3f7c03b61
commit
402dfb5de3
Binary file not shown.
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 114 KiB |
Reference in New Issue
Block a user