diff --git a/rtdata/images/themed/png/dark/color-picker-small.png b/rtdata/images/themed/png/dark/color-picker-small.png
new file mode 100644
index 000000000..5976b6e11
Binary files /dev/null and b/rtdata/images/themed/png/dark/color-picker-small.png differ
diff --git a/rtdata/images/themed/png/light/color-picker-small.png b/rtdata/images/themed/png/light/color-picker-small.png
new file mode 100644
index 000000000..109f8fda4
Binary files /dev/null and b/rtdata/images/themed/png/light/color-picker-small.png differ
diff --git a/rtdata/images/themed/svg/color-picker-small.svg b/rtdata/images/themed/svg/color-picker-small.svg
new file mode 100644
index 000000000..d83400653
--- /dev/null
+++ b/rtdata/images/themed/svg/color-picker-small.svg
@@ -0,0 +1,133 @@
+
+
+
+
diff --git a/rtengine/ipdehaze.cc b/rtengine/ipdehaze.cc
index 5522107e0..97c1883c9 100644
--- a/rtengine/ipdehaze.cc
+++ b/rtengine/ipdehaze.cc
@@ -183,6 +183,7 @@ float estimate_ambient_light(const array2D &R, const array2D &G, c
}
}
}
+ n = std::max(n, 1);
ambient[0] = rr / n;
ambient[1] = gg / n;
ambient[2] = bb / n;
diff --git a/rtgui/iccprofilecreator.cc b/rtgui/iccprofilecreator.cc
index 15823f9d4..7ec89e190 100644
--- a/rtgui/iccprofilecreator.cc
+++ b/rtgui/iccprofilecreator.cc
@@ -1025,11 +1025,10 @@ void ICCProfileCreator::savePressed()
if (illuminant == "D50") {
xyD = {0.3457, 0.3585, 1.0};//white D50 near LCMS values but not perfect...it's a compromise!!
}
-
+
if (illuminant == "stdA") {
xyD = {0.447573, 0.407440, 1.0};
}
-
} else {
if (v2except) {
@@ -1199,29 +1198,21 @@ void ICCProfileCreator::savePressed()
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") {
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 2.19921875);//spec Adobe
- }
-
- if (gammaPreset == "standard_g1.8") {
+ } else if (gammaPreset == "standard_g1.8") {
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 1.80078125);
- }
-
- if (gammaPreset == "linear_g1.0") {
+ } else if (gammaPreset == "linear_g1.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") {
newProfile = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC);
- }
-
- if (profileVersion == "v2") {
+ } else if (profileVersion == "v2") {
if (v2except) {
cmsSetProfileVersion(profile_v2_except, 2.2);
} else {
diff --git a/rtgui/labgrid.h b/rtgui/labgrid.h
index 35e259996..30f6e76e5 100644
--- a/rtgui/labgrid.h
+++ b/rtgui/labgrid.h
@@ -66,7 +66,6 @@ private:
sigc::connection delayconn;
static const int inset = 2;
- bool grid_visible;
bool low_enabled;
bool notifyListener();