Fix issue reported by coverity
This commit is contained in:
@@ -1199,29 +1199,21 @@ void ICCProfileCreator::savePressed()
|
|||||||
|
|
||||||
cmsToneCurve* GammaTRC[3];
|
cmsToneCurve* GammaTRC[3];
|
||||||
|
|
||||||
if (gammaPreset != "standard_g2.2" || gammaPreset != "standard_g1.8" || gammaPreset != "linear_g1.0") {
|
|
||||||
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, ga);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gammaPreset == "standard_g2.2") {
|
if (gammaPreset == "standard_g2.2") {
|
||||||
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 2.19921875);//spec Adobe
|
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 2.19921875);//spec Adobe
|
||||||
}
|
} else if (gammaPreset == "standard_g1.8") {
|
||||||
|
|
||||||
if (gammaPreset == "standard_g1.8") {
|
|
||||||
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 1.80078125);
|
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 1.80078125);
|
||||||
}
|
} else if (gammaPreset == "linear_g1.0") {
|
||||||
|
|
||||||
if (gammaPreset == "linear_g1.0") {
|
|
||||||
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 1.0);
|
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 1.0);
|
||||||
|
} else {
|
||||||
|
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, ga);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (profileVersion == "v4") {
|
if (profileVersion == "v4") {
|
||||||
newProfile = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC);
|
newProfile = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC);
|
||||||
}
|
} else if (profileVersion == "v2") {
|
||||||
|
|
||||||
if (profileVersion == "v2") {
|
|
||||||
if (v2except) {
|
if (v2except) {
|
||||||
cmsSetProfileVersion(profile_v2_except, 2.2);
|
cmsSetProfileVersion(profile_v2_except, 2.2);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user