https://bugs.kde.org/show_bug.cgi?id=400493
Bug ID: 400493
Summary: Filter 'Desaturate' calculates average wrong
Product: krita
Version: unspecified
Platform: Other
OS: MS Windows
Status: REPORTED
Severity: normal
Priority: NOR
Component: Filters
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
'Average' mode on Desaturate Filter calculated average wrong.
In the code it says:
case 3: // average
{
gray = (r + g + b) / 2;
break;
}
As you can see it divides by 2. Not by 3.
This results in a lot brighter result.
STEPS TO REPRODUCE
1. Use Desaturate Filter, set to Average
2. Observe the 'blooming' of values way above what the average really is for
the 3 channels.
EXPECTED RESULT
It should calculate the average value of Red, Green and Blue channel by adding
them together and dividing by 3.
SOFTWARE VERSIONS
Krita
Version: 4.1.1
OS Information
Build ABI: x86_64-little_endian-llp64
Build CPU: x86_64
CPU: x86_64
Kernel Type: winnt
Kernel Version: 10.0.17134
Pretty Productname: Windows 10 (10.0)
Product Type: windows
Product Version: 10
OpenGL Info
**OpenGL not initialized**
--
You are receiving this mail because:
You are watching all bug changes.