Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix commented out code in KoDummyColorProfile.cpp.

Wolthera van Hövell tot Westerflier63bb1ef2b744
diff --git a/libs/pigment/colorprofiles/KoDummyColorProfile.cpp b/libs/pigment/colorprofiles/KoDummyColorProfile.cpp
index ed80fbf7f9..6277c750aa 100644
--- a/libs/pigment/colorprofiles/KoDummyColorProfile.cpp
+++ b/libs/pigment/colorprofiles/KoDummyColorProfile.cpp
@@ -91,20 +91,12 @@ QVector<KoColorimetryUtils::XYZ> KoDummyColorProfile::getColorantsXYZ() const
QVector<KoColorimetryUtils::xyY> KoDummyColorProfile::getColorantsxyY() const
{
QVector<KoColorimetryUtils::xyY> result;
- /*
- auto srgb = getColorantsXYZ();
- result[0] = srgb[0] / (srgb[0] + srgb[1] + srgb[2]);
- result[1] = srgb[1] / (srgb[0] + srgb[1] + srgb[2]);
- result[2] = srgb[1];
-
- result[3] = srgb[3] / (srgb[3] + srgb[4] + srgb[5]);
- result[4] = srgb[4] / (srgb[3] + srgb[4] + srgb[5]);
- result[5] = srgb[4];
-
- result[6] = srgb[6] / (srgb[6] + srgb[7] + srgb[8]);
- result[7] = srgb[7] / (srgb[6] + srgb[7] + srgb[8]);
- result[8] = srgb[7];
-*/
+
+ QVector<KoColorimetryUtils::XYZ> srgb = getColorantsXYZ();
+
+ Q_FOREACH (KoColorimetryUtils::XYZ c, srgb) {
+ result.append(c.toxyY());
+ }
return result;
}