Fix Alpha + testcase images

This commit is contained in:
Mirco Miranda 2022-06-25 15:13:49 +02:00 committed by Mirco Miranda
parent e4e386babf
commit c52ffa2227
5 changed files with 3 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

View File

@ -667,9 +667,10 @@ inline void cmykToRgb(uchar *target, qint32 targetChannels, const char *source,
*(t + pt + 1) = T(std::min(max - (M * (1 - K) + K) * max + 0.5, max));
*(t + pt + 2) = T(std::min(max - (Y * (1 - K) + K) * max + 0.5, max));
if (targetChannels == 4) {
*(t + pt + 3) = std::numeric_limits<T>::max();
if (sourceChannels == 5)
*(t + pt + 3) -= *(s + ps + 4);
*(t + pt + 3) = *(s + ps + 4);
else
*(t + pt + 3) = std::numeric_limits<T>::max();
}
}
}