Commit 8aef9fe6 authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Fix clamping again.

The previous code made not much sense...
parent 87376428
......@@ -157,9 +157,9 @@ struct KoColorSpaceTrait {
Q_ASSERT((int)values.count() == (int)channels_nb);
channels_type c;
for (uint i = 0; i < channels_nb; i++) {
float b = qBound((float)KoColorSpaceMathsTraits<channels_type>::min * values[i],
float b = qBound((float)KoColorSpaceMathsTraits<channels_type>::min,
(float)KoColorSpaceMathsTraits<channels_type>::unitValue * values[i],
(float)KoColorSpaceMathsTraits<channels_type>::max * values[i]);
(float)KoColorSpaceMathsTraits<channels_type>::max);
c = (channels_type)b;
nativeArray(pixel)[i] = c;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment