mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-20 04:24:19 -04:00
Fix wrong alpha conversion
and use tif for image comparison in this particular one instead of png BUG: 468288
This commit is contained in:
committed by
Albert Astals Cid
parent
fa673b5df8
commit
9b1fafe29b
@ -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) {
|
||||
|
Reference in New Issue
Block a user