Fix wrong alpha conversion

and use tif for image comparison in this particular one instead of png

BUG: 468288
This commit is contained in:
Mirco Miranda
2023-04-12 20:34:33 +00:00
committed by Albert Astals Cid
parent fa673b5df8
commit 9b1fafe29b
4 changed files with 9 additions and 5 deletions

View File

@ -847,8 +847,7 @@ inline void premulConversion(char *stride, qint32 width, qint32 ac, qint32 cn, c
for (qint32 x = 0; x < width; ++x) {
auto xcn = x * cn;
auto alpha = *(s + xcn + ac);
if (alpha > 0)
*(s + xcn + c) = *(s + xcn + c) + alpha - max;
*(s + xcn + c) = *(s + xcn + c) + alpha - max;
}
} else if (conv == PremulConversion::PS2A || (conv == PremulConversion::PSLab2A && c == 0)) {
for (qint32 x = 0; x < width; ++x) {