aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2023-01-02 13:43:08 +0200
committerMirta <mirta@twine-s.com>2023-01-02 13:43:08 +0200
commit55bd0fdfcb323300a8cb20a714ce4b5296205fa3 (patch)
tree5e18306397dfffaf8af66dd2bdc176a97313bc81 /Software/Visual_Studio
parentce51ab66e673106c336bf7d665c89ebe2c7c46fe (diff)
downloadTango-55bd0fdfcb323300a8cb20a714ce4b5296205fa3.tar.gz
Tango-55bd0fdfcb323300a8cb20a714ce4b5296205fa3.zip
Fixed bug in Direct Inversion and Slightly Changed Rounding
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/ColorLib/Tango.ColorLib_v6/ColorConverter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v6/ColorConverter.cpp b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v6/ColorConverter.cpp
index e645963bf..47f0fcfff 100644
--- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v6/ColorConverter.cpp
+++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v6/ColorConverter.cpp
@@ -63,7 +63,7 @@
#define LUMINANCE_PCS 159.16
#define L_A LUMINANCE_PCS / 5.0
#define Y_b 20.0
-#define eps 1e-06
+#define eps 1e-04
#define NegValue -1000
#define WPTol 1.0
#define dETol 0.5
@@ -4641,6 +4641,7 @@ void Tango::ColorLib::ColorConverter::LimitNLInks2VolumeThr(VectorXd NLInks, int
void Tango::ColorLib::ColorConverter::GetClosestInk(VectorXd Volume, int &GamutRegion, VectorXd &BestVolume, int CTUnits)
{
+ //Fix CMY only K will fall in the search for feasible solutions - January 2, 2023
//Volume is in[nl/cm]
//BestVolume is in %
VectorXd LabOut(3);
@@ -4654,7 +4655,7 @@ void Tango::ColorLib::ColorConverter::GetClosestInk(VectorXd Volume, int &GamutR
for (int i = 0; i < m_nInks; ++i)
TotalVolume += Volume(i);
DefineSplitLimits(low, high, TotalVolume);
- for (int i = 0; i < m_nInks; ++i)
+ for (int i = 0; i < m_nInks-1; ++i)
{
if (Volume(i) > 1.e-04)
diffVolume[i] = std::abs(Volume(i) - std::max(Volume(i), low));
@@ -6447,6 +6448,7 @@ void Tango::ColorLib::ColorConverter::DirectInversionCalcSIter(double Black, dou
}
for (i = 0; i < npars; ++i)
Vol[i] = VolumeTmp(i);
+ VectorToDouble(InkOut, SolVector);
freeVec <double>(InitCMY);
freeVec <double>(ValK);