PSD: fix test failure on some systems and fix wrong check on alpha conversion

- Fix PSD alpha conversion
- Fix autoread test to use also TIFF images
This commit is contained in:
Mirco Miranda
2023-04-18 22:14:41 +00:00
committed by Albert Astals Cid
parent e1a3751936
commit 41f0411b62
4 changed files with 9 additions and 5 deletions

View File

@ -865,8 +865,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)) {