From a2edcbd67db23f810b35a70214b08a9d395b877e Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 26 Nov 2017 22:02:58 +0100 Subject: [PATCH 1/3] made the "before" view use the current monitor profile Fixes #3090 --- rtgui/editorpanel.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index c2bec8692..cf5dcba89 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -2186,6 +2186,11 @@ void EditorPanel::beforeAfterToggled () beforeIpc = rtengine::StagedImageProcessor::create (beforeImg); beforeIpc->setPreviewScale (10); beforeIpc->setPreviewImageListener (beforePreviewHandler); + Glib::ustring monitorProfile; + rtengine::RenderingIntent intent; + ipc->getMonitorProfile(monitorProfile, intent); + beforeIpc->setMonitorProfile(monitorProfile, intent); + beforeIarea->imageArea->setPreviewHandler (beforePreviewHandler); beforeIarea->imageArea->setImProcCoordinator (beforeIpc); From edbe4f3f14ee4dcd21091e9800fdbcb96e38b271 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 27 Nov 2017 19:48:16 +0100 Subject: [PATCH 2/3] Added template icon showing RT sRGB and ProPhoto CIE XY gamuts --- .../scalable/gamut_srgb_prophoto_xy.svg | 656 ++++++++++++++++++ 1 file changed, 656 insertions(+) create mode 100644 tools/source_icons/scalable/gamut_srgb_prophoto_xy.svg diff --git a/tools/source_icons/scalable/gamut_srgb_prophoto_xy.svg b/tools/source_icons/scalable/gamut_srgb_prophoto_xy.svg new file mode 100644 index 000000000..21058878e --- /dev/null +++ b/tools/source_icons/scalable/gamut_srgb_prophoto_xy.svg @@ -0,0 +1,656 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + Morgan Hardwood + + + RawTherapee www.rawtherapee.com + + + + + + + + + + + + + + + + + + + From 8e43df5abb6eda05ff570791a9111a8e49b0deb4 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 28 Nov 2017 08:57:45 +0100 Subject: [PATCH 3/3] Fattal: fixed off-by-one error in rescaling the luminance Fixes #4200 --- rtengine/tmo_fattal02.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rtengine/tmo_fattal02.cc b/rtengine/tmo_fattal02.cc index 1b301123a..4af176cd2 100644 --- a/rtengine/tmo_fattal02.cc +++ b/rtengine/tmo_fattal02.cc @@ -1253,15 +1253,18 @@ void ImProcFunctions::ToneMapFattal02 (Imagefloat *rgb) rescale_nearest (Yr, L, multiThread); tmo_fattal02 (w2, h2, L, L, alpha, beta, noise, detail_level, multiThread); + const float hr = float(h2) / float(h); + const float wr = float(w2) / float(w); + #ifdef _OPENMP #pragma omp parallel for if(multiThread) #endif - for (int y = 0; y < h; y++) { - int yy = y * h2 / h; - + int yy = y * hr + 1; + for (int x = 0; x < w; x++) { - int xx = x * w2 / w; + int xx = x * wr + 1; + float Y = Yr (x, y); float l = std::max (L (xx, yy), epsilon) * (65535.f / Y); rgb->r (y, x) = std::max (rgb->r (y, x), 0.f) * l;