From 7f09a19446d7b8a463b330fb5a3899ba50e090ad Mon Sep 17 00:00:00 2001 From: jdc Date: Wed, 10 Sep 2014 10:54:55 +0200 Subject: [PATCH] Color Toning fixed some bug -auto saturation - Labels - issue2454 issue2014 --- rtdata/languages/Francais | 170 ++++++++++++------------- rtdata/languages/default | 76 +++++------- rtengine/dcrop.cc | 16 ++- rtengine/improccoordinator.cc | 126 ++++++++++--------- rtengine/improcfun.cc | 14 +-- rtengine/improcfun.h | 4 +- rtengine/procevents.h | 4 +- rtengine/procparams.cc | 18 +-- rtengine/procparams.h | 4 +- rtengine/refreshmap.cc | 4 +- rtengine/rtthumbnail.cc | 19 ++- rtengine/simpleprocess.cc | 19 ++- rtgui/addsetids.h | 4 +- rtgui/batchtoolpanelcoord.cc | 5 +- rtgui/colortoning.cc | 227 ++++++++++++++++------------------ rtgui/colortoning.h | 14 +-- rtgui/icmpanel.cc | 1 - rtgui/paramsedited.cc | 20 +-- rtgui/paramsedited.h | 12 +- rtgui/preferences.cc | 2 +- 20 files changed, 395 insertions(+), 364 deletions(-) diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index f3a0dc0d5..ab7ff98e5 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -472,32 +472,39 @@ HISTORY_MSG_251;N&B - Algorithme HISTORY_MSG_252;CpND - Tons chair HISTORY_MSG_253;CpND - Réduction des artéfactes HISTORY_MSG_254;CpND - Teinte chair -HISTORY_MSG_255;Virage Partiel -HISTORY_MSG_256;Virage Partiel - Couleur -HISTORY_MSG_257;Virage Partiel - Opacité -HISTORY_MSG_258;Virage Partiel - Opacité ab -HISTORY_MSG_259;Virage Partiel - Méthode -HISTORY_MSG_260;Virage Partiel - 2 couleurs -HISTORY_MSG_261;Virage Partiel - Luminance -HISTORY_MSG_262;Virage Partiel - Ombres - Rouge -HISTORY_MSG_263;Virage Partiel - Ombres - Vert -HISTORY_MSG_264;Virage Partiel - Ombres - Bleu -HISTORY_MSG_265;Virage Partiel - Moyen - Rouge -HISTORY_MSG_266;Virage Partiel - Moyen - Vert -HISTORY_MSG_267;Virage Partiel - Moyen - Bleu -HISTORY_MSG_268;Virage Partiel - HL - Rouge -HISTORY_MSG_269;Virage Partiel - HL - Vert -HISTORY_MSG_270;Virage Partiel - HL - Bleu -HISTORY_MSG_271;Virage Partiel - Balance -HISTORY_MSG_272;Virage Partiel - Réinit. -HISTORY_MSG_273;Virage Partiel - Saturation Shadows -HISTORY_MSG_274;Virage Partiel - Saturation Highlights -HISTORY_MSG_275;Virage Partiel - Réinit. Courbes -HISTORY_MSG_276;Virage Partiel - Préserver Luminance -HISTORY_MSG_277;Virage partiel - Ombres -HISTORY_MSG_278;Virage partiel - Hautes Lumières -HISTORY_MSG_279;Virage partiel - Protect. Saturé -HISTORY_MSG_280;Virage partiel - Seuil de Protection +HISTORY_MSG_255;Réd. de bruit - Filtre Médian +HISTORY_MSG_256;Réd. de bruit - Type de Médiane +HISTORY_MSG_257;Virage Partiel +HISTORY_MSG_258;Virage Partiel - Couleur +HISTORY_MSG_259;Virage Partiel - Opacité +HISTORY_MSG_260;Virage Partiel - Opacité 'a[b]' +HISTORY_MSG_261;Virage Partiel - Méthode +HISTORY_MSG_262;Virage Partiel - Opacité 'b' +HISTORY_MSG_263;Virage Partiel - Ombres - Rouge +HISTORY_MSG_264;Virage Partiel - Ombres - Vert +HISTORY_MSG_265;Virage Partiel - Ombres - Bleu +HISTORY_MSG_266;Virage Partiel - Moyen - Rouge +HISTORY_MSG_267;Virage Partiel - Moyen - Vert +HISTORY_MSG_268;Virage Partiel - Moyen - Bleu +HISTORY_MSG_269;Virage Partiel - HL - Rouge +HISTORY_MSG_270;Virage Partiel - HL - Vert +HISTORY_MSG_271;Virage Partiel - HL - Bleu +HISTORY_MSG_272;Virage Partiel - Balance +HISTORY_MSG_273;Virage Partiel - Réinit. +HISTORY_MSG_274;Virage Partiel - Saturation Shadows +HISTORY_MSG_275;Virage Partiel - Saturation Highlights +HISTORY_MSG_276;Virage Partiel - Opacité +HISTORY_MSG_277;--inutilisé-- +HISTORY_MSG_278;Virage Partiel - Préserver Luminance +HISTORY_MSG_279;Virage partiel - Ombres +HISTORY_MSG_280;Virage partiel - Hautes Lumières +HISTORY_MSG_281;Virage partiel - Protect. Saturé +HISTORY_MSG_282;Virage partiel - Seuil de Protection +HISTORY_MSG_283;Virage partiel - Force +HISTORY_MSG_284;Virage partiel - Protect. Saturé Auto +HISTORY_MSG_285;Réd. de bruit - Médiane - Méthode +HISTORY_MSG_286;Réd. de bruit - Médiane - Type +HISTORY_MSG_287;Réd. de bruit - Médiane - Itérations HISTORY_MSG_288;Champ Uniforme - Ctrl de l'Écrêtage HISTORY_MSG_289;Champ Uniforme - Ctrl Auto de l'Écrêtage HISTORY_MSG_290;Niveau de noir - Rouge @@ -1074,21 +1081,18 @@ TP_COLORAPP_TONECIE;Compression Tonale utilisant CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;Si cette option est désactivée, la compression tonale est faite dans l'espace Lab.\nSi cette options est activée, la compression tonale est faite en utilisant CIECAM02.\nL'outil Compression Tonale doit être activé pour que ce réglage prenne effet TP_COLORAPP_WBCAM;BB [RT+CAT02] + [sortie] TP_COLORAPP_WBRT;BB [RT] + [sortie] -TP_COLORTONING_AB;ab L +TP_COLORTONING_AB;o C/L TP_COLORTONING_BALANCE;Balance TP_COLORTONING_BALANCE_TOOLTIP;Équilibre entre la couleur des ombres et celle des hautes lumières -TP_COLORTONING_BY;b L -TP_COLORTONING_CHROMA2;Opacité 'b' -TP_COLORTONING_CHROMA;Opacité 'ab' ou 'a' +TP_COLORTONING_BY;o C/L +TP_COLORTONING_CHROMAC;Opacité TP_COLORTONING_COLOR;Couleur -TP_COLORTONING_CURVEEDITOR_LL;L TP_COLORTONING_HIGHLIGHT;Hautes lumières -TP_COLORTONING_HUE;Mixage de la teinte TP_COLORTONING_HUE;Teinte -TP_COLORTONING_LABCOL;Couleurs direct -TP_COLORTONING_LABCOL_TOOLTIP;Lorsque vous déplacez un curseur de saturation, ces couleurs 'direct' sont augmentés +TP_COLORTONING_LABCOL;Couleurs directes +TP_COLORTONING_LABCOL_TOOLTIP;Lorsque vous déplacez un curseur de saturation, ces couleurs 'direct' sont augmentées. TP_COLORTONING_LABEL;Virage Partiel -TP_COLORTONING_LABINT;Couleurs interpolés - Mixage +TP_COLORTONING_LABINT;- TP_COLORTONING_LABINT_TOOLTIP;Lorsque l'image est bleue et que la mixage de la couleur interpolé est rouge, cela résulte en un magenta en fonction du pourcentage d'opacité\nLorsque l'image est rouge et que la mixage de la couleur interpolé est jaune, cela résulte en un orange en fonction du pourcentage d'opacité\nEtc... TP_COLORTONING_LAB;Mixage Lab TP_COLORTONING_LCH;Mixage Lch @@ -1098,29 +1102,30 @@ TP_COLORTONING_LUMAMODE;Préserver la luminance TP_COLORTONING_LUMAMODE_TOOLTIP;Si activé, lorsque vous changez la couleur (rouge, vert, cyan, bleu, etc.), la luminance de chaque pixel est préservé TP_COLORTONING_LUMA;Luminance TP_COLORTONING_METHOD;Méthode -TP_COLORTONING_METHOD_TOOLTIP;Lab blending use interpolation colour blending\nSplit Toning Colour SMH (Shadows Midtones Highlights)\nSplit Toning Colour SH+balance (Shadows Highlights + balance shadows/highlights) use direct colors\nIn all methods you can enabled Black and White +TP_COLORTONING_METHOD_TOOLTIP;Mixage Lab - RVB courbes - RVB curseurs utilise une interpolation\nBalance couleur(ombres / tons moyens / hautes lumières)\nSaturation 2 couleurs utilise couleurs directes\nDans tous les méthodes vous pouvez activer Noir et Blanc TP_COLORTONING_MIDTONES;Tons Moyens TP_COLORTONING_NEUTRALCUR;Réinit. courbes -TP_COLORTONING_NEUTRALCUR_TIP;Réinitialise toutes les courbes à leurs valeur par défaut. -TP_COLORTONING_NEUTRAL;Réinit. curseurs TP_COLORTONING_NEUTRAL_TIP;Réinitialise toutes les valeurs (Ombres, Tons moyens, Hautes lumières) à leur valeur par défaut. TP_COLORTONING_OPACITY;Opacité TP_COLORTONING_RGBCURVES;RVB - Courbes TP_COLORTONING_RGBSLIDERS;RVB - Curseurs -TP_COLORTONING_SATH;Saturation des Hautes lumière -TP_COLORTONING_SATL;Saturation des Ombres -TP_COLORTONING_SATURATEDOPACITY;Protection des couleurs saturées -TP_COLORTONING_SATURATIONTHRESHOLD;Seuil des couleurs saturés +TP_COLORTONING_SATH;Saturation des hautes lumière +TP_COLORTONING_SATL;Saturation des ombres +TP_COLORTONING_SA;Saturation protection +TP_COLORTONING_SATURATEDOPACITY;Force +TP_COLORTONING_SATURATIONTHRESHOLD;Seuil TP_COLORTONING_SHADOWS;Ombres -TP_COLORTONING_SPLITBAL;Virage couleur O-HL + balance -TP_COLORTONING_SPLITCO;Virage couleur O-TM-HL -TP_COLORTONING_SPLITLR;Virage couleur - Saturation 2 couleurs +TP_COLORTONING_SPLITBAL;Ombres / Tons moyens / Hautes lumières + balance +TP_COLORTONING_SPLITCOCO;Balance Couleur Ombres / Tons moyens / Hautes lumières +TP_COLORTONING_SPLITCO;Ombres / Tons moyens / Hautes lumières +TP_COLORTONING_SPLITLR;Saturation 2 couleurs TP_COLORTONING_STRENGTH;Force -TP_COLORTONING_TWO2;Opacité spécial 'ab' 2 couleurs -TP_COLORTONING_TWOALL;Opacité spécial 'ab' -TP_COLORTONING_TWOBY;Opacité spécial 'a' and 'b' -TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard: réponse linéaire identique pour 'a' et 'b'\nSpécial 'ab': même réponse pour 'a' and 'b', mais sans limites - essayez en dessous de la diagonale\nSpécial 'a' et 'b': comme Spécial + courbes 'a' et 'b' séparé: dédié aux effets spéciaux\nSpécial 2 couleurs - plus prévisible -TP_COLORTONING_TWOSTD;Opacité standard 'ab' +TP_COLORTONING_TWOSTD;Chroma standard +TP_COLORTONING_TWOALL;Chroma spécial +TP_COLORTONING_TWOBY;Chroma spécial 'a' and 'b' +TP_COLORTONING_TWO2;Chroma spécial '2 couleurs' +TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard: réponse linéaire identique pour 'a' et 'b'\nSpécial 'ab': même réponse pour 'a' et 'b', mais sans limites - essayez en dessous de la diagonale\nSpécial 'a' et 'b': comme Spécial mais avec des courbes séparées pour 'a' et 'b': dédié aux effets spéciaux\nSpécial 2 couleurs - plus prévisible +TP_COLORTONING_STR;Force TP_CROP_FIXRATIO;Ratio fixe: TP_CROP_GTDIAGONALS;Règle des diagonales TP_CROP_GTEPASSPORT;Passeport biométrique @@ -1145,6 +1150,11 @@ TP_DARKFRAME_LABEL;Trame Noire TP_DEFRINGE_LABEL;Aberration chromatique TP_DEFRINGE_RADIUS;Rayon TP_DEFRINGE_THRESHOLD;Seuil +TP_DIRPYRDENOISE_33;3×3 fort +TP_DIRPYRDENOISE_33SOFT;3×3 +TP_DIRPYRDENOISE_55;5×5 fort +TP_DIRPYRDENOISE_55SOFT;5×5 +TP_DIRPYRDENOISE_77;7×7 (lent) TP_DIRPYRDENOISE_BLUE;Chrominance - Bleu-Jaune TP_DIRPYRDENOISE_CHROMA;Chrominance - Maître TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Peut être utilisé sur les images raw et non-raw.\n\nPour les images non-raw, la réduction de bruit de luminance dépend du gamma du profil couleur d'entée. Un gamma sRGB est supposé, c'est pourquoi si l'image a un profil couleur d'un gamma différent, la réduction de bruit de luminance variera. @@ -1155,19 +1165,40 @@ TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Gamma fait varier la quantité de réduction de b TP_DIRPYRDENOISE_LABEL;Réduction du bruit TP_DIRPYRDENOISE_LAB;Lab TP_DIRPYRDENOISE_LDETAIL;Niveau de détails de Luminance +TP_DIRPYRDENOISE_LM;Luminance seulement TP_DIRPYRDENOISE_LUMA;Luminance +TP_DIRPYRDENOISE_MEDMETHOD;Méthode +TP_DIRPYRDENOISE_MEDTYPE;Type de médiane +TP_DIRPYRDENOISE_MED;Filtre Médian +TP_DIRPYRDENOISE_MED_TOOLTIP;Active le débruitage médian TP_DIRPYRDENOISE_METHOD;Méthode TP_DIRPYRDENOISE_METHOD_TOOLTIP;Pour les images raw, les méthodes RVB ou Lab peuvent être utilisées.\n\nPour les images non-raw la méthode Lab sera utilisée, indépendamment de ce qu'indique ce bouton. +TP_DIRPYRDENOISE_METM_TOOLTIP;Lorsque vous utilisez les méthodes "Luminance seulement" et "Lab", un filtrage médian sera effectué juste après l'étape des ondelettes dans le pipeline de la réduction de bruit.\nEm mode "RVB", il sera effectué à la toute fin du pipeline de la réduction de bruit. +TP_DIRPYRDENOISE_MET_TOOLTIP;Applique un filtre médian de la taille souhaité. Plus il est large, plus cela prendra de temps.\n\n3x3 soft: treats 5 pixels in a 1-pixel range.\n3x3: treats 9 pixels in a 1-pixel range.\n5x5 soft: treats 13 pixels in a 2-pixel range.\n5x5: treats 25 pixels in a 2-pixel range.\n7x7: treats 49 pixels in a 3-pixel range.\n\nSometimes it is possible to achieve higher quality running several iterations with a small range than one iteration with a large range. +TP_DIRPYRDENOISE_MET_TOOLTIP;Type de filtrage médian:\n3x3, 3x3 fort et 5x5 (RVB) ou 3x3, 3x3 fort, 5x5, 5x5 fort ou 7x7 (L seulement + Lab)\n\nSupprime encore plus de bruit. +TP_DIRPYRDENOISE_NONE;Aucun +TP_DIRPYRDENOISE_PASSES_TOOLTIP;Appliquer 3 itération du filtre médian 3x3 donne de meilleurs résultats qu'appliquer une seule fois le filtre 7x7. +TP_DIRPYRDENOISE_PASSE;Itérations TP_DIRPYRDENOISE_PERF;Mode RVB (images raw) TP_DIRPYRDENOISE_RED;Chrominance - Rouge-Vert TP_DIRPYRDENOISE_RGB;RVB +TP_DIRPYREQUALIZER_ALGO;Domaine des tons chairs +TP_DIRPYREQUALIZER_ALGO_FI;Fin +TP_DIRPYREQUALIZER_ALGO_LA;Large +TP_DIRPYREQUALIZER_ALGO_TOOLTIP;Fin: plus proche des tons chairs, minimisant l'actions sur les autres couleurs\nLarge: évite plus d'artéfacts +TP_DIRPYREQUALIZER_GAMUT;Réduire les artéfacts +TP_DIRPYREQUALIZER_HUESKIN;Skin hue +TP_DIRPYREQUALIZER_HUESKIN_TOOLTIP;This pyramid is for the upper part, so far as the algorithm at its maximum efficiency.\nTo the lower part, the transition zones.\nIf you need to move the area significantly to the left or right - or if there are artifacts: the white balance is incorrect\nYou can slightly reduce the zone to prevent the rest of the image is affected. TP_DIRPYREQUALIZER_LABEL;Contraste par niveaux de détail TP_DIRPYREQUALIZER_LUMACOARSEST;les plus gros TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS;Contraste- TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS;Contraste+ TP_DIRPYREQUALIZER_LUMAFINEST;les plus petits TP_DIRPYREQUALIZER_LUMANEUTRAL;Neutre +TP_DIRPYREQUALIZER_SKIN;Protection/Ciblage des Tons Chairs +TP_DIRPYREQUALIZER_SKIN_TOOLTIP;A -100, les tons chairs sont ciblés.\nA 0 tous les tons sont traités de maière équivalentes.\nA +100, les tons chairs sont protégés et tous les autres tons sont traités. TP_DIRPYREQUALIZER_THRESHOLD;Seuil +TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts due to the transitions between the color (hue, chroma, luma) of the skin and the rest of the image. TP_DISTORTION_AMOUNT;Quantité TP_DISTORTION_AUTO;Correction auto de la distorsion TP_DISTORTION_AUTO_TIP;(Experimental) Corrige la distorsion de l'objectif automatiquement pour certains APN (M4/3, quelques compacts, etc.) @@ -1511,13 +1542,6 @@ PREFERENCES_CLUTSDIR;Dossier HaldCLUT ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!HISTORY_MSG_281;Color Toning - Sat. Protection -!HISTORY_MSG_282;Color Toning - Sat. Threshold -!HISTORY_MSG_283;Color Toning - Str. Protection -!HISTORY_MSG_284;Color Toning - Auto saturation -!HISTORY_MSG_285;NR - Median method -!HISTORY_MSG_286;NR - Median type -!HISTORY_MSG_287;NR - Median iterations !NAVIGATOR_NA; -- !PREFERENCES_HISTOGRAMWORKING;Use working profile for main histogram and Navigator !PREFERENCES_HISTOGRAM_TOOLTIP;If enabled, the working profile is used for rendering the main histogram and the Navigator, otherwise the gamma-corrected output profile is used. @@ -1526,38 +1550,6 @@ PREFERENCES_CLUTSDIR;Dossier HaldCLUT !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects !TP_BWMIX_ALGO_TOOLTIP;Linear: will produce a normal linear response.\nSpecial effects: will produce special effects by mixing channels non-linearly. -!TP_COLORTONING_AUTOSAT;Auto saturation -!TP_COLORTONING_CHROMA1;Opacity 'a' -!TP_COLORTONING_CHROMAC;Opacity chroma -!TP_COLORTONING_SPLITCOCO;Color Balance SMH -!TP_COLORTONING_STRPROTECT;Strength protection -!TP_DIRPYRDENOISE_33;3x3 strong -!TP_DIRPYRDENOISE_55SOFT;5x5 -!TP_DIRPYRDENOISE_55;5x5 strong -!TP_DIRPYRDENOISE_77;7x7 (slow) -!TP_DIRPYRDENOISE_LABM;Lab -!TP_DIRPYRDENOISE_LM;Luminance only -!TP_DIRPYRDENOISE_MEDMETHOD;Median method -!TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED;Median - Luminance only -!TP_DIRPYRDENOISE_MED_TOOLTIP;- -!TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "Lab" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. -!TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired size. The larger the size, the longer it takes.\n\n3x3 soft: treats 5 pixels in a 1-pixel range.\n3x3: treats 9 pixels in a 1-pixel range.\n5x5 soft: treats 13 pixels in a 2-pixel range.\n5x5: treats 25 pixels in a 2-pixel range.\n7x7: treats 49 pixels in a 3-pixel range.\n\nSometimes it is possible to achieve higher quality running several iterations with a small range than one iteration with a large range. -!TP_DIRPYRDENOISE_NONE;None -!TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying a 3x3 median filter with three iterations often leads to better results than applying 7x7 once. -!TP_DIRPYRDENOISE_PASSE;Median iterations -!TP_DIRPYRDENOISE_RGBM;RGB -!TP_DIRPYRDENOISE_SOFT;3x3 -!TP_DIRPYREQUALIZER_ALGO;Algorithm Skin -!TP_DIRPYREQUALIZER_ALGO_FI;Fine -!TP_DIRPYREQUALIZER_ALGO_LA;Large -!TP_DIRPYREQUALIZER_ALGO_TOOLTIP;Fine: closer to the colors of the skin, minimizing the action on other colors\nLarge: avoid more artifacts. -!TP_DIRPYREQUALIZER_GAMUT;Reduce artifacts -!TP_DIRPYREQUALIZER_HUESKIN;Skin hue -!TP_DIRPYREQUALIZER_HUESKIN_TOOLTIP;This pyramid is for the upper part, so far as the algorithm at its maximum efficiency.\nTo the lower part, the transition zones.\nIf you need to move the area significantly to the left or right - or if there are artifacts: the white balance is incorrect\nYou can slightly reduce the zone to prevent the rest of the image is affected. -!TP_DIRPYREQUALIZER_SKIN;Skin Tones Targetting/Protection -!TP_DIRPYREQUALIZER_SKIN_TOOLTIP;At -100 skin tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 skin tones are protected while all other tones are affected. -!TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts due to the transitions between the color (hue, chroma, luma) of the skin and the rest of the image. !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_FLATFIELD_FILEDLGFILTERANY;Any files !TP_FLATFIELD_FILEDLGFILTERFF;Same format as current photo diff --git a/rtdata/languages/default b/rtdata/languages/default index 5f2e30693..86fb524a6 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -474,15 +474,14 @@ HISTORY_MSG_251;B&W - Algorithm HISTORY_MSG_252;CbDL Skin Tones HISTORY_MSG_253;CbDL Reduce artifacts HISTORY_MSG_254;CbDL - Skin hue -HISTORY_MSG_255;NR - Median +HISTORY_MSG_255;NR - Median Filter HISTORY_MSG_256;NR - Median type HISTORY_MSG_257;Color Toning HISTORY_MSG_258;Color Toning - Color HISTORY_MSG_259;Color Toning - Opacity -HISTORY_MSG_260;Color Toning - Opacity +HISTORY_MSG_260;Color Toning - 'a[b]' Opacity HISTORY_MSG_261;Color Toning - Method -HISTORY_MSG_262;Color Toning - Opacity -HISTORY_MSG_263;Color Toning - Luminance +HISTORY_MSG_262;Color Toning - 'b' Opacity HISTORY_MSG_263;Color Toning - Shadows Red HISTORY_MSG_264;Color Toning - Shadows Green HISTORY_MSG_265;Color Toning - Shadows Blue @@ -497,17 +496,17 @@ HISTORY_MSG_273;Color Toning - Reset HISTORY_MSG_274;Color Toning - Sat. Shadows HISTORY_MSG_275;Color Toning - Sat. Highlights HISTORY_MSG_276;Color Toning - Opacity -HISTORY_MSG_277;Color Toning - Reset Curves +HISTORY_MSG_277;--unused-- HISTORY_MSG_278;Color Toning - Preserve Luminance HISTORY_MSG_279;Color Toning - Shadows HISTORY_MSG_280;Color Toning - Highlights HISTORY_MSG_281;Color Toning - Sat. Protection HISTORY_MSG_282;Color Toning - Sat. Threshold -HISTORY_MSG_283;Color Toning - Str. Protection -HISTORY_MSG_284;Color Toning - Auto saturation -HISTORY_MSG_285;NR - Median method -HISTORY_MSG_286;NR - Median type -HISTORY_MSG_287;NR - Median iterations +HISTORY_MSG_283;Color Toning - Strength +HISTORY_MSG_284;Color Toning - Auto. Sat. Protection +HISTORY_MSG_285;NR - Median - Method +HISTORY_MSG_286;NR - Median - Type +HISTORY_MSG_287;NR - Median - Iterations HISTORY_MSG_288;Flat Field Clip Control HISTORY_MSG_289;Flat Field Automatic Clip Control HISTORY_MSG_290;Black Level - Red @@ -1086,19 +1085,15 @@ TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] TP_COLORAPP_WBRT;WB [RT] + [output] TP_COLORTONING_AB;o C/L -TP_COLORTONING_AUTOSAT;Auto saturation +TP_COLORTONING_AUTOSAT;Automatic TP_COLORTONING_BALANCE;Balance TP_COLORTONING_BALANCE_TOOLTIP;Equilibrate tones between shadows and highlights TP_COLORTONING_BY;o C/L -TP_COLORTONING_CHROMA1;Opacity 'a' -TP_COLORTONING_CHROMA2;Opacity 'b' -TP_COLORTONING_CHROMAC;Opacity chroma -TP_COLORTONING_CHROMA;Opacity 'ab' or 'a' +TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Opacity Chroma according to Luminance of C=f(L) +TP_COLORTONING_CHROMAC;Opacity TP_COLORTONING_COLOR;Color -TP_COLORTONING_CURVEEDITOR_LL;L TP_COLORTONING_HIGHLIGHT;Highlights TP_COLORTONING_HUE;Hue -TP_COLORTONING_HUE;Hue blending only TP_COLORTONING_LABCOL;Direct Colors TP_COLORTONING_LABCOL_TOOLTIP;When you move a saturation slider, these 'direct' colors are increased. TP_COLORTONING_LABEL;Color Toning @@ -1112,32 +1107,29 @@ TP_COLORTONING_LUMAMODE;Preserve luminance TP_COLORTONING_LUMAMODE_TOOLTIP;If enabled, when you change color (red, green, cyan, blue, etc.) the luminance of each pixel is preserved. TP_COLORTONING_LUMA;Luminance TP_COLORTONING_METHOD;Method -TP_COLORTONING_METHOD_TOOLTIP;Lab blending use interpolation colour blending\nColor balance (Shadows Midtones Highlights)\nSplit Toning Colour SH+balance (Shadows Highlights + balance shadows/highlights) use direct colors\nIn all methods you can enabled Black and White -TP_COLORTONING_MIDTONES;Mid Tones -TP_COLORTONING_NEUTRALCUR;Reset curves -TP_COLORTONING_NEUTRALCUR_TIP;Reset all curves to default. +TP_COLORTONING_METHOD_TOOLTIP;"Lab blending", "RGB sliders" and "RGB curves" use interpolated color blending.\n"Color balance (Shadows/Mid-tones/Highlights)" and "Saturation 2 colors" use direct colors.\n\nThe Black-and-White tool can be enabled when using any color toning method, which allows for color toning. TP_COLORTONING_NEUTRAL;Reset sliders -TP_COLORTONING_NEUTRAL_TIP;Reset all values (Shadows Midtones Highlights) to default. +TP_COLORTONING_NEUTRAL_TIP;Reset all values (Shadows, Midtones, Highlights) to default. TP_COLORTONING_OPACITY;Opacity TP_COLORTONING_RGBCURVES;RGB - Curves TP_COLORTONING_RGBSLIDERS;RGB - Sliders TP_COLORTONING_SATH;Saturation highlights TP_COLORTONING_SATL;Saturation shadows -TP_COLORTONING_SATURATEDOPACITY;Saturation protection -TP_COLORTONING_SATURATIONTHRESHOLD;Saturation protection threshold +TP_COLORTONING_SA;Saturation Protection +TP_COLORTONING_SATURATEDOPACITY;Strength +TP_COLORTONING_SATURATIONTHRESHOLD;Threshold TP_COLORTONING_SHADOWS;Shadows -TP_COLORTONING_SPLITBAL;Split Toning Colour SH + balance -TP_COLORTONING_SPLITCOCO;Color Balance SMH -TP_COLORTONING_SPLITCO;Split Toning Colour SMH -TP_COLORTONING_SPLITLR;Split Toning Saturation 2 colors +TP_COLORTONING_SPLITBAL;Shadows / Highlights + balance +TP_COLORTONING_SPLITCOCO;Color Balance Shadows / Mid-tones / Highligths +TP_COLORTONING_SPLITCO;Shadows / Mid-tones / Highligths +TP_COLORTONING_SPLITLR;Saturation 2 colors TP_COLORTONING_STRENGTH;Strength -TP_COLORTONING_STRPROTECT;Strength protection -TP_COLORTONING_TWO2;Opacity special chroma 2 colors -TP_COLORTONING_TWOALL;Opacity special chroma -TP_COLORTONING_TWOBY;Opacity special 'a' and 'b' -TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard - linear response same for 'a' and 'b'\nSpecial chroma same response for 'a' and 'b', but without bound - try under the diagonal\nSpecial 'a' and 'b': as Special + first curve 'a' only - second curve 'b' only : dedicate for special effects\nSpecial 2 colors - more predictable -TP_COLORTONING_TWOSTD;Opacity standard chroma -TP_CROP_FIXRATIO;Fix ratio: +TP_COLORTONING_TWOSTD;Standard chroma +TP_COLORTONING_TWOALL;Special chroma +TP_COLORTONING_TWOBY;Special 'a' and 'b' +TP_COLORTONING_TWO2;Special chroma '2 colors' +TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard chroma:\nLinear response, a* = b*.\n\nSpecial chroma:\nLinear response, a* = b*, but unbound - try under the diagonal.\n\nSpecial a* and b*:\nLinear response unbound with separate curves for a* and b*. Intended for special effects.\n\nSpecial chroma 2 colors:\nMore predictable. +TP_COLORTONING_STR;Strength TP_CROP_GTDIAGONALS;Rule of Diagonals TP_CROP_GTEPASSPORT;Biometric Passport TP_CROP_GTFRAME;Frame @@ -1161,10 +1153,11 @@ TP_DARKFRAME_LABEL;Dark Frame TP_DEFRINGE_LABEL;Defringe TP_DEFRINGE_RADIUS;Radius TP_DEFRINGE_THRESHOLD;Threshold -TP_DIRPYRDENOISE_33;3x3 strong -TP_DIRPYRDENOISE_55SOFT;5x5 -TP_DIRPYRDENOISE_55;5x5 strong -TP_DIRPYRDENOISE_77;7x7 (slow) +TP_DIRPYRDENOISE_33;3×3 strong +TP_DIRPYRDENOISE_33SOFT;3×3 +TP_DIRPYRDENOISE_55;5×5 strong +TP_DIRPYRDENOISE_55SOFT;5×5 +TP_DIRPYRDENOISE_77;7×7 (slow) TP_DIRPYRDENOISE_BLUE;Chrominance - Blue-Yellow TP_DIRPYRDENOISE_CHROMA;Chrominance - Master TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. @@ -1196,13 +1189,13 @@ TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "Lab" methods, TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired size. The larger the size, the longer it takes.\n\n3x3 soft: treats 5 pixels in a 1-pixel range.\n3x3: treats 9 pixels in a 1-pixel range.\n5x5 soft: treats 13 pixels in a 2-pixel range.\n5x5: treats 25 pixels in a 2-pixel range.\n7x7: treats 49 pixels in a 3-pixel range.\n\nSometimes it is possible to achieve higher quality running several iterations with a small range than one iteration with a large range. TP_DIRPYRDENOISE_NONE;None TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying a 3x3 median filter with three iterations often leads to better results than applying 7x7 once. -TP_DIRPYRDENOISE_PASSE;Median iterations +TP_DIRPYRDENOISE_PASSE;Median Iterations TP_DIRPYRDENOISE_PERF;RGB mode (raw images) TP_DIRPYRDENOISE_RED;Chrominance - Red-Green TP_DIRPYRDENOISE_RGBM;RGB TP_DIRPYRDENOISE_RGB;RGB TP_DIRPYRDENOISE_SOFT;3x3 -TP_DIRPYREQUALIZER_ALGO;Algorithm Skin +TP_DIRPYREQUALIZER_ALGO;Skin Color Range TP_DIRPYREQUALIZER_ALGO_FI;Fine TP_DIRPYREQUALIZER_ALGO_LA;Large TP_DIRPYREQUALIZER_ALGO_TOOLTIP;Fine: closer to the colors of the skin, minimizing the action on other colors\nLarge: avoid more artifacts. @@ -1218,7 +1211,6 @@ TP_DIRPYREQUALIZER_LUMANEUTRAL;Neutral TP_DIRPYREQUALIZER_SKIN;Skin Tones Targetting/Protection TP_DIRPYREQUALIZER_SKIN_TOOLTIP;At -100 skin tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 skin tones are protected while all other tones are affected. TP_DIRPYREQUALIZER_THRESHOLD;Threshold -TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts due to the transitions between the color (hue, chroma, luma) of the skin and the rest of the image. TP_DISTORTION_AMOUNT;Amount TP_DISTORTION_AUTO;Auto Distortion Correction TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index a6c9b95a4..080291819 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -222,10 +222,24 @@ void Crop::update (int todo) { parent->imgsrc->getGamma()); }*/ double rrm, ggm, bbm; + float satLimit = float(params.colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; + float satLimitOpacity = 1.f-(float(params.colorToning.saturatedOpacity)/100.f); + + if(params.colorToning.enabled && params.colorToning.autosat){//for colortoning evaluation of saturation settings + float moyS=0.f; + float eqty=0.f; + parent->ipf.moyeqt (baseCrop, moyS, eqty);//return image : mean saturation and standard dev of saturation + //printf("moy=%f ET=%f\n", moyS,eqty); + float satp=((moyS+1.5f*eqty)-0.3f)/0.7f;//1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale + if(satp >= 0.92f) satp=0.92f;//avoid values too high (out of gamut) + if(satp <= 0.15f) satp=0.15f;//avoid too low values + satLimit= 100.f*satp; + satLimitOpacity= 100.f*(moyS-0.85f*eqty);//-0.85 sigma==>20% pixels with low saturation + } if (todo & M_RGBCURVE) parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, - params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->ctColorCurve, parent->ctOpacityCurve, parent->clToningcurve,parent->cl2Toningcurve, + params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, satLimit ,satLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->clToningcurve,parent->cl2Toningcurve, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW,rrm, ggm, bbm, parent->bwAutoR, parent->bwAutoG, parent->bwAutoB); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 1d2b8891a..79566388b 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -370,45 +370,59 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { double rrm=33.; double ggm=33.; double bbm=33.; - - int satTH=80; - int satPR=30; - int indi=0; - if(params.colorToning.enabled && params.colorToning.autosat){//for colortoning evaluation of saturation settings - float moyS=0.f; - float eqty=0.f; - ipf.moyeqt (oprevi, moyS, eqty);//return image : mean saturation and standard dev of saturation - //printf("moy=%f ET=%f\n", moyS,eqty); - float satp=((moyS+1.5f*eqty)-0.3f)/0.7f;//1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) satp=0.92f;//avoid values too high (out of gamut) - if(satp <= 0.15f) satp=0.15f;//avoid too low values - - satTH=(int) 100.f*satp; - satPR=(int) 100.f*(moyS-0.85f*eqty);//-0.85 sigma==>20% pixels with low saturation - } - if(actListener) { - if(params.blackwhite.enabled) {actListener->autoColorTonChanged(0, satTH, satPR);} - else { - if(params.colorToning.autosat){ - if(params.colorToning.method=="Lab") indi=1; - else if(params.colorToning.method=="RGBCurves") indi=1; - else if(params.colorToning.method=="RGBSliders") indi=1; - else if(params.colorToning.method=="Splico") indi=2; - else if(params.colorToning.method=="Splitlr") indi=2; - actListener->autoColorTonChanged(indi, satTH, satPR); - } - } - } + float satLimit = float(params.colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; + float satLimitOpacity = 1.f-(float(params.colorToning.saturatedOpacity)/100.f); + + int satTH=80; + int satPR=30; + int indi=0; + if(params.colorToning.enabled && params.colorToning.autosat){//for colortoning evaluation of saturation settings + float moyS=0.f; + float eqty=0.f; + ipf.moyeqt (oprevi, moyS, eqty);//return image : mean saturation and standard dev of saturation + //printf("moy=%f ET=%f\n", moyS,eqty); + float satp=((moyS+1.5f*eqty)-0.3f)/0.7f;//1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale + if(satp >= 0.92f) satp=0.92f;//avoid values too high (out of gamut) + if(satp <= 0.15f) satp=0.15f;//avoid too low values + + //satTH=(int) 100.f*satp; + //satPR=(int) 100.f*(moyS-0.85f*eqty);//-0.85 sigma==>20% pixels with low saturation + satLimit= 100.f*satp; + satTH = (int) 100.f*satp; + + satLimitOpacity= 100.f*(moyS-0.85f*eqty);//-0.85 sigma==>20% pixels with low saturation + satPR= (int) 100.f*(moyS-0.85f*eqty); + } + if(actListener) { + //if(params.blackwhite.enabled) {actListener->autoColorTonChanged(0, satTH, satPR);} + if(params.blackwhite.enabled && params.colorToning.autosat) {actListener->autoColorTonChanged(0, satTH, satPR);indi=0;}//hide sliders only if autosat + else { + if(params.colorToning.autosat){ + if (params.colorToning.method=="Lab") indi=1; + else if(params.colorToning.method=="RGBCurves") indi=1; + else if(params.colorToning.method=="RGBSliders") indi=1; + else if(params.colorToning.method=="Splico") indi=2; + else if(params.colorToning.method=="Splitlr") indi=2; + + //actListener->autoColorTonChanged(indi, satTH, satPR); + } + } + } // if it's just crop we just need the histogram, no image updates if ( todo & M_RGBCURVE ) { ipf.rgbProc (oprevi, oprevl, NULL, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, - rCurve, gCurve, bCurve, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2,beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh); - if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { + rCurve, gCurve, bCurve, satLimit ,satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2,beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh); + if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { if (settings->verbose) printf("ImProcCoordinator / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", bwAutoR, bwAutoG, bwAutoB); abwListener->BWChanged((float) rrm, (float) ggm, (float) bbm); } + if(params.colorToning.autosat && actListener) { + if (settings->verbose) + printf("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi,(int)satLimit , (int) satLimitOpacity); + actListener->autoColorTonChanged(indi, (int) satLimit, (int)satLimitOpacity);//change sliders autosat + } // correct GUI black and white with value } @@ -434,30 +448,30 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { // cclutili=false; // clcutili=false; if ((todo & M_LUMACURVE) || (todo & M_CROP)) { - utili = false; + utili = false; CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, lhist16, lhist16Cropped, lumacurve, histLCurve, scale==1 ? 1 : 16, utili); } if (todo & M_LUMACURVE) { - autili=false; - butili=false; - ccutili=false; - cclutili=false; - clcutili=false; + autili=false; + butili=false; + ccutili=false; + cclutili=false; + clcutili=false; CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, lhist16CLlad, histCLurve, scale==1 ? 1 : 16); - float adjustr=1.0f, adjustbg=1.0f; + float adjustr=1.0f, adjustbg=1.0f; -/* if (params.icm.working=="ProPhoto") {adjustr = adjustbg = 1.2f;}// 1.2 instead 1.0 because it's very rare to have C>170.. - else if (params.icm.working=="Adobe RGB") {adjustr = 1.8f; adjustbg = 1.4f;} - else if (params.icm.working=="sRGB") {adjustr = 2.0f; adjustbg = 1.7f;} - else if (params.icm.working=="WideGamut") {adjustr = adjustbg = 1.2f;} - else if (params.icm.working=="Beta RGB") {adjustr = adjustbg = 1.4f;} - else if (params.icm.working=="BestRGB") {adjustr = adjustbg = 1.4f;} - else if (params.icm.working=="BruceRGB") {adjustr = 1.8f; adjustbg = 1.5f;} +/* if (params.icm.working=="ProPhoto") {adjustr = adjustbg = 1.2f;}// 1.2 instead 1.0 because it's very rare to have C>170.. + else if (params.icm.working=="Adobe RGB") {adjustr = 1.8f; adjustbg = 1.4f;} + else if (params.icm.working=="sRGB") {adjustr = 2.0f; adjustbg = 1.7f;} + else if (params.icm.working=="WideGamut") {adjustr = adjustbg = 1.2f;} + else if (params.icm.working=="Beta RGB") {adjustr = adjustbg = 1.4f;} + else if (params.icm.working=="BestRGB") {adjustr = adjustbg = 1.4f;} + else if (params.icm.working=="BruceRGB") {adjustr = 1.8f; adjustbg = 1.5f;} */ - adjustr=1.f; + adjustr=1.f; CurveFactory::complexsgnCurve (adjustr, autili, butili,ccutili,cclutili, params.labCurve.chromaticity, params.labCurve.rstprotection, params.labCurve.acurve, params.labCurve.bcurve,params.labCurve.cccurve,params.labCurve.lccurve,chroma_acurve, chroma_bcurve, satcurve,lhskcurve, lhist16Clad, lhist16LLClad, histCCurve, histLLCurve, scale==1 ? 1 : 16); @@ -509,15 +523,15 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { delete [] buffer; readyphase++; } - } - // if (scale==1) { + } + //if (scale==1) { if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)){ progress ("Pyramid equalizer...",100*readyphase/numofphases); ipf.dirpyrequalizer (nprevl, scale); - //ipf.Lanczoslab (nprevl, nprevl, 1.f/scale); + //ipf.Lanczoslab (nprevl, nprevl, 1.f/scale); readyphase++; } - // } + //} //L histo and Chroma histo for ciecam // histogram well be for Lab (Lch) values, because very difficult to do with J,Q, M, s, C @@ -623,12 +637,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { delete workimg; Glib::ustring outProfile=params.icm.output; Glib::ustring workProfile=params.icm.working; - - if(settings->HistogramWorking) workimg = ipf.lab2rgb (nprevl, 0,0,pW,pH, workProfile, true); - else { - if (params.icm.output=="" || params.icm.output==ColorManagementParams::NoICMString) outProfile="sRGB"; - workimg = ipf.lab2rgb (nprevl, 0,0,pW,pH, outProfile, false); - } + + if(settings->HistogramWorking) workimg = ipf.lab2rgb (nprevl, 0,0,pW,pH, workProfile, true); + else { + if (params.icm.output=="" || params.icm.output==ColorManagementParams::NoICMString) outProfile="sRGB"; + workimg = ipf.lab2rgb (nprevl, 0,0,pW,pH, outProfile, false); + } } catch(char * str) { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index dbe60762a..d7c1c6518 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2134,14 +2134,14 @@ float mo=0.f; void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, EditBuffer *editBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve,LUTf & cl2Toningcurve, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit ,float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve,LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1,const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1,const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob ) { - rgbProc (working, lab, editBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve,customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2,rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh); + rgbProc (working, lab, editBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit ,satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve,customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2,rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh); } // Process RGB image and convert to LAB space void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, EditBuffer *editBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve,LUTf & cl2Toningcurve, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit ,float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve,LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1,const ToneCurve & customToneCurvebw2,double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh) { LUTf iGammaLUTf; @@ -2301,9 +2301,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, EditBuffer *e bool hasColorToning = params->colorToning.enabled && bool(ctOpacityCurve) && bool(ctColorCurve); - float satLimit = float(params->colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; - float satLimitOpacity = 1.f-(float(params->colorToning.saturatedOpacity)/100.f); - float strProtect = 1.f-(float(params->colorToning.strengthprotection)/100.f); + // float satLimit = float(params->colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; + // float satLimitOpacity = 1.f-(float(params->colorToning.saturatedOpacity)/100.f); + float strProtect = (float(params->colorToning.strength)/100.f); /* // Debug output - Color LUTf points @@ -4205,7 +4205,7 @@ void ImProcFunctions::labtoning (float r, float g, float b, float &ro, float &go //float opacity = ctOpacityCurve.lutOpacityCurve[l*500.f]; - + //if(params->blackwhite.enabled){satLimit=80.f;satLimitOpacity=30.f;}//force BW // get the opacity and tweak it to preserve saturated colors //float l_ = Color::gamma_srgb(l*65535.f)/65535.f; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index d907bcbe1..5c90ef594 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -195,10 +195,10 @@ class ImProcFunctions { void firstAnalysis (Imagefloat* working, const ProcParams* params, LUTu & vhist16, double gamma); void rgbProc (Imagefloat* working, LabImage* lab, EditBuffer *editBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve,LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve,LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1,const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob); void rgbProc (Imagefloat* working, LabImage* lab, EditBuffer *editBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity,const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1,const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh); void labtoning (float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve,LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] ); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index f6592a714..f64776e00 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -279,7 +279,7 @@ enum ProcEvent { EvDirPyrEqualizerHueskin=253, // EvDirPyrEqualizeralg=254, EvDPDNmedian=254, - EvDPDNmedmet=255, + EvDPDNmedmet=255, EvColorToningEnabled=256, EvColorToningColor =257, EvColorToningOpacity=258, @@ -307,7 +307,7 @@ enum ProcEvent { EvColorToningHighights=279, EvColorToningSatProtection=280, EvColorToningSatThreshold=281, - EvColorToningStrProtection=282, + EvColorToningStrength=282, EvColorToningautosat=283, EvDPDNmetmed=284, EvDPDNrgbmet=285, diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 65d5ebc22..f2856e58d 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -173,7 +173,7 @@ void ColorToningParams::setDefault() { balance = 0; satProtectionThreshold = 30; saturatedOpacity = 80; - strengthprotection = 50; + strength = 50; lumamode = true; twocolor = "Std"; redlow = 0.0; @@ -1461,9 +1461,9 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol Glib::ArrayHandle curve = colorToning.colorCurve; keyFile.set_double_list("ColorToning", "ColorCurve", curve); } - if (!pedited || pedited->colorToning.satProtectionThreshold) keyFile.set_integer ("ColorToning", "SatProtectionThreshold", colorToning.satProtectionThreshold ); - if (!pedited || pedited->colorToning.saturatedOpacity) keyFile.set_integer ("ColorToning", "SaturatedOpacity", colorToning.saturatedOpacity ); - if (!pedited || pedited->colorToning.strengthprotection) keyFile.set_integer ("ColorToning", "Strengthprotection", colorToning.strengthprotection ); + if (!pedited || pedited->colorToning.satprotectionthreshold) keyFile.set_integer ("ColorToning", "SatProtectionThreshold", colorToning.satProtectionThreshold ); + if (!pedited || pedited->colorToning.saturatedopacity) keyFile.set_integer ("ColorToning", "SaturatedOpacity", colorToning.saturatedOpacity ); + if (!pedited || pedited->colorToning.strength) keyFile.set_integer ("ColorToning", "Strength", colorToning.strength ); if (!pedited || pedited->colorToning.hlColSat) { Glib::ArrayHandle thresh (colorToning.hlColSat.value, 2, Glib::OWNERSHIP_NONE); @@ -2159,10 +2159,10 @@ if (keyFile.has_group ("ColorToning")) { if (keyFile.has_key ("ColorToning", "OpacityCurve")) { colorToning.opacityCurve = keyFile.get_double_list ("ColorToning", "OpacityCurve"); if (pedited) pedited->colorToning.opacityCurve = true; } if (keyFile.has_key ("ColorToning", "ColorCurve")) { colorToning.colorCurve = keyFile.get_double_list ("ColorToning", "ColorCurve"); if (pedited) pedited->colorToning.colorCurve = true; } if (keyFile.has_key ("ColorToning", "Autosat")) { colorToning.autosat = keyFile.get_boolean ("ColorToning", "Autosat"); if (pedited) pedited->colorToning.autosat = true; } - if (keyFile.has_key ("ColorToning", "SatProtectionThreshold")) { colorToning.satProtectionThreshold = keyFile.get_integer ("ColorToning", "SatProtectionThreshold"); if (pedited) pedited->colorToning.satProtectionThreshold = true; } - if (keyFile.has_key ("ColorToning", "SaturatedOpacity")) { colorToning.saturatedOpacity = keyFile.get_integer ("ColorToning", "SaturatedOpacity"); if (pedited) pedited->colorToning.saturatedOpacity = true; } - if (keyFile.has_key ("ColorToning", "Strengthprotection")) { colorToning.strengthprotection = keyFile.get_integer ("ColorToning", "Strengthprotection"); if (pedited) pedited->colorToning.strengthprotection = true; } - if (keyFile.has_key ("ColorToning", "HighlightsColorSaturation")) { + if (keyFile.has_key ("ColorToning", "SatProtectionThreshold")) { colorToning.satProtectionThreshold = keyFile.get_integer ("ColorToning", "SatProtectionThreshold"); if (pedited) pedited->colorToning.satprotectionthreshold = true; } + if (keyFile.has_key ("ColorToning", "SaturatedOpacity")) { colorToning.saturatedOpacity = keyFile.get_integer ("ColorToning", "SaturatedOpacity"); if (pedited) pedited->colorToning.saturatedopacity = true; } + if (keyFile.has_key ("ColorToning", "Strength")) { colorToning.strength = keyFile.get_integer ("ColorToning", "Strength"); if (pedited) pedited->colorToning.strength = true; } + if (keyFile.has_key ("ColorToning", "HighlightsColorSaturation")) { Glib::ArrayHandle thresh = keyFile.get_integer_list ("ColorToning", "HighlightsColorSaturation"); colorToning.hlColSat.setValues(thresh.data()[0], thresh.data()[1]); if (pedited) pedited->colorToning.hlColSat = true; @@ -2604,7 +2604,7 @@ bool ProcParams::operator== (const ProcParams& other) { && colorToning.autosat == other.colorToning.autosat && colorToning.satProtectionThreshold == other.colorToning.satProtectionThreshold && colorToning.saturatedOpacity == other.colorToning.saturatedOpacity - && colorToning.strengthprotection == other.colorToning.strengthprotection + && colorToning.strength == other.colorToning.strength && colorToning.hlColSat == other.colorToning.hlColSat && colorToning.shadowsColSat == other.colorToning.shadowsColSat && colorToning.balance == other.colorToning.balance diff --git a/rtengine/procparams.h b/rtengine/procparams.h index f6ee5186a..8bbcdd695 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -257,12 +257,12 @@ class ColorToningParams { public: bool enabled; - bool autosat; + bool autosat; std::vector opacityCurve; std::vector colorCurve; int satProtectionThreshold; int saturatedOpacity; - int strengthprotection; + int strength; int balance; Threshold hlColSat; Threshold shadowsColSat; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 8d1ac69e7..edf90ba7b 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -275,7 +275,7 @@ DIRPYREQUALIZER, // EvDirPyrEqualizerSkin DIRPYREQUALIZER, // EvDirPyrEqlgamutlab DIRPYREQUALIZER, // EvDirPyrEqualizerHueskin ALLNORAW, // EvDPDNmedian -ALLNORAW, //EvDPDNmedmet +ALLNORAW, //EvDPDNmedmet //DIRPYREQUALIZER // EvDirPyrEqualizeralg RGBCURVE, // EvColorToningEnabled RGBCURVE, // EvColorToningColor @@ -304,7 +304,7 @@ RGBCURVE, // EvColorToningShadows RGBCURVE, // EvColorToningHighights RGBCURVE, // EvColorToningSatProtection RGBCURVE, // EvColorToningSatThreshold -RGBCURVE, //EvColorToningStrProtection +RGBCURVE, //EvColorToningStrength RGBCURVE, //EvColorToningautosat ALLNORAW, //EvDPDNmetmed ALLNORAW, //EvDPDNrgbmet diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 0324bcd50..0f2325afd 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -880,8 +880,25 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei double rrm, ggm, bbm; float autor, autog, autob; + float satLimit = float(params.colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; + float satLimitOpacity = 1.f-(float(params.colorToning.saturatedOpacity)/100.f); + + if(params.colorToning.enabled && params.colorToning.autosat){//for colortoning evaluation of saturation settings + float moyS=0.f; + float eqty=0.f; + ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation + //printf("moy=%f ET=%f\n", moyS,eqty); + float satp=((moyS+1.5f*eqty)-0.3f)/0.7f;//1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale + if(satp >= 0.92f) satp=0.92f;//avoid values too high (out of gamut) + if(satp <= 0.15f) satp=0.15f;//avoid too low values + + satLimit= 100.f*satp; + + satLimitOpacity= 100.f*(moyS-0.85f*eqty);//-0.85 sigma==>20% pixels with low saturation + } + autor = autog = autob = -9000.f; // This will ask to compute the "auto" values for the B&W tool - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2,rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh); + ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit ,satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2,rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh); // freeing up some memory customToneCurve1.Reset(); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index bc799f799..67faf44c2 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -253,8 +253,25 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 1); double rrm, ggm, bbm; float autor, autog, autob; + float satLimit = float(params.colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; + float satLimitOpacity = 1.f-(float(params.colorToning.saturatedOpacity)/100.f); + + if(params.colorToning.enabled && params.colorToning.autosat){//for colortoning evaluation of saturation settings + float moyS=0.f; + float eqty=0.f; + ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation + //printf("moy=%f ET=%f\n", moyS,eqty); + float satp=((moyS+1.5f*eqty)-0.3f)/0.7f;//1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale + if(satp >= 0.92f) satp=0.92f;//avoid values too high (out of gamut) + if(satp <= 0.15f) satp=0.15f;//avoid too low values + + satLimit= 100.f*satp; + + satLimitOpacity= 100.f*(moyS-0.85f*eqty);//-0.85 sigma==>20% pixels with low saturation + } + autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000) - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve,customToneCurve1, customToneCurve2,customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh); + ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit ,satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve,customToneCurve1, customToneCurve2,customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh); if (settings->verbose) printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); diff --git a/rtgui/addsetids.h b/rtgui/addsetids.h index 06b1d2c4f..74a49b747 100644 --- a/rtgui/addsetids.h +++ b/rtgui/addsetids.h @@ -81,8 +81,8 @@ #define ADDSET_COLORTONING_SATTHRESHOLD 73 #define ADDSET_COLORTONING_SATOPACITY 74 #define ADDSET_COLORTONING_BALANCE 75 -#define ADDSET_COLORTONING_STRPROTECT 76 -#define ADDSET_DIRPYRDN_PASSES 77 +#define ADDSET_COLORTONING_STRENGTH 76 +#define ADDSET_DIRPYRDN_PASSES 77 #define ADDSET_RAWFFCLIPCONTROL 78 #define ADDSET_FILMSIMULATION_STRENGTH 79 diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index f2e0d5162..5663a257b 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -177,7 +177,8 @@ void BatchToolPanelCoordinator::initSession () { sharpenEdge->setAdjusterBehavior (options.baBehav[ADDSET_SHARPENEDGE_AMOUNT],options.baBehav[ADDSET_SHARPENEDGE_PASS]); sharpenMicro->setAdjusterBehavior (options.baBehav[ADDSET_SHARPENMICRO_AMOUNT],options.baBehav[ADDSET_SHARPENMICRO_UNIFORMITY]); icm->setAdjusterBehavior (options.baBehav[ADDSET_FREE_OUPUT_GAMMA],options.baBehav[ADDSET_FREE_OUTPUT_SLOPE]); - colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRPROTECT], options.baBehav[ADDSET_COLORTONING_BALANCE]); +// colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRPROTECT], options.baBehav[ADDSET_COLORTONING_BALANCE]); + colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRENGTH], options.baBehav[ADDSET_COLORTONING_BALANCE]); filmSimulation->setAdjusterBehavior(options.baBehav[ADDSET_FILMSIMULATION_STRENGTH]); chmixer->setAdjusterBehavior (options.baBehav[ADDSET_CHMIXER] ); @@ -257,7 +258,7 @@ void BatchToolPanelCoordinator::initSession () { if (options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD]) pparams.colorToning.satProtectionThreshold = 0; if (options.baBehav[ADDSET_COLORTONING_SATOPACITY]) pparams.colorToning.saturatedOpacity = 0; if (options.baBehav[ADDSET_COLORTONING_BALANCE]) pparams.colorToning.balance = 0; - if (options.baBehav[ADDSET_COLORTONING_STRPROTECT]) pparams.colorToning.strengthprotection = 0; + if (options.baBehav[ADDSET_COLORTONING_STRENGTH]) pparams.colorToning.strength = 0; if (options.baBehav[ADDSET_FILMSIMULATION_STRENGTH]) pparams.filmSimulation.strength = 0; diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index b43eb35f0..a23282e3d 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -25,7 +25,6 @@ ColorToning::ColorToning () : FoldableToolPanel(this) method->append_text (M("TP_COLORTONING_LAB")); method->append_text (M("TP_COLORTONING_RGBSLIDERS")); method->append_text (M("TP_COLORTONING_RGBCURVES")); -// method->append_text (M("TP_COLORTONING_SPLITBW")); method->append_text (M("TP_COLORTONING_SPLITCOCO")); method->append_text (M("TP_COLORTONING_SPLITLR")); method->set_active (0); @@ -114,20 +113,16 @@ ColorToning::ColorToning () : FoldableToolPanel(this) pack_start( *opacityCurveEditorG, Gtk::PACK_SHRINK, 2); //---------Chroma curve 1 -------------------- - labchroma1="TP_COLORTONING_CHROMAC"; - labchroma2="TP_COLORTONING_CHROMA2"; -// itot = Gtk::manage (new RTImage ("Chanmixer-RGBY.png")); iby = Gtk::manage (new RTImage ("Chanmixer-BY.png")); irg = Gtk::manage (new RTImage ("Chanmixer-RG.png")); - clCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M(labchroma1)); + clCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_CHROMAC")); clCurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultCLCurve(defaultCurve); clshape = static_cast(clCurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_AB"),irg)); clshape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve); - clshape->setTooltip(M("TP_LABCURVE_CURVEEDITOR_CL_TOOLTIP")); - //clshape->setEditID(EUID_Lab_CLCurve, BT_SINGLEPLANE_FLOAT); + clshape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP")); clshape->setLeftBarColorProvider(this, 1); clshape->setRangeDefaultMilestones(0.25, 0.5, 0.75); @@ -141,15 +136,13 @@ ColorToning::ColorToning () : FoldableToolPanel(this) //---------Chroma curve 2 -------------------- - //cl2CurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_CHROMA2")); - cl2CurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M(labchroma1)); + cl2CurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_CHROMAC")); cl2CurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultCL2Curve(defaultCurve); cl2shape = static_cast(cl2CurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_BY"),iby)); cl2shape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve); - cl2shape->setTooltip(M("TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP")); - //clshape->setEditID(EUID_Lab_CLCurve, BT_SINGLEPLANE_FLOAT); + cl2shape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP")); cl2shape->setLeftBarColorProvider(this, 1); cl2shape->setRangeDefaultMilestones(0.25, 0.5, 0.75); @@ -162,18 +155,16 @@ ColorToning::ColorToning () : FoldableToolPanel(this) pack_start( *cl2CurveEditorG, Gtk::PACK_SHRINK, 2); //--------------------- Reset curves ----------------------------- - neutralCurvesHBox = Gtk::manage (new Gtk::HBox ()); - neutralCurvesHBox->set_border_width (2); - + /* Each curve can reset to a different curve, so this button only save one click now... so we remove it. neutralCurves = Gtk::manage (new Gtk::Button (M("TP_COLORTONING_NEUTRALCUR"))); RTImage *resetImgc = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); neutralCurves->set_image(*resetImgc); neutralCurves->set_tooltip_text (M("TP_COLORTONING_NEUTRALCUR_TIP")); neutralcurvesconn = neutralCurves->signal_pressed().connect( sigc::mem_fun(*this, &ColorToning::neutralCurves_pressed) ); neutralCurves->show(); - neutralCurvesHBox->pack_start (*neutralCurves); - pack_start (*neutralCurvesHBox); + pack_start (*neutralCurves); + */ //----------- Sliders + balance ------------------------------ @@ -191,44 +182,54 @@ ColorToning::ColorToning () : FoldableToolPanel(this) pack_start( *shadowsColSat, Gtk::PACK_SHRINK, 0); - //satlow = Gtk::manage (new Adjuster (M("TP_COLORTONING_SATL"), 0., 100., 1., 0.)); - //pack_start (*satlow, Gtk::PACK_EXPAND_WIDGET); - - //sathigh = Gtk::manage (new Adjuster (M("TP_COLORTONING_SATH"), 0., 100., 1., 0.)); - //pack_start (*sathigh, Gtk::PACK_EXPAND_WIDGET); balance = Gtk::manage( new Adjuster(M("TP_COLORTONING_BALANCE"), -100., 100., 1., 0.) ); balance->setAdjusterListener(this); pack_start (*balance, Gtk::PACK_SHRINK, 2); - //----------- Saturation and strength protection ------------------------------ + //----------- Saturation and strength ------------------------------ - satLimiterSep = Gtk::manage (new Gtk::HSeparator()); - pack_start (*satLimiterSep, Gtk::PACK_SHRINK); +// satLimiterSep = Gtk::manage (new Gtk::HSeparator()); + + +// pack_start (*satLimiterSep, Gtk::PACK_SHRINK); + +// Gtk::Frame *p1Frame; + // Vertical box container for the content of the Process 1 frame + Gtk::VBox *p1VBox; + p1Frame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_SA")) ); + p1Frame->set_border_width(0); + p1Frame->set_label_align(0.025, 0.5); + + p1VBox = Gtk::manage ( new Gtk::VBox()); + p1VBox->set_border_width(4); + p1VBox->set_spacing(2); autosat = Gtk::manage (new Gtk::CheckButton (M("TP_COLORTONING_AUTOSAT"))); autosat->set_active (true); autosatConn = autosat->signal_toggled().connect( sigc::mem_fun(*this, &ColorToning::autosatChanged) ); + //satFrame->set_label_widget(*autosat); - pack_start (*autosat, Gtk::PACK_SHRINK, 2); + p1VBox->pack_start (*autosat, Gtk::PACK_SHRINK, 2); - satProtectionThreshold = Gtk::manage( new Adjuster(M("TP_COLORTONING_SATURATIONTHRESHOLD"), 0., 100., 1., 70.) ); + satProtectionThreshold = Gtk::manage( new Adjuster(M("TP_COLORTONING_SATURATIONTHRESHOLD"), 0., 100., 1., 80.) ); satProtectionThreshold->setAdjusterListener(this); satProtectionThreshold->set_sensitive(false); - pack_start( *satProtectionThreshold, Gtk::PACK_SHRINK, 2); + p1VBox->pack_start( *satProtectionThreshold, Gtk::PACK_SHRINK, 2); - saturatedOpacity = Gtk::manage( new Adjuster(M("TP_COLORTONING_SATURATEDOPACITY"), 0., 100., 1., 50.) );; + saturatedOpacity = Gtk::manage( new Adjuster(M("TP_COLORTONING_SATURATEDOPACITY"), 0., 100., 1., 30.) );; saturatedOpacity->setAdjusterListener(this); saturatedOpacity->set_sensitive(false); - pack_start( *saturatedOpacity, Gtk::PACK_SHRINK, 2); //I have moved after Chanmixer + p1VBox->pack_start( *saturatedOpacity, Gtk::PACK_SHRINK, 2); //I have moved after Chanmixer + p1Frame->add(*p1VBox); + pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); - strengthprotection = Gtk::manage( new Adjuster(M("TP_COLORTONING_STRPROTECT"), 0., 100., 1., 50.) );; - strengthprotection->setAdjusterListener(this); + strength = Gtk::manage( new Adjuster(M("TP_COLORTONING_STR"), 0., 100., 1., 50.) );; + strength->setAdjusterListener(this); - //pack_start( *strengthprotection, Gtk::PACK_SHRINK, 2); //I have moved after Chanmixer // --------------------Sliders BW Colortoning ------------------- @@ -294,7 +295,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this) chanMixerBox->pack_start(*chanMixerShadowsFrame, Gtk::PACK_SHRINK); pack_start(*chanMixerBox, Gtk::PACK_SHRINK); - pack_start( *strengthprotection, Gtk::PACK_SHRINK, 2); //I have moved after Chanmixer + pack_start( *strength, Gtk::PACK_SHRINK, 2); //I have moved after Chanmixer //--------------------- Reset sliders --------------------------- neutrHBox = Gtk::manage (new Gtk::HBox ()); @@ -319,15 +320,10 @@ ColorToning::ColorToning () : FoldableToolPanel(this) pack_start (*lumamode); - //splitSep = Gtk::manage (new Gtk::HSeparator()); - - //pack_start (*splitSep); redlow->setAdjusterListener (this); greenlow->setAdjusterListener (this); bluelow->setAdjusterListener (this); - //satlow->setAdjusterListener (this); - //sathigh->setAdjusterListener (this); balance->setAdjusterListener (this); redmed->setAdjusterListener (this); greenmed->setAdjusterListener (this); @@ -350,6 +346,7 @@ ColorToning::~ColorToning() { delete cl2CurveEditorG; } +/* void ColorToning::neutralCurves_pressed () { disableListener(); @@ -364,6 +361,7 @@ void ColorToning::neutralCurves_pressed () { if (listener && enabled->get_active() && changed) listener->panelChanged (EvColorToningNeutralcur, M("ADJUSTER_RESET_TO_DEFAULT")); } +*/ // Will only reset the chanel mixer void ColorToning::neutral_pressed () { @@ -377,8 +375,6 @@ void ColorToning::neutral_pressed () { redhigh->resetValue(false); greenhigh->resetValue(false); bluehigh->resetValue(false); - //satlow->resetValue(false); - //sathigh->resetValue(false); //balance->resetValue(false); enableListener(); @@ -400,8 +396,6 @@ void ColorToning::read (const ProcParams* pp, const ParamsEdited* pedited) redlow->setEditedState (pedited->colorToning.redlow ? Edited : UnEdited); greenlow->setEditedState (pedited->colorToning.greenlow ? Edited : UnEdited); bluelow->setEditedState (pedited->colorToning.bluelow ? Edited : UnEdited); - //satlow->setEditedState (pedited->colorToning.satlow ? Edited : UnEdited); - //sathigh->setEditedState (pedited->colorToning.sathigh ? Edited : UnEdited); balance->setEditedState (pedited->colorToning.balance ? Edited : UnEdited); redmed->setEditedState (pedited->colorToning.redmed ? Edited : UnEdited); greenmed->setEditedState (pedited->colorToning.greenmed ? Edited : UnEdited); @@ -424,8 +418,6 @@ void ColorToning::read (const ProcParams* pp, const ParamsEdited* pedited) redlow->setValue (pp->colorToning.redlow); greenlow->setValue (pp->colorToning.greenlow); bluelow->setValue (pp->colorToning.bluelow); - //satlow->setValue (pp->colorToning.satlow); - //sathigh->setValue (pp->colorToning.sathigh); balance->setValue (pp->colorToning.balance); redmed->setValue (pp->colorToning.redmed); greenmed->setValue (pp->colorToning.greenmed); @@ -448,7 +440,7 @@ void ColorToning::read (const ProcParams* pp, const ParamsEdited* pedited) saturatedOpacity->setValue (pp->colorToning.saturatedOpacity); hlColSat->setValue (pp->colorToning.hlColSat); shadowsColSat->setValue (pp->colorToning.shadowsColSat); - strengthprotection->setValue (pp->colorToning.strengthprotection); + strength->setValue (pp->colorToning.strength); lumamodeConn.block (true); lumamode->set_active (pp->colorToning.lumamode); lumamodeConn.block (false); @@ -463,12 +455,8 @@ void ColorToning::read (const ProcParams* pp, const ParamsEdited* pedited) method->set_active (1); else if (pp->colorToning.method=="RGBCurves") method->set_active (2); - //else if (pp->colorToning.method=="Split") - // method->set_active (1); else if (pp->colorToning.method=="Splitco") method->set_active (3); - // else if (pp->colorToning.method=="Splitbal") - // method->set_active (5); else if (pp->colorToning.method=="Splitlr") method->set_active (4); methodChanged(); @@ -497,8 +485,6 @@ void ColorToning::write (ProcParams* pp, ParamsEdited* pedited) { pp->colorToning.redlow = redlow->getValue (); pp->colorToning.greenlow = greenlow->getValue (); pp->colorToning.bluelow = bluelow->getValue (); - //pp->colorToning.satlow = satlow->getValue (); - //pp->colorToning.sathigh = sathigh->getValue (); pp->colorToning.balance = balance->getIntValue (); pp->colorToning.redmed = redmed->getValue (); pp->colorToning.greenmed = greenmed->getValue (); @@ -519,14 +505,12 @@ void ColorToning::write (ProcParams* pp, ParamsEdited* pedited) { pp->colorToning.autosat = autosat->get_active(); pp->colorToning.satProtectionThreshold = satProtectionThreshold->getIntValue(); pp->colorToning.saturatedOpacity = saturatedOpacity->getIntValue(); - pp->colorToning.strengthprotection = strengthprotection->getIntValue(); + pp->colorToning.strength = strength->getIntValue(); if (pedited) { pedited->colorToning.redlow = redlow->getEditedState (); pedited->colorToning.greenlow = greenlow->getEditedState (); pedited->colorToning.bluelow = bluelow->getEditedState (); - //pedited->colorToning.satlow = satlow->getEditedState (); - //pedited->colorToning.sathigh = sathigh->getEditedState (); pedited->colorToning.balance = balance->getEditedState (); pedited->colorToning.redmed = redmed->getEditedState (); pedited->colorToning.greenmed = greenmed->getEditedState (); @@ -548,22 +532,15 @@ void ColorToning::write (ProcParams* pp, ParamsEdited* pedited) { pedited->colorToning.hlColSat = hlColSat->getEditedState (); pedited->colorToning.shadowsColSat = shadowsColSat->getEditedState (); } -// if (pedited) { -// pedited->colorToning.method = method->get_active_row_number()!=6; -// } if (method->get_active_row_number()==0) pp->colorToning.method = "Lab"; -// else if (method->get_active_row_number()==1) -// pp->colorToning.method = "Split"; else if (method->get_active_row_number()==1) pp->colorToning.method = "RGBSliders"; else if (method->get_active_row_number()==2) pp->colorToning.method = "RGBCurves"; else if (method->get_active_row_number()==3) pp->colorToning.method = "Splitco"; -// else if (method->get_active_row_number()==5) -// pp->colorToning.method = "Splitbal"; else if (method->get_active_row_number()==4) pp->colorToning.method = "Splitlr"; @@ -605,8 +582,6 @@ void ColorToning::setDefaults (const ProcParams* defParams, const ParamsEdited* redlow->setDefault (defParams->colorToning.redlow); greenlow->setDefault (defParams->colorToning.greenlow); bluelow->setDefault (defParams->colorToning.bluelow); - //satlow->setDefault (defParams->colorToning.satlow); - //sathigh->setDefault (defParams->colorToning.sathigh); balance->setDefault (defParams->colorToning.balance); redmed->setDefault (defParams->colorToning.redmed); greenmed->setDefault (defParams->colorToning.greenmed); @@ -618,14 +593,12 @@ void ColorToning::setDefaults (const ProcParams* defParams, const ParamsEdited* saturatedOpacity->setDefault (defParams->colorToning.saturatedOpacity); hlColSat->setDefault (defParams->colorToning.hlColSat); shadowsColSat->setDefault (defParams->colorToning.shadowsColSat); - strengthprotection->setDefault (defParams->colorToning.strengthprotection); + strength->setDefault (defParams->colorToning.strength); if (pedited) { redlow->setDefaultEditedState (pedited->colorToning.redlow ? Edited : UnEdited); greenlow->setDefaultEditedState (pedited->colorToning.greenlow ? Edited : UnEdited); bluelow->setDefaultEditedState (pedited->colorToning.bluelow ? Edited : UnEdited); - //satlow->setDefaultEditedState (pedited->colorToning.satlow ? Edited : UnEdited); - //sathigh->setDefaultEditedState (pedited->colorToning.sathigh ? Edited : UnEdited); balance->setDefaultEditedState (pedited->colorToning.balance ? Edited : UnEdited); redmed->setDefaultEditedState (pedited->colorToning.redmed ? Edited : UnEdited); greenmed->setDefaultEditedState (pedited->colorToning.greenmed ? Edited : UnEdited); @@ -633,18 +606,16 @@ void ColorToning::setDefaults (const ProcParams* defParams, const ParamsEdited* redhigh->setDefaultEditedState (pedited->colorToning.redhigh ? Edited : UnEdited); greenhigh->setDefaultEditedState (pedited->colorToning.greenhigh ? Edited : UnEdited); bluehigh->setDefaultEditedState (pedited->colorToning.bluehigh ? Edited : UnEdited); - satProtectionThreshold->setDefaultEditedState (pedited->colorToning.satProtectionThreshold ? Edited : UnEdited); - saturatedOpacity->setDefaultEditedState (pedited->colorToning.saturatedOpacity ? Edited : UnEdited); + satProtectionThreshold->setDefaultEditedState (pedited->colorToning.satprotectionthreshold ? Edited : UnEdited); + saturatedOpacity->setDefaultEditedState (pedited->colorToning.saturatedopacity ? Edited : UnEdited); hlColSat->setDefaultEditedState (pedited->colorToning.hlColSat ? Edited : UnEdited); shadowsColSat->setDefaultEditedState (pedited->colorToning.shadowsColSat ? Edited : UnEdited); - strengthprotection->setDefaultEditedState (pedited->colorToning.strengthprotection ? Edited : UnEdited); + strength->setDefaultEditedState (pedited->colorToning.strength ? Edited : UnEdited); } else { redlow->setDefaultEditedState (Irrelevant); greenlow->setDefaultEditedState (Irrelevant); bluelow->setDefaultEditedState (Irrelevant); - //satlow->setDefaultEditedState (Irrelevant); - //sathigh->setDefaultEditedState (Irrelevant); balance->setDefaultEditedState (Irrelevant); redmed->setDefaultEditedState (Irrelevant); greenmed->setDefaultEditedState (Irrelevant); @@ -656,7 +627,7 @@ void ColorToning::setDefaults (const ProcParams* defParams, const ParamsEdited* saturatedOpacity->setDefaultEditedState (Irrelevant); hlColSat->setDefaultEditedState (Irrelevant); shadowsColSat->setDefaultEditedState (Irrelevant); - strengthprotection->setDefaultEditedState (Irrelevant); + strength->setDefaultEditedState (Irrelevant); } } @@ -664,8 +635,6 @@ void ColorToning::setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool redlow->setAddMode(splitAdd); greenlow->setAddMode(splitAdd); bluelow->setAddMode(splitAdd); - //satlow->setAddMode(splitAdd); - //sathigh->setAddMode(splitAdd); balance->setAddMode(splitAdd); redmed->setAddMode(splitAdd); greenmed->setAddMode(splitAdd); @@ -676,7 +645,7 @@ void ColorToning::setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool satProtectionThreshold->setAddMode(satThresholdAdd); saturatedOpacity->setAddMode(satOpacityAdd); balance->setAddMode(balanceAdd); - strengthprotection->setAddMode(strprotectAdd); + strength->setAddMode(strprotectAdd); } @@ -705,7 +674,7 @@ bool ColorToning::CTComp_ () { disableListener (); saturatedOpacity->setValue (nextsatpr); satProtectionThreshold->setValue (nextsatth); - if(nextbw==1) { +/* if(nextbw==1) { saturatedOpacity->show(); satProtectionThreshold->show(); autosat->show(); @@ -715,7 +684,7 @@ bool ColorToning::CTComp_ () { satProtectionThreshold->hide(); autosat->hide(); } - +*/ enableListener (); return false; @@ -746,19 +715,13 @@ void ColorToning::adjusterChanged (Adjuster* a, double newval) { listener->panelChanged (EvColorToningbluehigh, bluehigh->getTextValue()); else if (a==balance) listener->panelChanged (EvColorToningbalance, balance->getTextValue()); - /*else if (a==satlow) - listener->panelChanged (EvColorToningsatlow, satlow->getTextValue()); - else if (a==sathigh) - listener->panelChanged (EvColorToningsatlow, sathigh->getTextValue());*/ else if (a==satProtectionThreshold) listener->panelChanged (EvColorToningSatThreshold, a->getTextValue()); else if (a==saturatedOpacity) listener->panelChanged (EvColorToningSatProtection, a->getTextValue()); - else if (a==strengthprotection) - listener->panelChanged (EvColorToningStrProtection, a->getTextValue()); - - - } + else if (a==strength) + listener->panelChanged (EvColorToningStrength, a->getTextValue()); +} //Two Color changed void ColorToning::twocolorChanged (bool changedbymethod) { @@ -832,15 +795,27 @@ void ColorToning::methodChanged () { opacityCurveEditorG->hide(); clCurveEditorG->hide(); cl2CurveEditorG->hide(); - neutralCurvesHBox->show(); + //neutralCurves->show(); hlColSat->hide(); shadowsColSat->hide(); balance->hide(); - satLimiterSep->show(); +// satLimiterSep->show(); + if(autosat->get_active()) { + saturatedOpacity->set_sensitive(false); + satProtectionThreshold->set_sensitive(false); + satProtectionThreshold->show(); + saturatedOpacity->show(); + } + else { satProtectionThreshold->show(); saturatedOpacity->show(); - - strengthprotection->hide(); + saturatedOpacity->set_sensitive(true); + satProtectionThreshold->set_sensitive(true); + } + autosat->show(); + p1Frame->show(); + + strength->hide(); chanMixerBox->hide(); neutrHBox->hide(); lumamode->hide(); @@ -860,21 +835,31 @@ void ColorToning::methodChanged () { opacityCurveEditorG->hide(); clCurveEditorG->hide(); cl2CurveEditorG->hide(); - neutralCurvesHBox->hide(); + //neutralCurves->hide(); hlColSat->show(); shadowsColSat->show(); balance->show(); - satLimiterSep->show(); +// satLimiterSep->show(); + autosat->show(); + p1Frame->show(); + if(autosat->get_active()) { + saturatedOpacity->set_sensitive(false); + satProtectionThreshold->set_sensitive(false); + satProtectionThreshold->show(); + saturatedOpacity->show(); + } + else { satProtectionThreshold->show(); saturatedOpacity->show(); - strengthprotection->hide(); + saturatedOpacity->set_sensitive(true); + satProtectionThreshold->set_sensitive(true); + } + + strength->hide(); chanMixerBox->hide(); neutrHBox->hide(); lumamode->hide(); - //splitSep->hide(); - //satlow->hide(); - //sathigh->hide(); } else if (method->get_active_row_number()==2) { // RGB Curves colorSep->hide(); @@ -886,20 +871,30 @@ void ColorToning::methodChanged () { opacityCurveEditorG->show(); clCurveEditorG->hide(); cl2CurveEditorG->hide(); - neutralCurvesHBox->show(); + //neutralCurves->show(); hlColSat->hide(); shadowsColSat->hide(); balance->hide(); - satLimiterSep->show(); +// satLimiterSep->show(); + p1Frame->show(); + + autosat->show(); + if(autosat->get_active()) { + saturatedOpacity->set_sensitive(false); + satProtectionThreshold->set_sensitive(false); + satProtectionThreshold->show(); + saturatedOpacity->show(); + } + else { satProtectionThreshold->show(); saturatedOpacity->show(); - strengthprotection->hide(); + saturatedOpacity->set_sensitive(true); + satProtectionThreshold->set_sensitive(true); + } + strength->hide(); chanMixerBox->hide(); neutrHBox->hide(); lumamode->hide(); - //splitSep->hide(); - //satlow->hide(); - //sathigh->hide(); } else if (method->get_active_row_number()==3) { // Split LR colorSep->hide(); @@ -911,20 +906,20 @@ void ColorToning::methodChanged () { opacityCurveEditorG->hide(); clCurveEditorG->hide(); cl2CurveEditorG->hide(); - neutralCurvesHBox->hide(); + //neutralCurves->hide(); hlColSat->hide(); shadowsColSat->hide(); balance->hide(); - satLimiterSep->hide(); + p1Frame->hide(); + +// satLimiterSep->hide(); + autosat->hide(); satProtectionThreshold->hide(); saturatedOpacity->hide(); - strengthprotection->show(); + strength->show(); chanMixerBox->show(); neutrHBox->show(); lumamode->show(); - //splitSep->show(); - //satlow->hide(); - //sathigh->hide(); } else if (method->get_active_row_number()==4) { // Split Color colorSep->show(); @@ -935,21 +930,21 @@ void ColorToning::methodChanged () { opacityCurveEditorG->hide(); clCurveEditorG->hide(); cl2CurveEditorG->hide(); - neutralCurvesHBox->hide(); + //neutralCurves->hide(); hlColSat->show(); shadowsColSat->show(); balance->show(); - satLimiterSep->hide(); +// satLimiterSep->hide(); + p1Frame->hide(); + + autosat->hide(); satProtectionThreshold->hide(); saturatedOpacity->hide(); - strengthprotection->show(); + strength->show(); chanMixerBox->hide(); neutrHBox->hide(); lumamode->show(); - //splitSep->hide(); - //satlow->show(); - //sathigh->show(); } } @@ -1083,8 +1078,6 @@ void ColorToning::trimValues (rtengine::procparams::ProcParams* pp) { redlow->trimValue(pp->colorToning.redlow); greenlow->trimValue(pp->colorToning.greenlow); bluelow->trimValue(pp->colorToning.bluelow); - //satlow->trimValue(pp->colorToning.satlow); - //sathigh->trimValue(pp->colorToning.sathigh); balance->trimValue(pp->colorToning.balance); redmed->trimValue(pp->colorToning.redmed); greenmed->trimValue(pp->colorToning.greenmed); @@ -1104,8 +1097,6 @@ void ColorToning::setBatchMode (bool batchMode) redlow->showEditedCB (); greenlow->showEditedCB (); bluelow->showEditedCB (); - //satlow->showEditedCB (); - //sathigh->showEditedCB (); balance->showEditedCB (); redmed->showEditedCB (); greenmed->showEditedCB (); diff --git a/rtgui/colortoning.h b/rtgui/colortoning.h index 7de412b44..83f46b1c6 100644 --- a/rtgui/colortoning.h +++ b/rtgui/colortoning.h @@ -30,6 +30,7 @@ class ColorToning : public ToolParamBlock, public FoldableToolPanel, public rte DiagonalCurveEditor* clshape; DiagonalCurveEditor* cl2shape; Gtk::HBox* ctbox; + Gtk::Frame *p1Frame; Gtk::VBox* chanMixerBox; MyComboBoxText* method; @@ -45,22 +46,19 @@ class ColorToning : public ToolParamBlock, public FoldableToolPanel, public rte Adjuster* greenhigh; Adjuster* bluehigh; Adjuster* balance; - //Adjuster* satlow; - //Adjuster* sathigh; Gtk::CheckButton* autosat; ThresholdAdjuster* shadowsColSat; ThresholdAdjuster* hlColSat; Adjuster* satProtectionThreshold; Adjuster* saturatedOpacity; - Adjuster* strengthprotection; + Adjuster* strength; Gtk::Image* itot; Gtk::Image* iby; Gtk::Image* irg; Gtk::Button* neutral; - Gtk::Button* neutralCurves; + //Gtk::Button* neutralCurves; Gtk::HBox* neutrHBox; - Gtk::HBox* neutralCurvesHBox; Gtk::HBox* chromaHbox; Gtk::Label* colLabel; Gtk::Label* interLabel; @@ -68,14 +66,12 @@ class ColorToning : public ToolParamBlock, public FoldableToolPanel, public rte int nextbw; int nextsatth; int nextsatpr; - Glib::ustring labchroma1; - Glib::ustring labchroma2; Glib::ustring nextbalcolor; Glib::ustring balcolor; bool lastEnabled; sigc::connection enaConn; bool lasttwocolor; - sigc::connection neutralconn, twocconn, neutralcurvesconn; + sigc::connection neutralconn, twocconn; //, neutralcurvesconn; bool lastautosat; sigc::connection autosatConn; @@ -95,7 +91,7 @@ class ColorToning : public ToolParamBlock, public FoldableToolPanel, public rte void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop); void setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool satOpacityAdd, bool strprotectAdd, bool balanceAdd); void neutral_pressed (); - void neutralCurves_pressed (); + //void neutralCurves_pressed (); void autoColorTonChanged (int bwct, int satthres, int satprot); bool CTComp_ (); diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index bf0105f5c..e42738f12 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -185,7 +185,6 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this), iunchanged(NULL), icmplistener( Gtk::Frame* fgFrame = Gtk::manage (new Gtk::Frame ()); Gtk::VBox *fgVBox = Gtk::manage ( new Gtk::VBox()); - fgVBox->set_border_width(4); fgVBox->set_spacing(0); freegamma = Gtk::manage(new Gtk::CheckButton((M("TP_GAMMA_FREE")))); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 2c60b6da2..6aee8c56c 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -71,9 +71,9 @@ void ParamsEdited::set (bool v) { colorToning.autosat = v; colorToning.opacityCurve = v; colorToning.colorCurve = v; - colorToning.satProtectionThreshold = v; - colorToning.saturatedOpacity = v; - colorToning.strengthprotection = v; + colorToning.satprotectionthreshold = v; + colorToning.saturatedopacity = v; + colorToning.strength = v; colorToning.shadowsColSat = v; colorToning.hlColSat = v; colorToning.balance = v; @@ -402,9 +402,9 @@ void ParamsEdited::initFrom (const std::vector colorToning.opacityCurve = colorToning.opacityCurve && p.colorToning.opacityCurve == other.colorToning.opacityCurve; colorToning.colorCurve = colorToning.colorCurve && p.colorToning.colorCurve == other.colorToning.colorCurve; colorToning.autosat = colorToning.autosat && p.colorToning.autosat == other.colorToning.autosat; - colorToning.satProtectionThreshold = colorToning.satProtectionThreshold && p.colorToning.satProtectionThreshold == other.colorToning.satProtectionThreshold; - colorToning.saturatedOpacity = colorToning.saturatedOpacity && p.colorToning.saturatedOpacity == other.colorToning.saturatedOpacity; - colorToning.strengthprotection = colorToning.strengthprotection && p.colorToning.strengthprotection == other.colorToning.strengthprotection; + colorToning.satprotectionthreshold = colorToning.satprotectionthreshold && p.colorToning.satProtectionThreshold == other.colorToning.satProtectionThreshold; + colorToning.saturatedopacity = colorToning.saturatedopacity && p.colorToning.saturatedOpacity == other.colorToning.saturatedOpacity; + colorToning.strength = colorToning.strength && p.colorToning.strength == other.colorToning.strength; colorToning.shadowsColSat = colorToning.shadowsColSat && p.colorToning.shadowsColSat == other.colorToning.shadowsColSat; colorToning.hlColSat = colorToning.hlColSat && p.colorToning.hlColSat == other.colorToning.hlColSat; colorToning.balance = colorToning.balance && p.colorToning.balance == other.colorToning.balance; @@ -732,10 +732,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorToning.enabled) toEdit.colorToning.enabled = mods.colorToning.enabled; if (colorToning.opacityCurve) toEdit.colorToning.opacityCurve = mods.colorToning.opacityCurve; if (colorToning.colorCurve) toEdit.colorToning.colorCurve = mods.colorToning.colorCurve; - if (colorToning.satProtectionThreshold) toEdit.colorToning.satProtectionThreshold = dontforceSet && options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD] ? toEdit.colorToning.satProtectionThreshold + mods.colorToning.satProtectionThreshold : mods.colorToning.satProtectionThreshold; - if (colorToning.autosat) toEdit.colorToning.autosat = mods.colorToning.autosat; - if (colorToning.saturatedOpacity) toEdit.colorToning.saturatedOpacity = dontforceSet && options.baBehav[ADDSET_COLORTONING_SATOPACITY] ? toEdit.colorToning.saturatedOpacity + mods.colorToning.saturatedOpacity : mods.colorToning.saturatedOpacity; - if (colorToning.strengthprotection) toEdit.colorToning.strengthprotection = dontforceSet && options.baBehav[ADDSET_COLORTONING_STRPROTECT] ? toEdit.colorToning.strengthprotection + mods.colorToning.strengthprotection: mods.colorToning.strengthprotection; + if (colorToning.satprotectionthreshold) toEdit.colorToning.satProtectionThreshold = dontforceSet && options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD] ? toEdit.colorToning.satProtectionThreshold + mods.colorToning.satProtectionThreshold : mods.colorToning.satProtectionThreshold; + if (colorToning.autosat) toEdit.colorToning.autosat = mods.colorToning.autosat; + if (colorToning.saturatedopacity) toEdit.colorToning.saturatedOpacity = dontforceSet && options.baBehav[ADDSET_COLORTONING_SATOPACITY] ? toEdit.colorToning.saturatedOpacity + mods.colorToning.saturatedOpacity : mods.colorToning.saturatedOpacity; + if (colorToning.strength) toEdit.colorToning.strength = dontforceSet && options.baBehav[ADDSET_COLORTONING_STRENGTH] ? toEdit.colorToning.strength + mods.colorToning.strength: mods.colorToning.strength; if (colorToning.shadowsColSat) toEdit.colorToning.shadowsColSat = mods.colorToning.shadowsColSat; if (colorToning.hlColSat) toEdit.colorToning.hlColSat = mods.colorToning.hlColSat; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index e2fbe40de..4fb6c6617 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -51,7 +51,6 @@ class ToneCurveParamsEdited { bool expcomp; bool hrenabled; bool method; - }; class LCurveParamsEdited { @@ -72,10 +71,9 @@ class LCurveParamsEdited { bool hhcurve; bool lccurve; bool clcurve; - + bool enabled; bool method; - }; class RGBCurvesParamsEdited { @@ -95,10 +93,10 @@ class ColorToningEdited { bool colorCurve; bool clcurve; bool method; - bool autosat; - bool satProtectionThreshold; - bool saturatedOpacity; - bool strengthprotection; + bool autosat; + bool satprotectionthreshold; + bool saturatedopacity; + bool strength; bool shadowsColSat; bool hlColSat; bool balance; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index c58da0df9..36e948847 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -252,7 +252,7 @@ Gtk::Widget* Preferences::getBatchProcPanel () { appendBehavList (mi, M("TP_COLORTONING_SATURATIONTHRESHOLD"),ADDSET_COLORTONING_SATTHRESHOLD , true); appendBehavList (mi, M("TP_COLORTONING_SATURATEDOPACITY"),ADDSET_COLORTONING_SATOPACITY , true); appendBehavList (mi, M("TP_COLORTONING_BALANCE"),ADDSET_COLORTONING_BALANCE , true); - appendBehavList (mi, M("TP_COLORTONING_STRPROTECT"),ADDSET_COLORTONING_STRPROTECT , true); + appendBehavList (mi, M("TP_COLORTONING_STRENGTH"),ADDSET_COLORTONING_STRENGTH , true); mi = behModel->append (); mi->set_value (behavColumns.label, M("TP_ROTATE_LABEL"));