From 5affa18341d732b4821ca49e7f4afcedbe4d3be6 Mon Sep 17 00:00:00 2001 From: Hombre Date: Wed, 24 Aug 2016 22:32:06 +0200 Subject: [PATCH 001/115] Introducting soft-proofing and Black Point Compensation, simplify the CMM at the end of the pipeline + sparse code refactoring A new BPC checkbutton has been created in 'Preferences/Color Management' and in the ICM tool. Better hanbling of widget sensitivity of the output profile / gamma part of the ICM tool. --- rtdata/languages/Francais | 6 + rtdata/languages/default | 6 + rtengine/dcrop.cc | 18 +- rtengine/dcrop.h | 2 +- rtengine/iccstore.cc | 336 ++++++++++++++++++++++- rtengine/iccstore.h | 12 +- rtengine/image16.cc | 33 ++- rtengine/image16.h | 2 +- rtengine/improccoordinator.cc | 36 +-- rtengine/improccoordinator.h | 9 +- rtengine/improcfun.cc | 80 ++++-- rtengine/improcfun.h | 7 +- rtengine/iplab2rgb.cc | 492 ++++++++++------------------------ rtengine/procevents.h | 1 + rtengine/procparams.cc | 13 + rtengine/procparams.h | 1 + rtengine/refreshmap.cc | 21 +- rtengine/refreshmap.h | 6 +- rtengine/rtengine.h | 2 + rtengine/rtthumbnail.cc | 2 +- rtengine/settings.h | 1 + rtengine/simpleprocess.cc | 233 ++-------------- rtgui/editorpanel.cc | 75 +++++- rtgui/editorpanel.h | 4 +- rtgui/filecatalog.cc | 1 + rtgui/icmpanel.cc | 152 +++++++++-- rtgui/icmpanel.h | 4 + rtgui/options.cc | 13 + rtgui/options.h | 1 + rtgui/paramsedited.cc | 8 +- rtgui/paramsedited.h | 1 + rtgui/preferences.cc | 21 +- rtgui/preferences.h | 1 + tools/color_management.svg | 430 +++++++++++++++++++++++++++++ 34 files changed, 1321 insertions(+), 709 deletions(-) create mode 100644 tools/color_management.svg diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index d35371458..139584785 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -632,6 +632,7 @@ HISTORY_MSG_403;O - NB - Sensibilité des bords HISTORY_MSG_404;O - NB - Base amplification HISTORY_MSG_405;O - Débruitage - Niveau 4 HISTORY_MSG_406;O - NB - Pixels voisins +HISTORY_MSG_443;Compensation du Point Noir de Sortie HISTORY_NEWSNAPSHOT;Ajouter HISTORY_NEWSNAPSHOT_TOOLTIP;Raccourci: Alt-s HISTORY_SNAPSHOT;Capture @@ -953,6 +954,7 @@ PREFERENCES_MENUGROUPPROFILEOPERATIONS;Opérations sur les profils PREFERENCES_MENUGROUPRANK;Classement PREFERENCES_MENUOPTIONS;Options du menu PREFERENCES_METADATA;Metadonnées +PREFERENCES_MONBPC;Compensation du Point Noir pour la transformation L*a*b*->Moniteur PREFERENCES_MIN;Mini (100x115) PREFERENCES_MULTITAB;Éditeurs multiple PREFERENCES_MULTITABDUALMON;Éditeurs multiple, si possible sur un second moniteur @@ -1082,6 +1084,8 @@ SAVEDLG_SUBSAMP_3;Meilleure qualité SAVEDLG_TIFFUNCOMPRESSED;TIFF non compressé SAVEDLG_WARNFILENAME;Le fichier sera nommé SHCSELECTOR_TOOLTIP;Cliquez le bouton droit de la souris\npour réinitialiser la position de ces 3 curseurs +SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profile de sortie +SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profiles de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante. THRESHOLDSELECTOR_B;Bas THRESHOLDSELECTOR_BL;Bas-gauche THRESHOLDSELECTOR_BR;Bas-droite @@ -1462,6 +1466,8 @@ TP_ICM_APPLYLOOKTABLE;Table de recherche TP_ICM_APPLYLOOKTABLE_TOOLTIP;Utilise la table de recherche (LUT) contenu dans le profil DCP. Ce réglage n'est possible que si le profil DCP sélectionné en contient une. TP_ICM_BLENDCMSMATRIX;Mélange des hautes lumières\ndu profil ICC avec la matrice TP_ICM_BLENDCMSMATRIX_TOOLTIP;Activer la récupération des zones brûlées lorsque les profils ICC basés sur la LUT sont utilisés +TP_ICM_BPC;Compensation du Point Noir +TP_ICM_BPC_TOOLTIP;Activez ceci pour faire correspondre le canal Luminosité à l'espace couleur de sortie avec un Point Blanc fixe TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolé TP_ICM_DCPILLUMINANT_TOOLTIP;Sélectionne quel illuminant DCP inclus utiliser. La valeur par défaut est "Interpolé", qui est un mix entre les 2 profils inclus basé sur la Balance des Blancs choisie. Ce paramètre n'est actif que si un fichier DCP Bi-Illuminant avec support de l'interpolation est choisi. diff --git a/rtdata/languages/default b/rtdata/languages/default index 5998c585d..fa324db86 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -672,6 +672,7 @@ HISTORY_MSG_439;Retinex - Process HISTORY_MSG_440;CbDL - Method HISTORY_MSG_441;Retinex - Gain transmission HISTORY_MSG_442;Retinex - Scale +HISTORY_MSG_443;Output Black Point Compensation HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -998,6 +999,7 @@ PREFERENCES_MENUGROUPRANK;Group "Rank" PREFERENCES_MENUOPTIONS;Context Menu Options PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Mini (100x115) +PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform PREFERENCES_MONINTENT;Default monitor intent PREFERENCES_MONPROFILE;Default monitor profile PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1133,6 +1135,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved h SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF SAVEDLG_WARNFILENAME;File will be named SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. THRESHOLDSELECTOR_B;Bottom THRESHOLDSELECTOR_BL;Bottom-left THRESHOLDSELECTOR_BR;Bottom-right @@ -1519,6 +1523,8 @@ TP_ICM_APPLYLOOKTABLE;Look table TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +TP_ICM_BPC;Black Point Compensation +TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 577a3f4a6..129f44de8 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -989,24 +989,14 @@ void Crop::update (int todo) // all pipette buffer processing should be finished now PipetteBuffer::setReady(); - // switch back to rgb + // Computing the preview image, i.e. converting from lab->Monitor color space (soft-proofing disabled) or lab->Output profile->Monitor color space (soft-proofing enabled) parent->ipf.lab2monitorRgb (labnCrop, cropImg); if (cropImageListener) { - // this in output space held in parallel to allow analysis like shadow/highlight - Glib::ustring outProfile = params.icm.output; - Glib::ustring workProfile = params.icm.working; - Image8 *cropImgtrue; + // Computing the internal image for analysis, i.e. conversion from lab->Output profile (rtSettings.HistogramWorking disabled) or lab->WCS (rtSettings.HistogramWorking enabled) - if(settings->HistogramWorking) { - cropImgtrue = parent->ipf.lab2rgb (labnCrop, 0, 0, cropw, croph, workProfile, RI_RELATIVE, false); // HOMBRE: was RELATIVE by default in lab2rgb, is it safe to assume we have to use it again ? - } else { - if (params.icm.output == "" || params.icm.output == ColorManagementParams::NoICMString) { - outProfile = "sRGB"; - } - - cropImgtrue = parent->ipf.lab2rgb (labnCrop, 0, 0, cropw, croph, outProfile, params.icm.outputIntent, false); - } + // internal image in output color space for analysis + Image8 *cropImgtrue = parent->ipf.lab2rgb (labnCrop, 0, 0, cropw, croph, params.icm); int finalW = rqcropw; diff --git a/rtengine/dcrop.h b/rtengine/dcrop.h index f1230bf01..450c659f0 100644 --- a/rtengine/dcrop.h +++ b/rtengine/dcrop.h @@ -44,7 +44,7 @@ protected: Imagefloat* origCrop; // "one chunk" allocation LabImage* laboCrop; // "one chunk" allocation LabImage* labnCrop; // "one chunk" allocation - Image8* cropImg; // "one chunk" allocation + Image8* cropImg; // "one chunk" allocation ; displayed image in monitor color space, showing the output profile as well (soft-proofing enabled, which then correspond to workimg) or not float * cbuf_real; // "one chunk" allocation SHMap* cshmap; // per line allocation diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 82f280e54..14b5dbc3c 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -32,12 +32,13 @@ #include "../rtgui/options.h" -namespace +namespace rtengine { +extern const Settings* settings; void loadProfiles (const Glib::ustring& dirName, std::map* profiles, - std::map* profileContents, + std::map* profileContents, std::map* profileNames, bool nameUpper, bool onlyRgb) { @@ -76,7 +77,7 @@ void loadProfiles (const Glib::ustring& dirName, } if (profiles) { - const rtengine::ProfileContent content (filePath); + const ProfileContent content (filePath); const cmsHPROFILE profile = content.toProfile (); if (profile && (!onlyRgb || cmsGetColorSpace (profile) == cmsSigRgbData)) { @@ -121,7 +122,7 @@ inline std::uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number di inline cmsHPROFILE createXYZProfile () { double mat[3][3] = { {1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0} }; - return rtengine::ICCStore::createFromMatrix (mat, false, "XYZ"); + return ICCStore::createFromMatrix (mat, false, "XYZ"); } const double (*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020}; @@ -362,6 +363,333 @@ cmsHPROFILE ICCStore::workingSpaceGamma (const Glib::ustring& name) const } } +void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, double *ga) +{ + const double eps = 0.000000001; // not divide by zero + if (!icm.freegamma) {//if Free gamma not selected + // gamma : ga[0],ga[1],ga[2],ga[3],ga[4],ga[5] by calcul + if(icm.gamma == "BT709_g2.2_s4.5") { + ga[0] = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin + ga[1] = 0.909995; + ga[2] = 0.090005; + ga[3] = 0.222222; + ga[4] = 0.081071; + ga[5] = 0.0; + } else if (icm.gamma == "sRGB_g2.4_s12.92") { + ga[0] = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom + ga[1] = 0.947858; + ga[2] = 0.052142; + ga[3] = 0.077399; + ga[4] = 0.039293; + ga[5] = 0.0; + } else if (icm.gamma == "High_g1.3_s3.35") { + ga[0] = 1.3 ; //for high dynamic images + ga[1] = 0.998279; + ga[2] = 0.001721; + ga[3] = 0.298507; + ga[4] = 0.005746; + ga[5] = 0.0; + } else if (icm.gamma == "Low_g2.6_s6.9") { + ga[0] = 2.6 ; //gamma 2.6 variable : for low contrast images + ga[1] = 0.891161; + ga[2] = 0.108839; + ga[3] = 0.144928; + ga[4] = 0.076332; + ga[5] = 0.0; + } else if (icm.gamma == "linear_g1.0") { + ga[0] = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + ga[5] = 0.0; + } else if (icm.gamma == "standard_g2.2") { + ga[0] = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + ga[5] = 0.0; + } else if (icm.gamma == "standard_g1.8") { + ga[0] = 1.8; //gamma=1.8 (as gamma of Prophoto) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + ga[5] = 0.0; + } + } else { //free gamma selected + double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; //gamma parameters + double pwr = 1.0 / icm.gampos; + double ts = icm.slpos; + double slope = icm.slpos == 0 ? eps : icm.slpos; + + int mode = 0, imax = 0; + Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 + ga[4] = g_a3 * ts; + //printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); + ga[0] = icm.gampos; + ga[1] = 1. / (1.0 + g_a4); + ga[2] = g_a4 / (1.0 + g_a4); + ga[3] = 1. / slope; + ga[5] = 0.0; + //printf("ga[0]=%f ga[1]=%f ga[2]=%f ga[3]=%f ga[4]=%f\n", ga[0],ga[1],ga[2],ga[3],ga[4]); + } +} + +cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, double ga[]) { + float p1, p2, p3, p4, p5, p6; //primaries + ga[6] = 0.0; + int mode = 0, imax = 0; + + int t50; + int select_temp = 1; //5003K + + //primaries for 7 working profiles ==> output profiles + // eventually to adapt primaries if RT used special profiles ! + if (icm.output == "WideGamut") { + p1 = 0.7350; //Widegamut primaries + p2 = 0.2650; + p3 = 0.1150; + p4 = 0.8260; + p5 = 0.1570; + p6 = 0.0180; + select_temp = 1; + } else if (icm.output == "Adobe RGB") { + p1 = 0.6400; //Adobe primaries + p2 = 0.3300; + p3 = 0.2100; + p4 = 0.7100; + p5 = 0.1500; + p6 = 0.0600; + select_temp = 2; + } else if (icm.output == "sRGB") { + p1 = 0.6400; // sRGB primaries + p2 = 0.3300; + p3 = 0.3000; + p4 = 0.6000; + p5 = 0.1500; + p6 = 0.0600; + select_temp = 2; + } else if (icm.output == "BruceRGB") { + p1 = 0.6400; // Bruce primaries + p2 = 0.3300; + p3 = 0.2800; + p4 = 0.6500; + p5 = 0.1500; + p6 = 0.0600; + select_temp = 2; + } else if (icm.output == "Beta RGB") { + p1 = 0.6888; // Beta primaries + p2 = 0.3112; + p3 = 0.1986; + p4 = 0.7551; + p5 = 0.1265; + p6 = 0.0352; + select_temp = 1; + } else if (icm.output == "BestRGB") { + p1 = 0.7347; // Best primaries + p2 = 0.2653; + p3 = 0.2150; + p4 = 0.7750; + p5 = 0.1300; + p6 = 0.0350; + select_temp = 1; + } else if (icm.output == "Rec2020") { + p1 = 0.7080; // Rec2020 primaries + p2 = 0.2920; + p3 = 0.1700; + p4 = 0.7970; + p5 = 0.1310; + p6 = 0.0460; + select_temp = 2; + } else { + p1 = 0.7347; //ProPhoto and default primaries + p2 = 0.2653; + p3 = 0.1596; + p4 = 0.8404; + p5 = 0.0366; + p6 = 0.0001; + select_temp = 1; + } + + if(select_temp == 1) { + t50 = 5003; // for Widegamut, Prophoto Best, Beta -> D50 + } else if (select_temp == 2) { + t50 = 6504; // for sRGB, AdobeRGB, Bruce Rec2020 -> D65 + } + + cmsCIExyY xyD; + cmsCIExyYTRIPLE Primaries = { + {p1, p2, 1.0}, // red + {p3, p4, 1.0}, // green + {p5, p6, 1.0} // blue + }; + cmsToneCurve* GammaTRC[3]; + cmsFloat64Number Parameters[7]; // 7 parameters for smoother curves + Parameters[0] = ga[0]; + Parameters[1] = ga[1]; + Parameters[2] = ga[2]; + Parameters[3] = ga[3]; + Parameters[4] = ga[4]; + Parameters[5] = ga[5]; + Parameters[6] = ga[6]; + + cmsWhitePointFromTemp(&xyD, t50); + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters);//5 = more smoother than 4 + cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile + + cmsFreeToneCurve(GammaTRC[0]); + + return oprofdef; +} + +cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, double ga[]) { + bool pro = false; + Glib::ustring outProfile; + cmsHPROFILE outputProfile = NULL; + + if (icm.freegamma && icm.gampos < 1.35) { + pro = true; //select profil with gammaTRC modified : + } else if (icm.gamma == "linear_g1.0" || (icm.gamma == "High_g1.3_s3.35")) { + pro = true; //pro=0 RT_sRGB || Prophoto + } + + // Check that output profiles exist, otherwise use LCMS2 + // Use the icc/icm profiles associated to possible working profiles, set in "options" + if (icm.working == "ProPhoto" && iccStore->outputProfileExist(options.rtSettings.prophoto) && !pro) { + outProfile = options.rtSettings.prophoto; + } else if (icm.working == "Adobe RGB" && iccStore->outputProfileExist(options.rtSettings.adobe) ) { + outProfile = options.rtSettings.adobe; + } else if (icm.working == "WideGamut" && iccStore->outputProfileExist(options.rtSettings.widegamut) ) { + outProfile = options.rtSettings.widegamut; + } else if (icm.working == "Beta RGB" && iccStore->outputProfileExist(options.rtSettings.beta) ) { + outProfile = options.rtSettings.beta; + } else if (icm.working == "BestRGB" && iccStore->outputProfileExist(options.rtSettings.best) ) { + outProfile = options.rtSettings.best; + } else if (icm.working == "BruceRGB" && iccStore->outputProfileExist(options.rtSettings.bruce) ) { + outProfile = options.rtSettings.bruce; + } else if (icm.working == "sRGB" && iccStore->outputProfileExist(options.rtSettings.srgb) && !pro) { + outProfile = options.rtSettings.srgb; + } else if (icm.working == "sRGB" && iccStore->outputProfileExist(options.rtSettings.srgb10) && pro) { + outProfile = options.rtSettings.srgb10; + } else if (icm.working == "ProPhoto" && iccStore->outputProfileExist(options.rtSettings.prophoto10) && pro) { + outProfile = options.rtSettings.prophoto10; + } else if (icm.working == "Rec2020" && iccStore->outputProfileExist(options.rtSettings.rec2020) ) { + outProfile = options.rtSettings.rec2020; + } else { + // Should not occurs + if (settings->verbose) { + printf("\"%s\": unknown working profile! - use LCMS2 substitution\n", icm.working.c_str() ); + } + + return NULL; + } + + //begin adaptation rTRC gTRC bTRC + //"outputProfile" profile has the same characteristics than RGB values, but TRC are adapted... for applying profile + if (settings->verbose) { + printf("Output Gamma - profile: \"%s\"\n", outProfile.c_str() ); //c_str() + } + + outputProfile = iccStore->getProfile(outProfile); //get output profile + + if (outputProfile == NULL) { + + if (settings->verbose) { + printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); + } + return NULL; + } + + // 7 parameters for smoother curves + cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] }; + + //change desc Tag , to "free gamma", or "BT709", etc. + cmsMLU *mlu; + cmsContext ContextID = cmsGetProfileContextID(outputProfile); // create context to modify some TAGs + mlu = cmsMLUalloc(ContextID, 1); + + // instruction with //ICC are used to generate ICC profile + if (mlu == NULL) { + printf("Description error\n"); + } else { + + // Description TAG : selection of gamma and Primaries + if (!icm.freegamma) { + std::wstring gammaStr; + + if(icm.gamma == "High_g1.3_s3.35") { + gammaStr = std::wstring(L"GammaTRC: High g=1.3 s=3.35"); + } else if (icm.gamma == "Low_g2.6_s6.9") { + gammaStr = std::wstring(L"GammaTRC: Low g=2.6 s=6.9"); + } else if (icm.gamma == "sRGB_g2.4_s12.92") { + gammaStr = std::wstring(L"GammaTRC: sRGB g=2.4 s=12.92"); + } else if (icm.gamma == "BT709_g2.2_s4.5") { + gammaStr = std::wstring(L"GammaTRC: BT709 g=2.2 s=4.5"); + } else if (icm.gamma == "linear_g1.0") { + gammaStr = std::wstring(L"GammaTRC: Linear g=1.0"); + } else if (icm.gamma == "standard_g2.2") { + gammaStr = std::wstring(L"GammaTRC: g=2.2"); + } else if (icm.gamma == "standard_g1.8") { + gammaStr = std::wstring(L"GammaTRC: g=1.8"); + } + + cmsMLUsetWide(mlu, "en", "US", gammaStr.c_str()); + } else { + // create description with gamma + slope + primaries + std::wostringstream gammaWs; + gammaWs.precision(2); + gammaWs << "Manual GammaTRC: g=" << (float)icm.gampos << " s=" << (float)icm.slpos; + + cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); + } + + cmsWriteTag(outputProfile, cmsSigProfileDescriptionTag, mlu);//desc changed + + /* + cmsMLUsetWide(mlu, "en", "US", L"General Public License - AdobeRGB compatible");//adapt to profil + cmsWriteTag(outputProfile, cmsSigCopyrightTag, mlu); + + cmsMLUsetWide(mlu, "en", "US", L"RawTherapee"); + cmsWriteTag(outputProfile, cmsSigDeviceMfgDescTag, mlu); + + cmsMLUsetWide(mlu, "en", "US", L"RTMedium"); //adapt to profil + cmsWriteTag(outputProfile, cmsSigDeviceModelDescTag, mlu); + + */ + + cmsMLUfree (mlu); + } + + // Calculate output profile's rTRC gTRC bTRC + cmsToneCurve* GammaTRC = NULL; + GammaTRC = cmsBuildParametricToneCurve(NULL, 5, Parameters); + cmsWriteTag(outputProfile, cmsSigRedTRCTag, (void*)GammaTRC ); + cmsWriteTag(outputProfile, cmsSigGreenTRCTag, (void*)GammaTRC ); + cmsWriteTag(outputProfile, cmsSigBlueTRCTag, (void*)GammaTRC ); + + if (GammaTRC) { + cmsFreeToneCurve(GammaTRC); + } + + return outputProfile; +} + +bool ICCStore::outputProfileExist (const Glib::ustring& name) const +{ + + MyMutex::MyLock lock(mutex_); + + const ProfileMap::const_iterator r = fileProfiles.find (name); + + if (r != fileProfiles.end ()) { + return true; + } + + return false; +} + cmsHPROFILE ICCStore::getProfile (const Glib::ustring& name) const { diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 8b6e6465c..6aa30033e 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -23,6 +23,8 @@ #include #include #include +#include +#include "procparams.h" #include "../rtgui/threadutils.h" namespace rtengine @@ -85,8 +87,11 @@ public: void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir); + static void getGammaArray(const procparams::ColorManagementParams &icm, double ga[]); // ga must be an array of double with 6 elements static cmsHPROFILE makeStdGammaProfile (cmsHPROFILE iprof); static cmsHPROFILE createFromMatrix (const double matrix[3][3], bool gamma = false, const Glib::ustring& name = Glib::ustring()); + static cmsHPROFILE createGammaProfile (const procparams::ColorManagementParams &icm, double ga[]); + static cmsHPROFILE createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, double ga[]); // Main monitors standard profile name, from OS void findDefaultMonitorProfile (); @@ -98,9 +103,10 @@ public: TMatrix workingSpaceMatrix (const Glib::ustring& name) const; TMatrix workingSpaceInverseMatrix (const Glib::ustring& name) const; - cmsHPROFILE getProfile (const Glib::ustring& name) const; - cmsHPROFILE getStdProfile (const Glib::ustring& name) const; - ProfileContent getContent (const Glib::ustring& name) const; + bool outputProfileExist (const Glib::ustring& name) const; + cmsHPROFILE getProfile (const Glib::ustring& name) const; + cmsHPROFILE getStdProfile (const Glib::ustring& name) const; + ProfileContent getContent (const Glib::ustring& name) const; cmsHPROFILE getXYZProfile () const; cmsHPROFILE getsRGBProfile () const; diff --git a/rtengine/image16.cc b/rtengine/image16.cc index 937e2d19d..d57bcf6a9 100644 --- a/rtengine/image16.cc +++ b/rtengine/image16.cc @@ -326,17 +326,16 @@ Image16::tofloat() } // Parallized transformation; create transform with cmsFLAGS_NOCACHE! -void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform) +void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage) { - //cmsDoTransform(hTransform, data, data, planestride); - - // LittleCMS cannot parallelize planar setups -- Hombre: LCMS2.4 can! But it we use this new feature, memory allocation have to be modified too + // LittleCMS cannot parallelize planar Lab float images // so build temporary buffers to allow multi processor execution #ifdef _OPENMP #pragma omp parallel #endif { - AlignedBuffer buffer(width * 3); + AlignedBuffer bufferLab(width * 3); + AlignedBuffer bufferRGB(width * 3); #ifdef _OPENMP #pragma omp for schedule(static) @@ -344,25 +343,31 @@ void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform) for (int y = 0; y < height; y++) { - unsigned short *p = buffer.data, *pR = r(y), *pG = g(y), *pB = b(y); + unsigned short *pRGB, *pR, *pG, *pB; + float *pLab, *pL, *pa, *pb; + + pLab= bufferLab.data; + pL = labImage.L[y]; + pa = labImage.a[y]; + pb = labImage.b[y]; for (int x = 0; x < width; x++) { - *(p++) = *(pR++); - *(p++) = *(pG++); - *(p++) = *(pB++); + *(pLab++) = *(pL++) / 327.68f; + *(pLab++) = *(pa++) / 327.68f; + *(pLab++) = *(pb++) / 327.68f; } - cmsDoTransform (hTransform, buffer.data, buffer.data, width); + cmsDoTransform (hTransform, bufferLab.data, bufferRGB.data, width); - p = buffer.data; + pRGB = bufferRGB.data; pR = r(y); pG = g(y); pB = b(y); for (int x = 0; x < width; x++) { - *(pR++) = *(p++); - *(pG++) = *(p++); - *(pB++) = *(p++); + *(pR++) = *(pRGB++); + *(pG++) = *(pRGB++); + *(pB++) = *(pRGB++); } } // End of parallelization } diff --git a/rtengine/image16.h b/rtengine/image16.h index 0e1ac6786..7fcff307f 100644 --- a/rtengine/image16.h +++ b/rtengine/image16.h @@ -96,7 +96,7 @@ public: delete this; } - void ExecCMSTransform(cmsHTRANSFORM hTransform); + void ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage); }; } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index f585acacf..5ba2dc5e1 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -33,9 +33,9 @@ extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () : orig_prev(NULL), oprevi(NULL), oprevl(NULL), nprevl(NULL), previmg(NULL), workimg(NULL), - ncie(NULL), imgsrc(NULL), shmap(NULL), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), scale(10), - highDetailPreprocessComputed(false), highDetailRawComputed(false), allocated(false), - bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(0.), + ncie(NULL), imgsrc(NULL), shmap(NULL), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), + softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), + allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(0.), hltonecurve(65536), shtonecurve(65536), @@ -774,7 +774,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Update the monitor color transform if necessary if (todo & M_MONITOR) { - ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent); + ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck); } // process crop, if needed @@ -794,20 +794,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) MyMutex::MyLock prevImgLock(previmg->getMutex()); try { + // Computing the preview image, i.e. converting from WCS->Monitor color space (soft-proofing disabled) or WCS->Output profile->Monitor color space (soft-proofing enabled) ipf.lab2monitorRgb (nprevl, previmg); + + // Computing the internal image for analysis, i.e. conversion from WCS->Output profile delete workimg; - Glib::ustring outProfile = params.icm.output; - - if(settings->HistogramWorking) { - Glib::ustring workProfile = params.icm.working; - workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, workProfile, RI_RELATIVE, true); // HOMBRE: was RELATIVE by default in lab2rgb, is it safe to assume we have to use it again ? - } else { - if (params.icm.output.empty() || params.icm.output == ColorManagementParams::NoICMString) { - outProfile = "sRGB"; - } - - workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, outProfile, params.icm.outputIntent, false); - } + workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, params.icm); } catch(char * str) { progress ("Error converting file...", 0); return; @@ -1134,6 +1126,18 @@ void ImProcCoordinator::getMonitorProfile (Glib::ustring& profile, RenderingInte intent = monitorIntent; } +void ImProcCoordinator::setSoftProofing (bool softProof, bool gamutCheck) +{ + this->softProof = softProof; + this->gamutCheck = gamutCheck; +} + +void ImProcCoordinator::getSoftProofing (bool &softProof, bool &gamutCheck) +{ + softProof = this->softProof; + gamutCheck = this->gamutCheck; +} + void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool apply_wb) { diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 4f1a6a691..3c4164254 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -57,8 +57,8 @@ protected: Imagefloat *oprevi; LabImage *oprevl; LabImage *nprevl; - Image8 *previmg; - Image8 *workimg; + Image8 *previmg; // displayed image in monitor color space, showing the output profile as well (soft-proofing enabled, which then correspond to workimg) or not + Image8 *workimg; // internal image in output color space for analysis CieImage *ncie; ImageSource* imgsrc; @@ -73,8 +73,9 @@ protected: ImProcFunctions ipf; Glib::ustring monitorProfile; - RenderingIntent monitorIntent; + bool softProof; + bool gamutCheck; int scale; bool highDetailPreprocessComputed; @@ -254,6 +255,8 @@ public: void setMonitorProfile (const Glib::ustring& profile, RenderingIntent intent); void getMonitorProfile (Glib::ustring& profile, RenderingIntent& intent) const; + void setSoftProofing (bool softProof, bool gamutCheck); + void getSoftProofing (bool &softProof, bool &gamutCheck); bool updateTryLock () { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 5730befbb..c511bf513 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -61,14 +61,6 @@ ImProcFunctions::~ImProcFunctions () if (monitorTransform) { cmsDeleteTransform (monitorTransform); } - - if (output2monitorTransform) { - cmsDeleteTransform (output2monitorTransform); - } - - if (lab2outputTransform) { - cmsDeleteTransform (lab2outputTransform); - } } void ImProcFunctions::setScale (double iscale) @@ -76,24 +68,14 @@ void ImProcFunctions::setScale (double iscale) scale = iscale; } -void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent) +void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck) { // set up monitor transform if (monitorTransform) { cmsDeleteTransform (monitorTransform); } - if (output2monitorTransform) { - cmsDeleteTransform (output2monitorTransform); - } - - if (lab2outputTransform) { - cmsDeleteTransform (lab2outputTransform); - } - monitorTransform = nullptr; - output2monitorTransform = nullptr; - lab2outputTransform = nullptr; #if !defined(__APPLE__) // No support for monitor profiles on OS X, all data is sRGB @@ -101,20 +83,60 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con if (monitor) { MyMutex::MyLock lcmsLock (*lcmsMutex); + + cmsUInt32Number flags; cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); - monitorTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, monitor, TYPE_RGB_8, monitorIntent, - cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); // NOCACHE is for thread safety, NOOPTIMIZE for precision - Glib::ustring outputProfile; + bool softProofCreated = false; - if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { - outputProfile = icm.output; - cmsHPROFILE jprof = iccStore->getProfile(outputProfile); - - if (jprof) { - lab2outputTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, jprof, TYPE_RGB_FLT, icm.outputIntent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); - output2monitorTransform = cmsCreateTransform (jprof, TYPE_RGB_FLT, monitor, TYPE_RGB_8, monitorIntent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); + if (softProof) { + cmsHPROFILE oprof; + if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + double ga[7]; + iccStore->getGammaArray(icm, ga); + oprof = iccStore->createGammaProfile (icm, ga); + printf("ImProcFunctions::updateColorProfiles / iccStore->createGammaProfile (icm, ga);\n"); } + else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { + if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + double ga[7]; + iccStore->getGammaArray(icm, ga); + oprof = iccStore->createCustomGammaOutputProfile (icm, ga); + printf("ImProcFunctions::updateColorProfiles / iccStore->createCustomGammaOutputProfile (icm, ga);\n"); + } else { + oprof = iccStore->getProfile(icm.output); + printf("ImProcFunctions::updateColorProfiles / iccStore->getProfile(%s);\n", icm.output.c_str()); + } + } + + if (oprof) { + // NOCACHE is for thread safety, NOOPTIMIZE for precision + flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (icm.outputBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } + if (gamutCheck) { + flags |= cmsFLAGS_GAMUTCHECK; + } + monitorTransform = cmsCreateProofingTransform( + iprof, TYPE_Lab_FLT, + monitor, TYPE_RGB_8, + oprof, + monitorIntent, icm.outputIntent, + flags + ); + if (monitorTransform) { + softProofCreated = true; + } + } + } + + if (!softProofCreated) { + flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (settings->monitorBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } + monitorTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, monitor, TYPE_RGB_8, monitorIntent, flags); } cmsCloseProfile(iprof); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 3523ee183..559456c32 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -223,7 +223,7 @@ public: bool needsPCVignetting (); void firstAnalysis (const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16); - void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent); + void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, 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, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ); @@ -361,9 +361,8 @@ public: void Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); - Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool standard_gamma); - Image16* lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw);// for gamma output - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw);//without gamma ==>default + Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, double *ga=NULL); // CieImage *ciec; bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 489ca60bc..ee3b35350 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -32,6 +32,12 @@ namespace rtengine extern const Settings* settings; +// Used in ImProcCoordinator::updatePreviewImage (rtengine/improccoordinator.cc) +// Crop::update (rtengine/dcrop.cc) +// Thumbnail::processImage (rtengine/rtthumbnail.cc) +// +// If monitorTransform, divide by 327.68 then apply monitorTransform (which can integrate soft-proofing) +// otherwise divide by 327.68, convert to xyz and apply the sRGB transform, before converting with gamma2curve void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) { if (monitorTransform) { @@ -61,21 +67,13 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) float* ra = lab->a[i]; float* rb = lab->b[i]; - float fy, fx, fz, x_, y_, z_, LL; - for (int j = 0; j < W; j++) { buffer[iy++] = rL[j] / 327.68f; buffer[iy++] = ra[j] / 327.68f; buffer[iy++] = rb[j] / 327.68f; } - if (!settings->HistogramWorking && output2monitorTransform && lab2outputTransform) { - AlignedBuffer buf(3 * W); - cmsDoTransform (lab2outputTransform, buffer, buf.data, W); - cmsDoTransform (output2monitorTransform, buf.data, data + ix, W); - } else { - cmsDoTransform (monitorTransform, buffer, data + ix, W); - } + cmsDoTransform (monitorTransform, buffer, data + ix, W); } } // End of parallelization @@ -111,7 +109,7 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) x_ = 65535.0 * Color::f2xyz(fx) * Color::D50x; // y_ = 65535.0 * Color::f2xyz(fy); z_ = 65535.0 * Color::f2xyz(fz) * Color::D50z; - y_ = (LL > Color::epskap) ? 65535.0 * fy * fy * fy : 65535.0 * LL / Color::kappa; + y_ = (LL > (float)Color::epskap) ? 65535.0 * fy * fy * fy : 65535.0 * LL / (float)Color::kappa; Color::xyz2srgb(x_, y_, z_, R, G, B); @@ -125,7 +123,16 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) } } -Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool standard_gamma) + + +// Used in ImProcCoordinator::updatePreviewImage (rtengine/improccoordinator.cc) +// Crop::update (rtengine/dcrop.cc) +// +// Generate an Image8 +// +// If output profile used, divide by 327.68 then apply the "profile" profile (eventually with a standard gamma) +// otherwise divide by 327.68, convert to xyz and apply the RGB transform, before converting with gamma2curve +Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm) { //gamutmap(lab); @@ -146,9 +153,22 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } Image8* image = new Image8 (cw, ch); - + Glib::ustring profile; cmsHPROFILE oprof = iccStore->getProfile (profile); + bool standard_gamma; + + if(settings->HistogramWorking) { + profile = icm.working; + standard_gamma = true; + } else { + profile = icm.output; + if (icm.output.empty() || icm.output == ColorManagementParams::NoICMString) { + profile = "sRGB"; + } + standard_gamma = false; + } + if (oprof) { cmsHPROFILE oprofG = oprof; @@ -156,11 +176,16 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, oprofG = ICCStore::makeStdGammaProfile(oprof); } + cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (icm.outputBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + printf("lab2rgb / bpc=true\n"); + } + else printf("lab2rgb / bpc=false\n"); lcmsMutex->lock (); - cmsHPROFILE hLab = cmsCreateLab4Profile(NULL); - cmsHTRANSFORM hTransform = cmsCreateTransform (hLab, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, intent, - cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); // NOCACHE is important for thread safety - cmsCloseProfile(hLab); + cmsHPROFILE LabIProf = cmsCreateLab4Profile(NULL); + cmsHTRANSFORM hTransform = cmsCreateTransform (LabIProf, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, icm.outputIntent, flags); // NOCACHE is important for thread safety + cmsCloseProfile(LabIProf); lcmsMutex->unlock (); unsigned char *data = image->data; @@ -213,33 +238,49 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, float* rL = lab->L[i]; float* ra = lab->a[i]; float* rb = lab->b[i]; - int ix = 3 * i * cw; + uint8_t* dest = image->r(i - cy) + cx; for (int j = cx; j < cx + cw; j++) { - float fy = (0.00862069 * rL[j]) / 327.68 + 0.137932; // (L+16)/116 - float fx = (0.002 * ra[j]) / 327.68 + fy; - float fz = fy - (0.005 * rb[j]) / 327.68; - float LL = rL[j] / 327.68; + float fy = (0.0086206897f * (*rL)) / 327.68f + 0.1379310345f; // (L+16)/116 + float fx = (0.002f * *(ra++)) / 327.68f + fy; + float fz = fy - (0.005f * *(rb++)) / 327.68f; + float LL = *(rL++) / 327.68f; - float x_ = 65535.0 * Color::f2xyz(fx) * Color::D50x; - //float y_ = 65535.0 * Color::f2xyz(fy); - float z_ = 65535.0 * Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > Color::epskap) ? 65535.0 * fy * fy * fy : 65535.0 * LL / Color::kappa; + float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; + //float y_ = 65535.0f * Color::f2xyz(fy); + float z_ = 65535.0f * Color::f2xyz(fz) * Color::D50z; + float y_ = (LL > (float)Color::epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / (float)Color::kappa; Color::xyz2rgb(x_, y_, z_, R, G, B, xyz_rgb); - image->data[ix++] = (int)Color::gamma2curve[R] >> 8; - image->data[ix++] = (int)Color::gamma2curve[G] >> 8; - image->data[ix++] = (int)Color::gamma2curve[B] >> 8; + *(dest++) = (int)Color::gamma2curve[CLIP(R)] >> 8; + *(dest++) = (int)Color::gamma2curve[CLIP(G)] >> 8; + *(dest++) = (int)Color::gamma2curve[CLIP(B)] >> 8; } } } return image; } -// for default (not gamma) -Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw) + + +/** @brief Convert the final Lab image to the output RGB color space + * + * Used in processImage (rtengine/simpleprocess.cc) + * + * Provide a pointer to a 7 floats array for "ga" (uninitialized ; this array will be filled with the gamma values) if you want + * to use the custom gamma scenario. Thoses gamma values will correspond to the ones of the chosen standard output profile + * (Prophoto if non standard output profile given) + * + * If "ga" is NULL, then we're considering standard gamma with the chosen output profile. + * + * Generate an Image16 + * + * If a custom gamma profile can be created, divide by 327.68, convert to xyz and apply the custom gamma transform + * otherwise divide by 327.68, convert to xyz and apply the sRGB transform, before converting with gamma2curve + */ +Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, double *ga) { //gamutmap(lab); @@ -261,357 +302,120 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int } Image16* image = new Image16 (cw, ch); - cmsHPROFILE oprof = iccStore->getProfile (profile); - + cmsHPROFILE oprof = NULL; + if (ga) { + iccStore->getGammaArray(icm, ga); + oprof = iccStore->createGammaProfile(icm, ga); + printf("iccStore->createGammaProfile(icm, ga);\n"); + } else { + oprof = iccStore->getProfile (icm.output); + printf("iccStore->getProfile (%s);\n", icm.output.c_str()); + } if (oprof) { - #pragma omp parallel for if (multiThread) + + + /* + + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif for (int i = cy; i < cy + ch; i++) { float* rL = lab->L[i]; float* ra = lab->a[i]; float* rb = lab->b[i]; - short* xa = (short*)image->r(i - cy); - short* ya = (short*)image->g(i - cy); - short* za = (short*)image->b(i - cy); + short* xa = (short*)image->r(i - cy) + cx; + short* ya = (short*)image->g(i - cy) + cx; + short* za = (short*)image->b(i - cy) + cx; - for (int j = cx; j < cx + cw; j++) { + for (int j = 0; j < cw; j++) { - float fy = (0.0086206897f * rL[j]) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002 * ra[j]) / 327.68f + fy; - float fz = fy - (0.005f * rb[j]) / 327.68f; - float LL = rL[j] / 327.68f; + float fy = (0.0086206897f * *rL) / 327.68f + 0.1379310345f; // (L+16)/116 + float fx = (0.002f * *(ra++)) / 327.68f + fy; + float fz = fy - (0.005f * *(rb++)) / 327.68f; + float LL = *(rL++) / 327.68f; - float x_ = 65535.0f * (float) Color::f2xyz(fx) * Color::D50x; - //float y_ = 65535.0 * Color::f2xyz(fy); - float z_ = 65535.0f * (float) Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > Color::epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / Color::kappa; + float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; + //float y_ = 65535.0f * Color::f2xyz(fy); + float z_ = 65535.0f * Color::f2xyz(fz) * Color::D50z; + float y_ = (LL > (float)Color::epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / (float)Color::kappa; - xa[j - cx] = CLIP((int) round(x_)); - ya[j - cx] = CLIP((int) round(y_)); - za[j - cx] = CLIP((int) round(z_)); - - if(bw && y_ < 65535.f ) { //force Bw value and take highlight into account - xa[j - cx] = (int) round(y_ * Color::D50x ); - za[j - cx] = (int) round(y_ * Color::D50z); - } - - } - } - - cmsHPROFILE iprof = iccStore->getXYZProfile (); - lcmsMutex->lock (); - cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_RGB_16, oprof, TYPE_RGB_16, intent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE); - lcmsMutex->unlock (); - - image->ExecCMSTransform(hTransform); - - cmsDeleteTransform(hTransform); - } else { - #pragma omp parallel for if (multiThread) - - for (int i = cy; i < cy + ch; i++) { - float R, G, B; - float* rL = lab->L[i]; - float* ra = lab->a[i]; - float* rb = lab->b[i]; - - for (int j = cx; j < cx + cw; j++) { - - float fy = (0.0086206897f * rL[j]) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002f * ra[j]) / 327.68f + fy; - float fz = fy - (0.005f * rb[j]) / 327.68f; - float LL = rL[j] / 327.68f; - - float x_ = 65535.0f * (float) Color::f2xyz(fx) * Color::D50x; - //float y_ = 65535.0 * Color::f2xyz(fy); - float z_ = 65535.0f * (float) Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > Color::epskap) ? (float) 65535.0f * fy * fy * fy : 65535.0f * LL / Color::kappa; - - Color::xyz2srgb(x_, y_, z_, R, G, B); - - image->r(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(R)]; - image->g(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(G)]; - image->b(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(B)]; - } - } - } - - return image; -} - - -// for gamma options (BT709...sRGB linear...) -Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw) -{ - - //gamutmap(lab); - - if (cx < 0) { - cx = 0; - } - - if (cy < 0) { - cy = 0; - } - - if (cx + cw > lab->W) { - cw = lab->W - cx; - } - - if (cy + ch > lab->H) { - ch = lab->H - cy; - } - - Image16* image = new Image16 (cw, ch); - float p1, p2, p3, p4, p5, p6; //primaries - - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; //gamma parameters - double pwr; - double ts; - ga6 = 0.0; - pwr = 1.0 / gampos; - ts = slpos; - int mode = 0, imax = 0; - - int t50; - int select_temp = 1; //5003K - const double eps = 0.000000001; // not divide by zero - - //primaries for 7 working profiles ==> output profiles - // eventually to adapt primaries if RT used special profiles ! - if (profi == "WideGamut") { - p1 = 0.7350; //Widegamut primaries - p2 = 0.2650; - p3 = 0.1150; - p4 = 0.8260; - p5 = 0.1570; - p6 = 0.0180; - select_temp = 1; - } else if (profi == "Adobe RGB") { - p1 = 0.6400; //Adobe primaries - p2 = 0.3300; - p3 = 0.2100; - p4 = 0.7100; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; - } else if (profi == "sRGB") { - p1 = 0.6400; // sRGB primaries - p2 = 0.3300; - p3 = 0.3000; - p4 = 0.6000; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; - } else if (profi == "BruceRGB") { - p1 = 0.6400; // Bruce primaries - p2 = 0.3300; - p3 = 0.2800; - p4 = 0.6500; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; - } else if (profi == "Beta RGB") { - p1 = 0.6888; // Beta primaries - p2 = 0.3112; - p3 = 0.1986; - p4 = 0.7551; - p5 = 0.1265; - p6 = 0.0352; - select_temp = 1; - } else if (profi == "BestRGB") { - p1 = 0.7347; // Best primaries - p2 = 0.2653; - p3 = 0.2150; - p4 = 0.7750; - p5 = 0.1300; - p6 = 0.0350; - select_temp = 1; - } else if (profi == "Rec2020") { - p1 = 0.7080; // Rec2020 primaries - p2 = 0.2920; - p3 = 0.1700; - p4 = 0.7970; - p5 = 0.1310; - p6 = 0.0460; - select_temp = 2; - } else { - p1 = 0.7347; //ProPhoto and default primaries - p2 = 0.2653; - p3 = 0.1596; - p4 = 0.8404; - p5 = 0.0366; - p6 = 0.0001; - select_temp = 1; - } - - if (!freegamma) {//if Free gamma not selected - // gamma : ga0,ga1,ga2,ga3,ga4,ga5 by calcul - if(gam == "BT709_g2.2_s4.5") { - ga0 = 2.22; //BT709 2.2 4.5 - my prefered as D.Coffin - ga1 = 0.909995; - ga2 = 0.090005; - ga3 = 0.222222; - ga4 = 0.081071; - ga5 = 0.0; - } else if (gam == "sRGB_g2.4_s12.92") { - ga0 = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom - ga1 = 0.947858; - ga2 = 0.052142; - ga3 = 0.077399; - ga4 = 0.039293; - ga5 = 0.0; - } else if (gam == "High_g1.3_s3.35") { - ga0 = 1.3 ; //for high dynamic images - ga1 = 0.998279; - ga2 = 0.001721; - ga3 = 0.298507; - ga4 = 0.005746; - ga5 = 0.0; - } else if (gam == "Low_g2.6_s6.9") { - ga0 = 2.6 ; //gamma 2.6 variable : for low contrast images - ga1 = 0.891161; - ga2 = 0.108839; - ga3 = 0.144928; - ga4 = 0.076332; - ga5 = 0.0; - } else if (gam == "linear_g1.0") { - ga0 = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) - ga1 = 1.; - ga2 = 0.; - ga3 = 1. / eps; - ga4 = 0.; - ga5 = 0.0; - } else if (gam == "standard_g2.2") { - ga0 = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) - ga1 = 1.; - ga2 = 0.; - ga3 = 1. / eps; - ga4 = 0.; - ga5 = 0.0; - } else if (gam == "standard_g1.8") { - ga0 = 1.8; //gamma=1.8 (as gamma of Prophoto) - ga1 = 1.; - ga2 = 0.; - ga3 = 1. / eps; - ga4 = 0.; - ga5 = 0.0; - } - } else { //free gamma selected - if(slpos == 0) { - slpos = eps; - } - - Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 - ga4 = g_a3 * ts; - //printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); - ga0 = gampos; - ga1 = 1. / (1.0 + g_a4); - ga2 = g_a4 / (1.0 + g_a4); - ga3 = 1. / slpos; - ga5 = 0.0; - //printf("ga0=%f ga1=%f ga2=%f ga3=%f ga4=%f\n", ga0,ga1,ga2,ga3,ga4); - - } - - if(select_temp == 1) { - t50 = 5003; // for Widegamut, Prophoto Best, Beta D50 - } else if (select_temp == 2) { - t50 = 6504; // for sRGB, AdobeRGB, Bruce Rec2020 D65 - } - - cmsCIExyY xyD; - cmsCIExyYTRIPLE Primaries = {{p1, p2, 1.0},//red primaries - {p3, p4, 1.0}, // green - {p5, p6, 1.0} //blue - }; - cmsToneCurve* GammaTRC[3]; - cmsFloat64Number Parameters[7]; - Parameters[0] = ga0; - Parameters[1] = ga1; - Parameters[2] = ga2; - Parameters[3] = ga3; - Parameters[4] = ga4; - Parameters[5] = ga5; - Parameters[6] = ga6; -// 7 parameters for smoother curves - cmsWhitePointFromTemp(&xyD, t50); - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters);//5 = more smoother than 4 - cmsHPROFILE oprofdef = cmsCreateRGBProfileTHR(NULL, &xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile - - cmsFreeToneCurve(GammaTRC[0]); - - - if (oprofdef) { - #pragma omp parallel for if (multiThread) - - for (int i = cy; i < cy + ch; i++) { - float* rL = lab->L[i]; - float* ra = lab->a[i]; - float* rb = lab->b[i]; - short* xa = (short*)image->r(i - cy); - short* ya = (short*)image->g(i - cy); - short* za = (short*)image->b(i - cy); - - for (int j = cx; j < cx + cw; j++) { - - float fy = (0.0086206897f * rL[j]) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002f * ra[j]) / 327.68f + fy; - float fz = fy - (0.005f * rb[j]) / 327.68f; - float LL = rL[j] / 327.68f; - - float x_ = 65535.0f * (float)Color::f2xyz(fx) * Color::D50x; - // float y_ = 65535.0 * Color::f2xyz(fy); - float z_ = 65535.0f * (float)Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > Color::epskap) ? (float) 65535.0 * fy * fy * fy : 65535.0f * LL / Color::kappa; - - xa[j - cx] = CLIP((int) round(x_)) ; - ya[j - cx] = CLIP((int) round(y_)); - za[j - cx] = CLIP((int) round(z_)); + *xa = CLIP((int) round(x_)) ; + *(ya++) = CLIP((int) round(y_)); + *za = CLIP((int) round(z_)); if(bw && y_ < 65535.f) { //force Bw value and take highlight into account - xa[j - cx] = (int) round(y_ * Color::D50x); - za[j - cx] = (int) round(y_ * Color::D50z); + *xa = (int) round(y_ * Color::D50x); + *za = (int) round(y_ * Color::D50z); } - + ++xa; + ++za; } } cmsHPROFILE iprof = iccStore->getXYZProfile (); + + + */ + + cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); + + + + + // ---------------------------------------------------------------------------- + + + + + cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (icm.outputBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + printf("lab2rgb16 / icm.outputBPC=true / outputIntent=%d\n", icm.outputIntent); + } + else printf("lab2rgb16 / icm.outputBPC=false / outputIntent=%d\n", icm.outputIntent); lcmsMutex->lock (); - cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_RGB_16, oprofdef, TYPE_RGB_16, intent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE); + //cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_RGB_16, oprof, TYPE_RGB_16, icm.outputIntent, flags); + cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, oprof, TYPE_RGB_16, icm.outputIntent, flags); lcmsMutex->unlock (); - image->ExecCMSTransform(hTransform); + //image->ExecCMSTransform(hTransform); + image->ExecCMSTransform(hTransform, *lab); cmsDeleteTransform(hTransform); } else { // - #pragma omp parallel for if (multiThread) +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif for (int i = cy; i < cy + ch; i++) { float R, G, B; float* rL = lab->L[i]; float* ra = lab->a[i]; float* rb = lab->b[i]; + uint16_t* rR = image->r(i - cy) + cx; + uint16_t* rG = image->g(i - cy) + cx; + uint16_t* rB = image->b(i - cy) + cx; - for (int j = cx; j < cx + cw; j++) { + for (int j = 0; j < cw; j++) { - float fy = (0.0086206897f * rL[j]) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002f * ra[j]) / 327.68f + fy; - float fz = fy - (0.005f * rb[j]) / 327.68f; - float LL = rL[j] / 327.68f; + float fy = (0.0086206897f * *rL) / 327.68f + 0.1379310345f; // (L+16)/116 + float fx = (0.002f * *(ra++)) / 327.68f + fy; + float fz = fy - (0.005f * *(rb++)) / 327.68f; + float LL = *(rL++) / 327.68f; - float x_ = 65535.0f * (float) Color::f2xyz(fx) * Color::D50x; + float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; //float y_ = 65535.0 * Color::f2xyz(fy); - float z_ = 65535.0f * (float) Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > Color::epskap) ? (float) 65535.0 * fy * fy * fy : 65535.0f * LL / Color::kappa; + float z_ = 65535.0f * Color::f2xyz(fz) * Color::D50z; + float y_ = (LL > (float)Color::epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / (float)Color::kappa; Color::xyz2srgb(x_, y_, z_, R, G, B); - image->r(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(R)]; - image->g(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(G)]; - image->b(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(B)]; + *(rR++) = (int)Color::gamma2curve[CLIP(R)]; + *(rG++) = (int)Color::gamma2curve[CLIP(G)]; + *(rB++) = (int)Color::gamma2curve[CLIP(B)]; } } } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 62d2a4ac1..52517e527 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -469,6 +469,7 @@ enum ProcEvent { EvcbdlMethod = 439, EvRetinexgaintransmission = 440, EvLskal = 441, + EvOBPCompens = 442, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 70b764da1..a5a2515a5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -927,6 +927,7 @@ void ColorManagementParams::setDefaults() working = "ProPhoto"; output = "RT_sRGB"; outputIntent = RI_RELATIVE; + outputBPC = true; gamma = "default"; gampos = 2.22; slpos = 4.5; @@ -2662,6 +2663,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_string ("Color Management", "OutputProfileIntent", intent); } + if (!pedited || pedited->icm.outputBPC) { + keyFile.set_boolean ("Color Management", "OutputBPC", icm.outputBPC); + } + if (!pedited || pedited->icm.gamma) { keyFile.set_string ("Color Management", "Gammafree", icm.gamma); } @@ -5921,6 +5926,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color Management", "OutputBPC")) { + icm.outputBPC = keyFile.get_boolean ("Color Management", "OutputBPC"); + + if (pedited) { + pedited->icm.gamfree = true; + } + } + if (keyFile.has_key ("Color Management", "Gammafree")) { icm.gamma = keyFile.get_string ("Color Management", "Gammafree"); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index cf02b9f10..3f0331457 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -967,6 +967,7 @@ public: Glib::ustring working; Glib::ustring output; RenderingIntent outputIntent; + bool outputBPC; static const Glib::ustring NoICMString; Glib::ustring gamma; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 5175836e4..025265e0a 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -119,8 +119,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { ALLNORAW, // EvDPDNLuma, ALLNORAW, // EvDPDNChroma, ALLNORAW, // EvDPDNGamma, - ALLNORAW, // EvDirPyrEqualizer, - ALLNORAW, // EvDirPyrEqlEnabled, + ALLNORAW, // EvDirPyrEqualizer, + ALLNORAW, // EvDirPyrEqlEnabled, LUMINANCECURVE, // EvLSaturation, LUMINANCECURVE, // EvLaCurve, LUMINANCECURVE, // EvLbCurve, @@ -275,12 +275,12 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvLCLCurve LUMINANCECURVE, // EvLLHCurve LUMINANCECURVE, // EvLHHCurve - ALLNORAW, // EvDirPyrEqualizerThreshold + ALLNORAW, // EvDirPyrEqualizerThreshold ALLNORAW, // EvDPDNenhance RGBCURVE, // EvBWMethodalg - ALLNORAW, // EvDirPyrEqualizerSkin - ALLNORAW, // EvDirPyrEqlgamutlab - ALLNORAW, // EvDirPyrEqualizerHueskin + ALLNORAW, // EvDirPyrEqualizerSkin + ALLNORAW, // EvDirPyrEqlgamutlab + ALLNORAW, // EvDirPyrEqualizerHueskin ALLNORAW, // EvDPDNmedian ALLNORAW, // EvDPDNmedmet RGBCURVE, // EvColorToningEnabled @@ -453,7 +453,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RETINEX, // EvLhighl DEMOSAIC, // EvLbaselog DEMOSAIC, // EvRetinexlhcurve - ALLNORAW, // EvOIntent + OUTPUTPROFILE, // EvOIntent MONITORTRANSFORM, // EvMonitorTransform: no history message RETINEX, // EvLiter RETINEX, // EvLgrad @@ -465,10 +465,11 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RETINEX, // EvLradius RETINEX, // EvmapMethod DEMOSAIC, // EvRetinexmapcurve - DEMOSAIC, // EvviewMethod - ALLNORAW, // EvcbdlMethod + DEMOSAIC, // EvviewMethod + ALLNORAW, // EvcbdlMethod RETINEX, // EvRetinexgaintransmission - RETINEX //EvLskal + RETINEX, // EvLskal + OUTPUTPROFILE // EvOBPCompens }; diff --git a/rtengine/refreshmap.h b/rtengine/refreshmap.h index 23e179f9f..e262c9394 100644 --- a/rtengine/refreshmap.h +++ b/rtengine/refreshmap.h @@ -46,7 +46,7 @@ // Bitfield of functions to do to the preview image when an event occurs // Use those or create new ones for your new events -#define FIRST (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) // without HIGHQUAL +#define FIRST (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR|M_MONITOR) // without HIGHQUAL #define ALL (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) // without HIGHQUAL #define DARKFRAME (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) #define FLATFIELD (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) @@ -61,7 +61,7 @@ #define DEFRINGE (M_LUMINANCE|M_COLOR) #define DIRPYRDENOISE (M_LUMINANCE|M_COLOR) #define DIRPYREQUALIZER (M_LUMINANCE|M_COLOR) -#define GAMMA (M_LUMINANCE|M_COLOR) +#define GAMMA M_MONITOR #define CROP M_CROP #define RESIZE M_VOID #define EXIF M_VOID @@ -69,7 +69,7 @@ #define MINUPDATE M_MINUPDATE #define RETINEX (M_RETINEX|ALLNORAW) #define MONITORTRANSFORM M_MONITOR -#define OUTPUTPROFILE (ALLNORAW|MONITORTRANSFORM) +#define OUTPUTPROFILE M_MONITOR extern int refreshmap[]; #endif diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 42e06406e..eeaba48a7 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -418,6 +418,8 @@ public: virtual void setMonitorProfile (const Glib::ustring& monitorProfile, RenderingIntent intent) = 0; virtual void getMonitorProfile (Glib::ustring& monitorProfile, RenderingIntent& intent) const = 0; + virtual void setSoftProofing (bool softProof, bool gamutCheck) = 0; + virtual void getSoftProofing (bool &softProof, bool &gamutCheck) = 0; virtual ~StagedImageProcessor () {} diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index e8c1cd096..5b73b09fb 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -906,7 +906,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei ImProcFunctions ipf (¶ms, false); ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->width * thumbImg->width + thumbImg->height * thumbImg->height))*scale); - ipf.updateColorProfiles (params.icm, options.rtSettings.monitorProfile, options.rtSettings.monitorIntent); + ipf.updateColorProfiles (params.icm, options.rtSettings.monitorProfile, options.rtSettings.monitorIntent, false, false); LUTu hist16 (65536); diff --git a/rtengine/settings.h b/rtengine/settings.h index 4053a547f..3c728f061 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -40,6 +40,7 @@ public: Glib::ustring monitorProfile; ///< ICC profile name used for the monitor RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile + bool monitorBPC; ///< Black Point Compensation for the WCS->Monitor transform (directly, i.e. not soft-proofing) bool autoMonitorProfile; ///< Try to auto-determine the correct monitor color profile bool autocielab; bool rgbcurveslumamode_gamut;// controls gamut enforcement for RGB curves in lumamode diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 25bf45742..270661a33 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1158,211 +1158,27 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p cmsHPROFILE jprof = NULL; bool customGamma = false; bool useLCMS = false; + bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - cmsMLU *DescriptionMLU, *CopyrightMLU, *DmndMLU, *DmddMLU;// for modification TAG - cmsToneCurve* GammaTRC[3] = { NULL, NULL, NULL }; - cmsFloat64Number Parameters[7]; - double ga0, ga1, ga2, ga3, ga4, ga5, ga6; + double ga[7]; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; - readyImg = ipf.lab2rgb16b (labView, cx, cy, cw, ch, params.icm.output, params.icm.outputIntent, params.icm.working, params.icm.gamma, params.icm.freegamma, params.icm.gampos, params.icm.slpos, ga0, ga1, ga2, ga3, ga4, ga5, ga6, params.blackwhite.enabled ); + readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly, ga); customGamma = true; //or selected Free gamma useLCMS = false; - bool pro = false; - Glib::ustring chpro, outProfile; - bool present_space[10] = {false, false, false, false, false, false, false, false, false, false}; - std::vector opnames = iccStore->getProfiles (); - - //test if files are in system - for (int j = 0; j < 10; j++) { - // one can modify "option" [Color Management] to adapt the profile's name if they are different for windows, MacOS, Linux ?? - // some of them are actually provided by RT, thanks to Jacques Desmis - if (j == 0) { - chpro = options.rtSettings.prophoto; - } else if(j == 1) { - chpro = options.rtSettings.adobe; - } else if(j == 2) { - chpro = options.rtSettings.widegamut; - } else if(j == 3) { - chpro = options.rtSettings.beta; - } else if(j == 4) { - chpro = options.rtSettings.best; - } else if(j == 5) { - chpro = options.rtSettings.bruce; - } else if(j == 6) { - chpro = options.rtSettings.srgb; - } else if(j == 7) { - chpro = options.rtSettings.srgb10; //gamma 1.0 - } else if(j == 8) { - chpro = options.rtSettings.prophoto10; //gamma 1.0 - } else if(j == 9) { - chpro = options.rtSettings.rec2020; - } - - for (unsigned int i = 0; i < opnames.size(); i++) { - if(chpro.compare(opnames[i]) == 0) { - present_space[j] = true; - } - } - - if (!present_space[j] && settings->verbose) { - printf("Missing file: %s\n", chpro.c_str()); - } - } - - if (params.icm.freegamma && params.icm.gampos < 1.35) { - pro = true; //select profil with gammaTRC modified : - } else if (params.icm.gamma == "linear_g1.0" || (params.icm.gamma == "High_g1.3_s3.35")) { - pro = true; //pro=0 RT_sRGB || Prophoto - } - - // Check that output profiles exist, otherwise use LCMS2 - // Use the icc/icm profiles associated to possible working profiles, set in "options" - if (params.icm.working == "ProPhoto" && present_space[0] && !pro) { - outProfile = options.rtSettings.prophoto; - } else if (params.icm.working == "Adobe RGB" && present_space[1] ) { - outProfile = options.rtSettings.adobe; - } else if (params.icm.working == "WideGamut" && present_space[2] ) { - outProfile = options.rtSettings.widegamut; - } else if (params.icm.working == "Beta RGB" && present_space[3] ) { - outProfile = options.rtSettings.beta; - } else if (params.icm.working == "BestRGB" && present_space[4] ) { - outProfile = options.rtSettings.best; - } else if (params.icm.working == "BruceRGB" && present_space[5] ) { - outProfile = options.rtSettings.bruce; - } else if (params.icm.working == "sRGB" && present_space[6] && !pro) { - outProfile = options.rtSettings.srgb; - } else if (params.icm.working == "sRGB" && present_space[7] && pro) { - outProfile = options.rtSettings.srgb10; - } else if (params.icm.working == "ProPhoto" && present_space[8] && pro) { - outProfile = options.rtSettings.prophoto10; - } else if (params.icm.working == "Rec2020" && present_space[9]) { - outProfile = options.rtSettings.rec2020; - } else { - // Should not occurs - if (settings->verbose) { - printf("\"%s\": unknown working profile! - use LCMS2 substitution\n", params.icm.working.c_str() ); - } + if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == NULL) { useLCMS = true; } - //begin adaptation rTRC gTRC bTRC - //"jprof" profile has the same characteristics than RGB values, but TRC are adapted... for applying profile - if (!useLCMS) { - if (settings->verbose) { - printf("Output Gamma - profile: \"%s\"\n", outProfile.c_str() ); //c_str() - } - - jprof = iccStore->getProfile(outProfile); //get output profile - - if (jprof == NULL) { - useLCMS = true; - - if (settings->verbose) { - printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); - } - } else { - Parameters[0] = ga0; - Parameters[1] = ga1; - Parameters[2] = ga2; - Parameters[3] = ga3; - Parameters[4] = ga4; - Parameters[5] = ga5; - Parameters[6] = ga6; - // 7 parameters for smoother curves - //change desc Tag , to "free gamma", or "BT709", etc. - cmsContext ContextID = cmsGetProfileContextID(jprof);//modification TAG - DescriptionMLU = cmsMLUalloc(ContextID, 1); - CopyrightMLU = cmsMLUalloc(ContextID, 1);//for ICC - DmndMLU = cmsMLUalloc(ContextID, 1); //for ICC - DmddMLU = cmsMLUalloc(ContextID, 1); // for ICC - - - // instruction with //ICC are used for generate icc profile - if (DescriptionMLU == NULL) { - printf("Description error\n"); - } - - cmsMLUsetWide(CopyrightMLU, "en", "US", L"General Public License - AdobeRGB compatible") ;//adapt to profil - cmsMLUsetWide(DmndMLU, "en", "US", L"RawTherapee") ; - cmsMLUsetWide(DmddMLU, "en", "US", L"RTMedium") ; //adapt to profil - - //display Tag desc with : selection of gamma and Primaries - if (!params.icm.freegamma) { - std::wstring gammaStr; - - if(params.icm.gamma == "High_g1.3_s3.35") { - gammaStr = std::wstring(L"GammaTRC: High g=1.3 s=3.35"); - } else if (params.icm.gamma == "Low_g2.6_s6.9") { - gammaStr = std::wstring(L"GammaTRC: Low g=2.6 s=6.9"); - } else if (params.icm.gamma == "sRGB_g2.4_s12.92") { - gammaStr = std::wstring(L"GammaTRC: sRGB g=2.4 s=12.92"); - } else if (params.icm.gamma == "BT709_g2.2_s4.5") { - gammaStr = std::wstring(L"GammaTRC: BT709 g=2.2 s=4.5"); - } else if (params.icm.gamma == "linear_g1.0") { - gammaStr = std::wstring(L"GammaTRC: Linear g=1.0"); - } else if (params.icm.gamma == "standard_g2.2") { - gammaStr = std::wstring(L"GammaTRC: g=2.2"); - } else if (params.icm.gamma == "standard_g1.8") { - gammaStr = std::wstring(L"GammaTRC: g=1.8"); - } - - cmsMLUsetWide(DescriptionMLU, "en", "US", gammaStr.c_str()); - - //for elaboration ICC profiles - // else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Medium gamma sRGB(AdobeRGB compatible)"); - // else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma BT709(IEC61966 equivalent)"); - // else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma sRGB(IEC61966 equivalent)"); - // else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma Linear1.0(IEC61966 equivalent)"); - //else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma BT709(Prophoto compatible)"); - // else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma sRGB(Prophoto compatible)"); - // else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma Linear1.0(Prophoto compatible)"); - } else { - // create description with gamma + slope + primaries - std::wostringstream gammaWs; - gammaWs.precision(2); - gammaWs << "Manual GammaTRC: g=" << (float)params.icm.gampos << " s=" << (float)params.icm.slpos; - cmsMLUsetWide(DescriptionMLU, "en", "US", gammaWs.str().c_str()); - } - - cmsWriteTag(jprof, cmsSigProfileDescriptionTag, DescriptionMLU);//desc changed - // cmsWriteTag(jprof, cmsSigCopyrightTag, CopyrightMLU); - // cmsWriteTag(jprof, cmsSigDeviceMfgDescTag, DmndMLU); - // cmsWriteTag(jprof, cmsSigDeviceModelDescTag, DmddMLU); - - // Calculate output profile's rTRC bTRC gTRC - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); - cmsWriteTag(jprof, cmsSigGreenTRCTag, (void*)GammaTRC[1] ); - cmsWriteTag(jprof, cmsSigRedTRCTag, (void*)GammaTRC[0] ); - cmsWriteTag(jprof, cmsSigBlueTRCTag, (void*)GammaTRC[2] ); - //for generation ICC profiles : here Prophoto ==> Large - // if(params.icm.gamma== "BT709_g2.2_s4.5") cmsSaveProfileToFile(jprof, "RT_sRGB_gBT709.icm"); - // else if (params.icm.gamma== "sRGB_g2.4_s12.92") cmsSaveProfileToFile(jprof, "RT_Medium_gsRGB.icc"); - // else if (params.icm.gamma== "linear_g1.0") cmsSaveProfileToFile(jprof, "RT_Large_g10.icc"); - - - } - } - - if (GammaTRC[0]) { - cmsFreeToneCurve(GammaTRC[0]); - } } else { // if Default gamma mode: we use the profile selected in the "Output profile" combobox; // gamma come from the selected profile, otherwise it comes from "Free gamma" tool - // readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm.output, params.blackwhite.enabled); - bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled ; - - if(autili || butili ) { - bwonly = false; - } - - readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm.output, params.icm.outputIntent, bwonly); + readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly); if (settings->verbose) { printf("Output profile_: \"%s\"\n", params.icm.output.c_str()); @@ -1374,17 +1190,15 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p - if(!autili && !butili ) { - if(params.blackwhite.enabled && !params.colorToning.enabled ) {//force BW r=g=b - if (settings->verbose) { - printf("Force BW\n"); - } + if(bwonly) { //force BW r=g=b + if (settings->verbose) { + printf("Force BW\n"); + } - for (int ccw = 0; ccw < cw; ccw++) { - for (int cch = 0; cch < ch; cch++) { - readyImg->r(cch, ccw) = readyImg->g(cch, ccw); - readyImg->b(cch, ccw) = readyImg->g(cch, ccw); - } + for (int ccw = 0; ccw < cw; ccw++) { + for (int cch = 0; cch < ch; cch++) { + readyImg->r(cch, ccw) = readyImg->g(cch, ccw); + readyImg->b(cch, ccw) = readyImg->g(cch, ccw); } } } @@ -1410,37 +1224,28 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // Setting the output curve to readyImg if (customGamma) { if (!useLCMS) { - // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16b + // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma ProfileContent pc(jprof); readyImg->setOutputProfile (pc.data, pc.length); } } else { - // use RT_sRGB.icm profile if present, otherwise use LCMS2 profile generate by lab2rgb16b - Glib::ustring outputProfile; + // use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) { - outputProfile = params.icm.output; - - /* if we'd wanted the RT_sRGB profile we would have selected it - else { - // use RT_sRGB.icm profile if present, otherwise use LCMS2 profile generate by lab2rgb16b - if (settings->verbose) printf("No output profiles set ; looking for the default sRGB profile (\"%s\")...\n", options.rtSettings.srgb.c_str()); - outputProfile = options.rtSettings.srgb; - }*/ // if iccStore->getProfile send back an object, then iccStore->getContent will do too - cmsHPROFILE jprof = iccStore->getProfile(outputProfile); //get outProfile + cmsHPROFILE jprof = iccStore->getProfile(params.icm.output); //get outProfile if (jprof == NULL) { if (settings->verbose) { - printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", outputProfile.c_str()); + printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); } } else { if (settings->verbose) { - printf("Using \"%s\" output profile\n", outputProfile.c_str()); + printf("Using \"%s\" output profile\n", params.icm.output.c_str()); } - ProfileContent pc = iccStore->getContent (outputProfile); + ProfileContent pc = iccStore->getContent (params.icm.output); readyImg->setOutputProfile (pc.data, pc.length); } } else { diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 80dc3dfae..d74d8ee9d 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -35,11 +35,13 @@ using namespace rtengine::procparams; -class EditorPanel::MonitorProfileSelector +class EditorPanel::ColorManagementToolbar { private: MyComboBoxText profileBox; PopUpButton intentBox; + Gtk::ToggleButton softProof; + Gtk::ToggleButton spGamutCheck; sigc::connection profileConn, intentConn; rtengine::StagedImageProcessor* const& processor; @@ -61,6 +63,7 @@ private: for (std::vector::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) { profileBox.append_text (*iterator); } + profileBox.set_tooltip_text (profileBox.get_active_text ()); } void prepareIntentBox () @@ -73,11 +76,31 @@ private: intentBox.show (); } + void prepareSoftProofingBox () + { + Gtk::Image *softProofImage = Gtk::manage (new RTImage ("softProof.png")); + softProofImage->set_padding(0, 0); + softProof.add(*softProofImage); + softProof.set_relief(Gtk::RELIEF_NONE); + softProof.set_tooltip_markup(M("SOFTPROOF_TOOLTIP")); + + softProof.set_active(false); + softProof.show (); + + Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png")); + spGamutCheckImage->set_padding(0, 0); + spGamutCheck.add(*spGamutCheckImage); + spGamutCheck.set_relief(Gtk::RELIEF_NONE); + spGamutCheck.set_tooltip_markup(M("SOFTPROOF_GAMUTCHECK_TOOLTIP")); + + spGamutCheck.set_active(false); + spGamutCheck.set_sensitive(false); + spGamutCheck.show (); + } + void profileBoxChanged () { updateParameters (); - - profileBox.set_tooltip_text (profileBox.get_active_text ()); } void intentBoxChanged (int) @@ -85,6 +108,16 @@ private: updateParameters (); } + void softProofToggled () + { + updateSoftProofParameters (); + } + + void spGamutCheckToggled () + { + updateSoftProofParameters (); + } + void updateParameters () { ConnectionBlocker profileBlocker (profileConn); @@ -115,8 +148,10 @@ private: intentBox.set_sensitive (false); intentBox.setSelected (0); + profileBox.set_tooltip_text (""); + } else { - const std::uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); + const uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); const bool supportsRelativeColorimetric = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; const bool supportsAbsoluteColorimetric = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC; @@ -130,6 +165,8 @@ private: intentBox.set_sensitive (false); intentBox.setSelected (0); } + + profileBox.set_tooltip_text (profileBox.get_active_text ()); } rtengine::RenderingIntent intent; @@ -155,22 +192,38 @@ private: processor->endUpdateParams (rtengine::EvMonitorTransform); } + void updateSoftProofParameters () + { + spGamutCheck.set_sensitive(softProof.get_active()); + + if (profileBox.get_active_row_number () > 0) { + processor->beginUpdateParams (); + processor->setSoftProofing (softProof.get_active(), spGamutCheck.get_active()); + processor->endUpdateParams (rtengine::EvMonitorTransform); + } + } + public: - MonitorProfileSelector (rtengine::StagedImageProcessor* const& ipc) : + ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) : intentBox (Glib::ustring (), true), processor (ipc) { prepareProfileBox (); prepareIntentBox (); + prepareSoftProofingBox (); reset (); - profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &MonitorProfileSelector::profileBoxChanged)); - intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &MonitorProfileSelector::intentBoxChanged)); + softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); + spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled));; + profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged)); + intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::intentBoxChanged)); } void pack_end_in (Gtk::Box* box) { + box->pack_end (spGamutCheck, Gtk::PACK_SHRINK, 0); + box->pack_end (softProof, Gtk::PACK_SHRINK, 0); box->pack_end (*intentBox.buttonGroup, Gtk::PACK_SHRINK, 0); box->pack_end (profileBox, Gtk::PACK_SHRINK, 0); } @@ -443,9 +496,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iops->pack_end (*Gtk::manage(new Gtk::VSeparator()), Gtk::PACK_SHRINK, 0); - // Monitor profile buttons - monitorProfile.reset (new MonitorProfileSelector (ipc)); - monitorProfile->pack_end_in (iops); + // Color management toolbar + colorMgmtToolBar.reset (new ColorManagementToolbar (ipc)); + colorMgmtToolBar->pack_end_in (iops); editbox->pack_start (*Gtk::manage(new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0); editbox->pack_start (*iops, Gtk::PACK_SHRINK, 0); @@ -754,7 +807,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) history->resetSnapShotNumber(); - monitorProfile->reset (); + colorMgmtToolBar->reset (); } void EditorPanel::close () diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index e506e1583..dbf99d58d 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -84,8 +84,8 @@ protected: Gtk::Button* navNext; Gtk::Button* navPrev; - class MonitorProfileSelector; - std::unique_ptr monitorProfile; + class ColorManagementToolbar; + std::unique_ptr colorMgmtToolBar; ImageAreaPanel* iareapanel; PreviewHandler* previewHandler; diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 3ed7608f1..ad11e079d 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -1179,6 +1179,7 @@ void FileCatalog::developRequested (std::vector tbe, bool fas params.icm.working = options.fastexport_icm_working ; params.icm.output = options.fastexport_icm_output ; params.icm.outputIntent = options.fastexport_icm_outputIntent ; + params.icm.outputBPC = options.fastexport_icm_outputBPC ; params.icm.gamma = options.fastexport_icm_gamma ; params.resize.enabled = options.fastexport_resize_enabled ; params.resize.scale = options.fastexport_resize_scale ; diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index cc2cbc039..e1fc802d6 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -202,6 +202,11 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch ointent->set_active (1); oVBox->pack_start(*riHBox, Gtk::PACK_SHRINK); + // Black Point Compensation + obpc = Gtk::manage(new Gtk::CheckButton((M("TP_ICM_BPC")))); + obpc->set_active (true); + oVBox->pack_start(*obpc, Gtk::PACK_SHRINK); + // Output gamma Gtk::HBox* gaHBox = Gtk::manage (new Gtk::HBox ()); @@ -295,6 +300,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch wgamma->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::gpChanged) ); dcpIll->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::dcpIlluminantChanged) ); + obpcconn = obpc->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::oBPCChanged) ); gamcsconn = freegamma->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::GamChanged)); tcurveconn = ckbToneCurve->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::toneCurveChanged)); ltableconn = ckbApplyLookTable->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyLookTableChanged)); @@ -455,6 +461,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) disableListener (); + obpcconn.block (true); ipc.block (true); gamcsconn.block (true); tcurveconn.block(true); @@ -469,36 +476,50 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) if (pp->icm.input == "(none)") { inone->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else if (pp->icm.input == "(embedded)" || ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() == Gtk::STATE_INSENSITIVE)) { iembedded->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) { icameraICC->set_active (true); - ckbBlendCMSMatrix->set_sensitive (true); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (true); + } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() != Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // this is the case when (cameraICC) is instructed by packaged profiles, but ICC file is not found // therefore falling back UI to explicitly reflect the (camera) option icamera->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() == Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // If neither (camera) nor (cameraICC) are available, as is the case when loading a non-raw, activate (embedded). iembedded->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() != Gtk::STATE_INSENSITIVE) { icamera->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else { ifromfile->set_active (true); oldip = pp->icm.input.substr(5); // cut of "file:" ipDialog->set_filename (pp->icm.input.substr(5)); - ckbBlendCMSMatrix->set_sensitive (true); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (true); + } updateDCP(pp->icm.dcpIlluminant, pp->icm.input.substr(5)); } @@ -516,6 +537,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) } ointent->set_active(pp->icm.outputIntent); + obpc->set_active (pp->icm.outputBPC); ckbToneCurve->set_active (pp->icm.toneCurve); lastToneCurve = pp->icm.toneCurve; ckbApplyLookTable->set_active (pp->icm.applyLookTable); @@ -528,22 +550,28 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) ckbBlendCMSMatrix->set_active (pp->icm.blendCMSMatrix); lastBlendCMSMatrix = pp->icm.blendCMSMatrix; - onames->set_sensitive(wgamma->get_active_row_number() == 0 || freegamma->get_active()); //"default" - wgamma->set_sensitive(!freegamma->get_active()); - freegamma->set_active (pp->icm.freegamma); lastgamfree = pp->icm.freegamma; + if (!batchMode) { + onames->set_sensitive(wgamma->get_active_row_number() == 0 && !pp->icm.freegamma); //"default" + wgamma->set_sensitive(!pp->icm.freegamma); + gampos->set_sensitive(pp->icm.freegamma); + slpos->set_sensitive(pp->icm.freegamma); + } + gampos->setValue (pp->icm.gampos); slpos->setValue (pp->icm.slpos); if (pedited) { iunchanged->set_active (!pedited->icm.input); + obpc->set_inconsistent(!pedited->icm.outputBPC); ckbToneCurve->set_inconsistent(!pedited->icm.toneCurve); ckbApplyLookTable->set_inconsistent(!pedited->icm.applyLookTable); ckbApplyBaselineExposureOffset->set_inconsistent(!pedited->icm.applyBaselineExposureOffset); ckbApplyHueSatMap->set_inconsistent(!pedited->icm.applyHueSatMap); ckbBlendCMSMatrix->set_inconsistent(!pedited->icm.blendCMSMatrix); + freegamma->set_inconsistent (!pedited->icm.freegamma); if (!pedited->icm.working) { wnames->set_active_text(M("GENERAL_UNCHANGED")); @@ -578,6 +606,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) hsmconn.block(false); gamcsconn.block (false); ipc.block (false); + obpcconn.block (false); enableListener (); } @@ -655,12 +684,14 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.blendCMSMatrix = ckbBlendCMSMatrix->get_active (); pp->icm.gampos = (double) gampos->getValue(); pp->icm.slpos = (double) slpos->getValue(); + pp->icm.outputBPC = obpc->get_active (); if (pedited) { pedited->icm.input = !iunchanged->get_active (); pedited->icm.working = wnames->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.output = onames->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.outputIntent = ointent->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->icm.outputBPC = !obpc->get_inconsistent (); pedited->icm.dcpIlluminant = dcpIll->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.toneCurve = !ckbToneCurve->get_inconsistent (); pedited->icm.applyLookTable = !ckbApplyLookTable->get_inconsistent (); @@ -697,7 +728,7 @@ void ICMPanel::setAdjusterBehavior (bool gammaadd, bool slopeadd) void ICMPanel::adjusterChanged (Adjuster* a, double newval) { - if (listener && freegamma->get_active()) { + if (listener && (freegamma->get_active() || batchMode)) { Glib::ustring costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), newval); @@ -735,7 +766,7 @@ void ICMPanel::dcpIlluminantChanged() void ICMPanel::toneCurveChanged() { - if (batchMode) { + if (multiImage) { if (ckbToneCurve->get_inconsistent()) { ckbToneCurve->set_inconsistent (false); tcurveconn.block (true); @@ -749,13 +780,19 @@ void ICMPanel::toneCurveChanged() } if (listener) { - listener->panelChanged (EvDCPToneCurve, ckbToneCurve->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbToneCurve->get_inconsistent()) { + listener->panelChanged (EvDCPToneCurve, M("GENERAL_UNCHANGED")); + } else if (ckbToneCurve->get_active()) { + listener->panelChanged (EvDCPToneCurve, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPToneCurve, M("GENERAL_DISABLED")); + } } } void ICMPanel::applyLookTableChanged() { - if (batchMode) { + if (multiImage) { if (ckbApplyLookTable->get_inconsistent()) { ckbApplyLookTable->set_inconsistent (false); ltableconn.block (true); @@ -769,13 +806,19 @@ void ICMPanel::applyLookTableChanged() } if (listener) { - listener->panelChanged (EvDCPApplyLookTable, ckbApplyLookTable->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbApplyLookTable->get_inconsistent()) { + listener->panelChanged (EvDCPApplyLookTable, M("GENERAL_UNCHANGED")); + } else if (ckbApplyLookTable->get_active()) { + listener->panelChanged (EvDCPApplyLookTable, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPApplyLookTable, M("GENERAL_DISABLED")); + } } } void ICMPanel::applyBaselineExposureOffsetChanged() { - if (batchMode) { + if (multiImage) { if (ckbApplyBaselineExposureOffset->get_inconsistent()) { ckbApplyBaselineExposureOffset->set_inconsistent (false); beoconn.block (true); @@ -789,13 +832,19 @@ void ICMPanel::applyBaselineExposureOffsetChanged() } if (listener) { - listener->panelChanged (EvDCPApplyBaselineExposureOffset, ckbApplyBaselineExposureOffset->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbApplyBaselineExposureOffset->get_inconsistent()) { + listener->panelChanged (EvDCPApplyBaselineExposureOffset, M("GENERAL_UNCHANGED")); + } else if (ckbApplyBaselineExposureOffset->get_active()) { + listener->panelChanged (EvDCPApplyBaselineExposureOffset, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPApplyBaselineExposureOffset, M("GENERAL_DISABLED")); + } } } void ICMPanel::applyHueSatMapChanged() { - if (batchMode) { + if (multiImage) { if (ckbApplyHueSatMap->get_inconsistent()) { ckbApplyHueSatMap->set_inconsistent (false); hsmconn.block (true); @@ -809,7 +858,13 @@ void ICMPanel::applyHueSatMapChanged() } if (listener) { - listener->panelChanged (EvDCPApplyHueSatMap, ckbApplyHueSatMap->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbApplyHueSatMap->get_inconsistent()) { + listener->panelChanged (EvDCPApplyHueSatMap, M("GENERAL_UNCHANGED")); + } else if (ckbApplyHueSatMap->get_active()) { + listener->panelChanged (EvDCPApplyHueSatMap, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPApplyHueSatMap, M("GENERAL_DISABLED")); + } } } @@ -846,7 +901,7 @@ void ICMPanel::ipChanged () void ICMPanel::blendCMSMatrixChanged() { - if (batchMode) { + if (multiImage) { if (ckbBlendCMSMatrix->get_inconsistent()) { ckbBlendCMSMatrix->set_inconsistent (false); blendcmsconn.block (true); @@ -860,13 +915,19 @@ void ICMPanel::blendCMSMatrixChanged() } if (listener) { - listener->panelChanged (EvBlendCMSMatrix, ckbBlendCMSMatrix->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbBlendCMSMatrix->get_inconsistent()) { + listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_UNCHANGED")); + } else if (ckbBlendCMSMatrix->get_active()) { + listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_DISABLED")); + } } } void ICMPanel::GamChanged() { - if (batchMode) { + if (multiImage) { if (freegamma->get_inconsistent()) { freegamma->set_inconsistent (false); gamcsconn.block (true); @@ -880,14 +941,25 @@ void ICMPanel::GamChanged() } if (listener) { - if (freegamma->get_active()) { + if (freegamma->get_inconsistent()) { + listener->panelChanged (EvGAMFREE, M("GENERAL_UNCHANGED")); + } + else if (freegamma->get_active()) { listener->panelChanged (EvGAMFREE, M("GENERAL_ENABLED")); - onames->set_sensitive(!freegamma->get_active());//disabled choice - wgamma->set_sensitive(!freegamma->get_active()); + if (!batchMode) { + onames->set_sensitive(false);//disabled choice + wgamma->set_sensitive(false); + gampos->set_sensitive(true); + slpos->set_sensitive(true); + } } else { listener->panelChanged (EvGAMFREE, M("GENERAL_DISABLED")); - onames->set_sensitive(!freegamma->get_active() && wgamma->get_active_row_number() == 0); - wgamma->set_sensitive(!freegamma->get_active()); + if (!batchMode) { + onames->set_sensitive(wgamma->get_active_row_number() == 0); + wgamma->set_sensitive(true); + gampos->set_sensitive(false); + slpos->set_sensitive(false); + } } } } @@ -908,6 +980,32 @@ void ICMPanel::oiChanged () } } +void ICMPanel::oBPCChanged () +{ + if (multiImage) { + if (obpc->get_inconsistent()) { + obpc->set_inconsistent (false); + obpcconn.block (true); + obpc->set_active (false); + obpcconn.block (false); + } else if (lastobpc) { + obpc->set_inconsistent (true); + } + + lastobpc = obpc->get_active (); + } + + if (listener) { + if (obpc->get_inconsistent()) { + listener->panelChanged (EvOBPCompens, M("GENERAL_UNCHANGED")); + } else if (obpc->get_active()) { + listener->panelChanged (EvOBPCompens, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvOBPCompens, M("GENERAL_DISABLED")); + } + } +} + void ICMPanel::setRawMeta (bool raw, const rtengine::ImageData* pMeta) { diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 640cca5a2..03c894017 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -53,6 +53,8 @@ protected: sigc::connection beoconn; bool lastApplyHueSatMap; sigc::connection hsmconn; + bool lastobpc; + sigc::connection obpcconn; bool lastBlendCMSMatrix; bool isBatchMode; sigc::connection blendcmsconn; @@ -60,6 +62,7 @@ protected: private: Gtk::VBox * iVBox; + Gtk::CheckButton* obpc; Gtk::CheckButton* freegamma; Gtk::RadioButton* inone; @@ -108,6 +111,7 @@ public: void wpChanged (); void opChanged (); void oiChanged (); + void oBPCChanged (); void ipChanged (); void gpChanged (); void GamChanged (); diff --git a/rtgui/options.cc b/rtgui/options.cc index e723361be..9ba8b175a 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -469,6 +469,7 @@ void Options::setDefaults () fastexport_icm_working = "ProPhoto"; fastexport_icm_output = "RT_sRGB"; fastexport_icm_outputIntent = rtengine::RI_RELATIVE; + fastexport_icm_outputBPC = true; fastexport_icm_gamma = "default"; fastexport_resize_enabled = true; fastexport_resize_scale = 1; @@ -634,6 +635,8 @@ void Options::setDefaults () rtSettings.monitorProfile = Glib::ustring(); rtSettings.monitorIntent = rtengine::RI_RELATIVE; + rtSettings.monitorBPC = true; + rtSettings.monitorBPC = true; rtSettings.autoMonitorProfile = false; rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows) rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile" @@ -1463,6 +1466,10 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.monitorIntent = static_cast(keyFile.get_integer("Color Management", "Intent")); } + if (keyFile.has_key ("Color Management", "Intent")) { + rtSettings.monitorBPC = keyFile.get_boolean("Color Management", "MonitorBPC"); + } + if (keyFile.has_key ("Color Management", "CRI")) { rtSettings.CRI_color = keyFile.get_integer("Color Management", "CRI"); } @@ -1719,6 +1726,10 @@ int Options::readFromFile (Glib::ustring fname) fastexport_icm_outputIntent = static_cast(keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); } + if (keyFile.has_key ("Fast Export", "fastexport_icm_output_bpc" )) { + fastexport_icm_outputBPC = keyFile.get_boolean ("Fast Export", "fastexport_icm_output_bpc" ); + } + if (keyFile.has_key ("Fast Export", "fastexport_icm_gamma" )) { fastexport_icm_gamma = keyFile.get_string ("Fast Export", "fastexport_icm_gamma" ); } @@ -2028,6 +2039,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); + keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); @@ -2096,6 +2108,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); + keyFile.set_integer ("Fast Export", "fastexport_icm_output_bpc" , fastexport_icm_outputBPC ); keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); diff --git a/rtgui/options.h b/rtgui/options.h index 4da827f36..275ccbe69 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -260,6 +260,7 @@ public: Glib::ustring fastexport_icm_working; Glib::ustring fastexport_icm_output; rtengine::RenderingIntent fastexport_icm_outputIntent; + bool fastexport_icm_outputBPC; Glib::ustring fastexport_icm_gamma; bool fastexport_resize_enabled; double fastexport_resize_scale; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 0422f7403..b448cd2ee 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -353,8 +353,9 @@ void ParamsEdited::set (bool v) icm.working = v; icm.output = v; icm.outputIntent = v; + icm.outputBPC = v; icm.gamma = v; - icm.freegamma = v; + icm.freegamma = v; icm.gampos = v; icm.slpos = v; raw.bayersensor.method = v; @@ -847,6 +848,7 @@ void ParamsEdited::initFrom (const std::vector icm.working = icm.working && p.icm.working == other.icm.working; icm.output = icm.output && p.icm.output == other.icm.output; icm.outputIntent = icm.outputIntent && p.icm.outputIntent == other.icm.outputIntent; + icm.outputBPC = icm.outputBPC && p.icm.outputBPC == other.icm.outputBPC ; icm.gamma = icm.gamma && p.icm.gamma == other.icm.gamma; icm.freegamma = icm.freegamma && p.icm.freegamma == other.icm.freegamma; icm.gampos = icm.gampos && p.icm.gampos == other.icm.gampos; @@ -2210,6 +2212,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.icm.outputIntent = mods.icm.outputIntent; } + if (icm.outputBPC) { + toEdit.icm.outputBPC = mods.icm.outputBPC; + } + //if (icm.gampos) toEdit.icm.gampos = mods.icm.gampos; //if (icm.slpos) toEdit.icm.slpos = mods.icm.slpos; if (icm.gampos) { diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index f8d18ae57..5c35b20da 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -544,6 +544,7 @@ public: bool working; bool output; bool outputIntent; + bool outputBPC; bool gamma; bool gampos; bool slpos; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 14c9cb0eb..7c325033b 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -707,6 +707,9 @@ Gtk::Widget* Preferences::getColorManagementPanel () monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); monIntent->set_active (1); + monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_MONBPC"))); + monBPC->set_active (true); + iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); #if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 @@ -716,22 +719,24 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::Table* colt = Gtk::manage (new Gtk::Table (3, 2)); int row = 0; - colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #if !defined(__APPLE__) // monitor profile not supported on apple ++row; - colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #if defined(WIN32) ++row; - colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #endif #endif ++row; - colt->attach (*milabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*milabel, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); mvbcm->pack_start (*colt, Gtk::PACK_SHRINK, 4); + mvbcm->pack_start (*monBPC, Gtk::PACK_SHRINK, 4); + #if defined(WIN32) autoMonProfileToggled(); #endif @@ -1458,6 +1463,7 @@ void Preferences::storePreferences () moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; break; } + moptions.rtSettings.monitorBPC = monBPC->get_active (); #if defined(WIN32) moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active (); #endif @@ -1588,6 +1594,7 @@ void Preferences::fillPreferences () monIntent->set_active (2); break; } + monBPC->set_active (moptions.rtSettings.monitorBPC); #if defined(WIN32) cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile); #endif diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 1cfb435cf..87af25941 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -97,6 +97,7 @@ protected: Gtk::FileChooserButton* iccDir; Gtk::ComboBoxText* monProfile; Gtk::ComboBoxText* monIntent; + Gtk::CheckButton* monBPC; Gtk::CheckButton* cbAutoMonProfile; //Gtk::CheckButton* cbAutocielab; Gtk::CheckButton* cbciecamfloat; diff --git a/tools/color_management.svg b/tools/color_management.svg new file mode 100644 index 000000000..0307fa81c --- /dev/null +++ b/tools/color_management.svg @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + Espace couleurde travail (WCS) + + + + Profile ICC/ICMde sortie + + + + Profile ICC/ICMdu moniteur + + + + Moniteur + + + + Imprimante + + Fichier de sortie + Epreuvage écran + options.rtSettings.HistogramWorking + + + Image L*a*b + Fin du pipeline + + + + From 827acd35f9d5ea8f7209dc13e53221ff09a555fa Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 27 Aug 2016 22:20:54 +0200 Subject: [PATCH 002/115] Some bugfix. --- rtdata/images/Dark/actions/spGamutCheck.png | Bin 0 -> 707 bytes rtdata/images/Dark/actions/unchanged-18.png | Bin 0 -> 149 bytes rtdata/images/Dark/actions/unchanged-22.png | Bin 0 -> 153 bytes rtdata/images/Light/actions/spGamutCheck.png | Bin 0 -> 701 bytes rtdata/images/Light/actions/unchanged-18.png | Bin 0 -> 149 bytes rtdata/images/Light/actions/unchanged-22.png | Bin 0 -> 153 bytes rtengine/FTblockDN.cc | 1 + rtengine/color.cc | 15 +- rtengine/color.h | 29 +- rtengine/curves.cc | 1 + rtengine/iccstore.cc | 320 ++-- rtengine/iccstore.h | 27 +- rtengine/improccoordinator.cc | 1 + rtengine/improcfun.cc | 4 +- rtengine/improcfun.h | 2 +- rtengine/iplab2rgb.cc | 8 +- rtengine/ipwavelet.cc | 1 + rtengine/rawimagesource.cc | 28 +- rtengine/simpleprocess.cc | 4 +- rtgui/curveeditorgroup.cc | 2 +- rtgui/editorpanel.cc | 22 +- rtgui/histogrampanel.cc | 2 +- rtgui/icmpanel.cc | 73 +- rtgui/icmpanel.h | 6 +- rtgui/options.cc | 1 - rtgui/preferences.cc | 11 +- tools/source_icons/scalable/spGamutCheck.file | 1 + tools/source_icons/scalable/spGamutCheck.svg | 1344 ++++++++++++++++ tools/source_icons/scalable/unchanged.file | 2 + tools/source_icons/scalable/unchanged.svg | 1357 +++++++++++++++++ 30 files changed, 3006 insertions(+), 256 deletions(-) create mode 100644 rtdata/images/Dark/actions/spGamutCheck.png create mode 100644 rtdata/images/Dark/actions/unchanged-18.png create mode 100644 rtdata/images/Dark/actions/unchanged-22.png create mode 100644 rtdata/images/Light/actions/spGamutCheck.png create mode 100644 rtdata/images/Light/actions/unchanged-18.png create mode 100644 rtdata/images/Light/actions/unchanged-22.png create mode 100644 tools/source_icons/scalable/spGamutCheck.file create mode 100644 tools/source_icons/scalable/spGamutCheck.svg create mode 100644 tools/source_icons/scalable/unchanged.file create mode 100644 tools/source_icons/scalable/unchanged.svg diff --git a/rtdata/images/Dark/actions/spGamutCheck.png b/rtdata/images/Dark/actions/spGamutCheck.png new file mode 100644 index 0000000000000000000000000000000000000000..ab812272ad767ac6e2bed75df47de549cc5e4515 GIT binary patch literal 707 zcmV;!0zCbRP){_v1#j zTD{fp_sakvgm_Xc7MqbLVwGMn#;i_Q{4#+1xm?Zv~CAk6M=&!)m+KiNPZ#;pdEf$Nr zQp!gpKP3i}>=X)x-zOy&3Waa2R_n2~_RX2W)>;B+PfISB%U#!XpLe_6*Mnkoz1fF0AP#>quBGj z5IEkw5Mnjnylzr(DwT@BM2^EInPm;Srh{JJj2o^$wVA-Gg3b&N4HNdW0|`ZE9pK&4Wt pPTZ3t4^k$&a`}9IAHe=3?+wL>2?- zL=a{S)t;~y$dD{?jVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw{mw=Ts7TDy#WBR9 pH#tFqb#a17Pg9@)7n>*p1KVr{#>bzJp9iX7@O1TaS?83{1OW1!CUF1& literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/spGamutCheck.png b/rtdata/images/Light/actions/spGamutCheck.png new file mode 100644 index 0000000000000000000000000000000000000000..b1ae3e423af9fb8cfe85cc3cf88364f40d8b5adf GIT binary patch literal 701 zcmV;u0z&eDO6jjZg8eE_2TO z=DatT0sd2Qa6xOmBqG;I9*9V}TCIKn;Qk4m&1UbAyno6-9w?UO(cT$Qc2g-hr7PJ=~6|7t@Kc@3a8WY4Wmr*n4{*pGoTN-1NEc>zEG zV0Ly^`@VlqL~^4*LlcvnaL&Dnpa4*>*DJ=D=Oi}(bp956A(cv1&hUsaW}D;_k{=U; zMWhvm;g4ZPW6YNz2%Z9Xp9D;jN2APP7@kxrm6rhC0f4pEMp_UAc4lVgvetSD_gsCLljKSqe3BIGd0qtT z6bgk??@4@)EfQ7`1mC;e?lyq-pytQ=<3Vv$6^q3q02^m%{a>M!YUT6!ASpavBwHlE z0S32l}h{8+V%LexeH(_33yo5>-BGaaHG*^iO6`u#0>zO05;RwL>2?- zL=a{S)t;~y$dD{?jVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw{mw=Ts7TDy#WBR9 pH#tFqb#a17Pg9@)7n>*p1KVr{#>bzJp9iX7@O1TaS?83{1OW1!CUF1& literal 0 HcmV?d00001 diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 288c9c994..a7e4ca27b 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -37,6 +37,7 @@ #include "opthelper.h" #include "cplx_wavelet_dec.h" #include "median.h" +#include "iccstore.h" #ifdef _OPENMP #include diff --git a/rtengine/color.cc b/rtengine/color.cc index c822a6f33..5f87ce1f6 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1433,7 +1433,7 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg Color::xyz2rgb(X, Y, Z, ro, go, bo, rgb_xyz);// ro go bo in gamut } -void Color::calcGamma (double pwr, double ts, int mode, int imax, double &gamma0, double &gamma1, double &gamma2, double &gamma3, double &gamma4, double &gamma5) +void Color::calcGamma (double pwr, double ts, int mode, int imax, GammaValues &gamma) { //from Dcraw (D.Coffin) int i; @@ -1469,12 +1469,13 @@ void Color::calcGamma (double pwr, double ts, int mode, int imax, double &gamma0 } if (!mode--) { - gamma0 = g[0]; - gamma1 = g[1]; - gamma2 = g[2]; - gamma3 = g[3]; - gamma4 = g[4]; - gamma5 = g[5]; + gamma.gamma0 = g[0]; + gamma.gamma1 = g[1]; + gamma.gamma2 = g[2]; + gamma.gamma3 = g[3]; + gamma.gamma4 = g[4]; + gamma.gamma5 = g[5]; + gamma.gamma6 = 0.; return; } } diff --git a/rtengine/color.h b/rtengine/color.h index bf42140c5..6566ea1ff 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -23,7 +23,6 @@ #include "rt_math.h" #include "LUT.h" #include "labimage.h" -#include "iccstore.h" #include "iccmatrices.h" #include "sleef.c" #define SAT(a,b,c) ((float)max(a,b,c)-(float)min(a,b,c))/(float)max(a,b,c) @@ -47,6 +46,7 @@ public: #endif + class Color { @@ -95,6 +95,17 @@ private: #endif public: + class GammaValues { + public: + double gamma0; + double gamma1; + double gamma2; + double gamma3; + double gamma4; + double gamma5; + double gamma6; + }; + typedef enum Channel { CHANNEL_RED = 1 << 0, CHANNEL_GREEN = 1 << 1, @@ -852,21 +863,21 @@ public: return h; } - /** * @brief Get the gamma curves' parameters used by LCMS2 * @param pwr gamma value [>1] * @param ts slope [0 ; 20] * @param mode [always 0] * @imax imax [always 0] - * @param gamma0 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) - * @param gamma1 used in ip2Lab2rgb [0 ; 20], can be superior to 20, but it's quite unusual(return value) - * @param gamma2 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) - * @param gamma3 used in ip2Lab2rgb [0 ; 1], usually near 0.003(return value) - * @param gamma4 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) - * @param gamma5 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) + * @param gamma a pointer to an array of 6 double gamma values: + * gamma0 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) + * gamma1 used in ip2Lab2rgb [0 ; 20], can be superior to 20, but it's quite unusual(return value) + * gamma2 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) + * gamma3 used in ip2Lab2rgb [0 ; 1], usually near 0.003(return value) + * gamma4 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) + * gamma5 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) */ - static void calcGamma (double pwr, double ts, int mode, int imax, double &gamma0, double &gamma1, double &gamma2, double &gamma3, double &gamma4, double &gamma5); + static void calcGamma (double pwr, double ts, int mode, int imax, GammaValues &gamma); /** diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 9b68cc9ee..2f1c274ea 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -36,6 +36,7 @@ #include "opthelper.h" #include "ciecam02.h" #include "color.h" +#include "iccstore.h" #undef CLIPD #define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 14b5dbc3c..559a5d009 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -96,20 +96,20 @@ void loadProfiles (const Glib::ustring& dirName, } catch (Glib::Exception&) {} } -inline void getSupportedIntent (cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, std::uint8_t& result) +inline void getSupportedIntent (cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, uint8_t& result) { if (cmsIsIntentSupported (profile, intent, direction)) { result |= 1 << intent; } } -inline std::uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number direction) +inline uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number direction) { if (!profile) { return 0; } - std::uint8_t result = 0; + uint8_t result = 0; getSupportedIntent (profile, INTENT_PERCEPTUAL, direction, result); getSupportedIntent (profile, INTENT_RELATIVE_COLORIMETRIC, direction, result); @@ -188,8 +188,8 @@ std::vector ICCStore::getProfilesFromDir (const Glib::ustring& di ProfileMap profiles; - loadProfiles (profilesDir, &profiles, NULL, NULL, false, true); - loadProfiles (dirName, &profiles, NULL, NULL, false, true); + loadProfiles (profilesDir, &profiles, nullptr, nullptr, false, true); + loadProfiles (dirName, &profiles, nullptr, nullptr, false, true); for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { res.push_back (profile->first); @@ -202,14 +202,14 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) { // forgive me for the messy code, quick hack to change gamma of an ICC profile to the RT standard gamma if (!iprof) { - return NULL; + return nullptr; } cmsUInt32Number bytesNeeded = 0; cmsSaveProfileToMem(iprof, 0, &bytesNeeded); if (bytesNeeded == 0) { - return NULL; + return nullptr; } uint8_t *data = new uint8_t[bytesNeeded + 1]; @@ -363,180 +363,167 @@ cmsHPROFILE ICCStore::workingSpaceGamma (const Glib::ustring& name) const } } -void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, double *ga) +void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, Color::GammaValues &ga) { const double eps = 0.000000001; // not divide by zero if (!icm.freegamma) {//if Free gamma not selected // gamma : ga[0],ga[1],ga[2],ga[3],ga[4],ga[5] by calcul if(icm.gamma == "BT709_g2.2_s4.5") { - ga[0] = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin - ga[1] = 0.909995; - ga[2] = 0.090005; - ga[3] = 0.222222; - ga[4] = 0.081071; - ga[5] = 0.0; + ga.gamma0 = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin + ga.gamma1 = 0.909995; + ga.gamma2 = 0.090005; + ga.gamma3 = 0.222222; + ga.gamma4 = 0.081071; + ga.gamma5 = 0.0; } else if (icm.gamma == "sRGB_g2.4_s12.92") { - ga[0] = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom - ga[1] = 0.947858; - ga[2] = 0.052142; - ga[3] = 0.077399; - ga[4] = 0.039293; - ga[5] = 0.0; + ga.gamma0 = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom + ga.gamma1 = 0.947858; + ga.gamma2 = 0.052142; + ga.gamma3 = 0.077399; + ga.gamma4 = 0.039293; + ga.gamma5 = 0.0; } else if (icm.gamma == "High_g1.3_s3.35") { - ga[0] = 1.3 ; //for high dynamic images - ga[1] = 0.998279; - ga[2] = 0.001721; - ga[3] = 0.298507; - ga[4] = 0.005746; - ga[5] = 0.0; + ga.gamma0 = 1.3 ; //for high dynamic images + ga.gamma1 = 0.998279; + ga.gamma2 = 0.001721; + ga.gamma3 = 0.298507; + ga.gamma4 = 0.005746; + ga.gamma5 = 0.0; } else if (icm.gamma == "Low_g2.6_s6.9") { - ga[0] = 2.6 ; //gamma 2.6 variable : for low contrast images - ga[1] = 0.891161; - ga[2] = 0.108839; - ga[3] = 0.144928; - ga[4] = 0.076332; - ga[5] = 0.0; + ga.gamma0 = 2.6 ; //gamma 2.6 variable : for low contrast images + ga.gamma1 = 0.891161; + ga.gamma2 = 0.108839; + ga.gamma3 = 0.144928; + ga.gamma4 = 0.076332; + ga.gamma5 = 0.0; } else if (icm.gamma == "linear_g1.0") { - ga[0] = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) - ga[1] = 1.; - ga[2] = 0.; - ga[3] = 1. / eps; - ga[4] = 0.; - ga[5] = 0.0; + ga.gamma0 = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) + ga.gamma1 = 1.; + ga.gamma2 = 0.; + ga.gamma3 = 1. / eps; + ga.gamma4 = 0.; + ga.gamma5 = 0.0; } else if (icm.gamma == "standard_g2.2") { - ga[0] = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) - ga[1] = 1.; - ga[2] = 0.; - ga[3] = 1. / eps; - ga[4] = 0.; - ga[5] = 0.0; + ga.gamma0 = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) + ga.gamma1 = 1.; + ga.gamma2 = 0.; + ga.gamma3 = 1. / eps; + ga.gamma4 = 0.; + ga.gamma5 = 0.0; } else if (icm.gamma == "standard_g1.8") { - ga[0] = 1.8; //gamma=1.8 (as gamma of Prophoto) - ga[1] = 1.; - ga[2] = 0.; - ga[3] = 1. / eps; - ga[4] = 0.; - ga[5] = 0.0; + ga.gamma0 = 1.8; //gamma=1.8 (as gamma of Prophoto) + ga.gamma1 = 1.; + ga.gamma2 = 0.; + ga.gamma3 = 1. / eps; + ga.gamma4 = 0.; + ga.gamma5 = 0.0; } } else { //free gamma selected - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; //gamma parameters + Color::GammaValues g_a; //gamma parameters double pwr = 1.0 / icm.gampos; double ts = icm.slpos; double slope = icm.slpos == 0 ? eps : icm.slpos; int mode = 0, imax = 0; - Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 - ga[4] = g_a3 * ts; - //printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); - ga[0] = icm.gampos; - ga[1] = 1. / (1.0 + g_a4); - ga[2] = g_a4 / (1.0 + g_a4); - ga[3] = 1. / slope; - ga[5] = 0.0; + Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 + ga.gamma4 = g_a.gamma3 * ts; + //printf("g_a.gamma0=%f g_a.gamma1=%f g_a.gamma2=%f g_a.gamma3=%f g_a.gamma4=%f\n", g_a.gamma0,g_a.gamma1,g_a.gamma2,g_a.gamma3,g_a.gamma4); + ga.gamma0 = icm.gampos; + ga.gamma1 = 1. / (1.0 + g_a.gamma4); + ga.gamma2 = g_a.gamma4 / (1.0 + g_a.gamma4); + ga.gamma3 = 1. / slope; + ga.gamma5 = 0.0; //printf("ga[0]=%f ga[1]=%f ga[2]=%f ga[3]=%f ga[4]=%f\n", ga[0],ga[1],ga[2],ga[3],ga[4]); } } -cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, double ga[]) { - float p1, p2, p3, p4, p5, p6; //primaries - ga[6] = 0.0; - int mode = 0, imax = 0; +cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga) { + float p[6]; //primaries + ga.gamma6 = 0.0; - int t50; - int select_temp = 1; //5003K + enum class ColorTemp { + D50 = 5003, // for Widegamut, Prophoto Best, Beta -> D50 + D65 = 6504 // for sRGB, AdobeRGB, Bruce Rec2020 -> D65 + }; + ColorTemp temp = ColorTemp::D50; //primaries for 7 working profiles ==> output profiles // eventually to adapt primaries if RT used special profiles ! if (icm.output == "WideGamut") { - p1 = 0.7350; //Widegamut primaries - p2 = 0.2650; - p3 = 0.1150; - p4 = 0.8260; - p5 = 0.1570; - p6 = 0.0180; - select_temp = 1; + p[0] = 0.7350; //Widegamut primaries + p[1] = 0.2650; + p[2] = 0.1150; + p[3] = 0.8260; + p[4] = 0.1570; + p[5] = 0.0180; } else if (icm.output == "Adobe RGB") { - p1 = 0.6400; //Adobe primaries - p2 = 0.3300; - p3 = 0.2100; - p4 = 0.7100; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; + p[0] = 0.6400; //Adobe primaries + p[1] = 0.3300; + p[2] = 0.2100; + p[3] = 0.7100; + p[4] = 0.1500; + p[5] = 0.0600; + temp = ColorTemp::D65; } else if (icm.output == "sRGB") { - p1 = 0.6400; // sRGB primaries - p2 = 0.3300; - p3 = 0.3000; - p4 = 0.6000; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; + p[0] = 0.6400; // sRGB primaries + p[1] = 0.3300; + p[2] = 0.3000; + p[3] = 0.6000; + p[4] = 0.1500; + p[5] = 0.0600; + temp = ColorTemp::D65; } else if (icm.output == "BruceRGB") { - p1 = 0.6400; // Bruce primaries - p2 = 0.3300; - p3 = 0.2800; - p4 = 0.6500; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; + p[0] = 0.6400; // Bruce primaries + p[1] = 0.3300; + p[2] = 0.2800; + p[3] = 0.6500; + p[4] = 0.1500; + p[5] = 0.0600; + temp = ColorTemp::D65; } else if (icm.output == "Beta RGB") { - p1 = 0.6888; // Beta primaries - p2 = 0.3112; - p3 = 0.1986; - p4 = 0.7551; - p5 = 0.1265; - p6 = 0.0352; - select_temp = 1; + p[0] = 0.6888; // Beta primaries + p[1] = 0.3112; + p[2] = 0.1986; + p[3] = 0.7551; + p[4] = 0.1265; + p[5] = 0.0352; } else if (icm.output == "BestRGB") { - p1 = 0.7347; // Best primaries - p2 = 0.2653; - p3 = 0.2150; - p4 = 0.7750; - p5 = 0.1300; - p6 = 0.0350; - select_temp = 1; + p[0] = 0.7347; // Best primaries + p[1] = 0.2653; + p[2] = 0.2150; + p[3] = 0.7750; + p[4] = 0.1300; + p[5] = 0.0350; } else if (icm.output == "Rec2020") { - p1 = 0.7080; // Rec2020 primaries - p2 = 0.2920; - p3 = 0.1700; - p4 = 0.7970; - p5 = 0.1310; - p6 = 0.0460; - select_temp = 2; + p[0] = 0.7080; // Rec2020 primaries + p[1] = 0.2920; + p[2] = 0.1700; + p[3] = 0.7970; + p[4] = 0.1310; + p[5] = 0.0460; + temp = ColorTemp::D65; } else { - p1 = 0.7347; //ProPhoto and default primaries - p2 = 0.2653; - p3 = 0.1596; - p4 = 0.8404; - p5 = 0.0366; - p6 = 0.0001; - select_temp = 1; - } - - if(select_temp == 1) { - t50 = 5003; // for Widegamut, Prophoto Best, Beta -> D50 - } else if (select_temp == 2) { - t50 = 6504; // for sRGB, AdobeRGB, Bruce Rec2020 -> D65 + p[0] = 0.7347; //ProPhoto and default primaries + p[1] = 0.2653; + p[2] = 0.1596; + p[3] = 0.8404; + p[4] = 0.0366; + p[5] = 0.0001; } cmsCIExyY xyD; cmsCIExyYTRIPLE Primaries = { - {p1, p2, 1.0}, // red - {p3, p4, 1.0}, // green - {p5, p6, 1.0} // blue + {p[0], p[1], 1.0}, // red + {p[2], p[3], 1.0}, // green + {p[4], p[5], 1.0} // blue }; cmsToneCurve* GammaTRC[3]; - cmsFloat64Number Parameters[7]; // 7 parameters for smoother curves - Parameters[0] = ga[0]; - Parameters[1] = ga[1]; - Parameters[2] = ga[2]; - Parameters[3] = ga[3]; - Parameters[4] = ga[4]; - Parameters[5] = ga[5]; - Parameters[6] = ga[6]; - cmsWhitePointFromTemp(&xyD, t50); - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters);//5 = more smoother than 4 + // 7 parameters for smoother curves + cmsFloat64Number Parameters[7] = { ga.gamma0, ga.gamma1, ga.gamma2, ga.gamma3, ga.gamma4, ga.gamma5, ga.gamma6 } ; + + cmsWhitePointFromTemp(&xyD, (double)temp); + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); //5 = smoother than 4 cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile cmsFreeToneCurve(GammaTRC[0]); @@ -544,10 +531,10 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam return oprofdef; } -cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, double ga[]) { +cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga) { bool pro = false; Glib::ustring outProfile; - cmsHPROFILE outputProfile = NULL; + cmsHPROFILE outputProfile = nullptr; if (icm.freegamma && icm.gampos < 1.35) { pro = true; //select profil with gammaTRC modified : @@ -583,7 +570,7 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan printf("\"%s\": unknown working profile! - use LCMS2 substitution\n", icm.working.c_str() ); } - return NULL; + return nullptr; } //begin adaptation rTRC gTRC bTRC @@ -594,16 +581,16 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan outputProfile = iccStore->getProfile(outProfile); //get output profile - if (outputProfile == NULL) { + if (outputProfile == nullptr) { if (settings->verbose) { printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); } - return NULL; + return nullptr; } // 7 parameters for smoother curves - cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] }; + cmsFloat64Number Parameters[7] = { ga.gamma0, ga.gamma1, ga.gamma2, ga.gamma3, ga.gamma4, ga.gamma5, ga.gamma6 }; //change desc Tag , to "free gamma", or "BT709", etc. cmsMLU *mlu; @@ -611,7 +598,7 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan mlu = cmsMLUalloc(ContextID, 1); // instruction with //ICC are used to generate ICC profile - if (mlu == NULL) { + if (mlu == nullptr) { printf("Description error\n"); } else { @@ -663,8 +650,8 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan } // Calculate output profile's rTRC gTRC bTRC - cmsToneCurve* GammaTRC = NULL; - GammaTRC = cmsBuildParametricToneCurve(NULL, 5, Parameters); + cmsToneCurve* GammaTRC = nullptr; + GammaTRC = cmsBuildParametricToneCurve(nullptr, 5, Parameters); cmsWriteTag(outputProfile, cmsSigRedTRCTag, (void*)GammaTRC ); cmsWriteTag(outputProfile, cmsSigGreenTRCTag, (void*)GammaTRC ); cmsWriteTag(outputProfile, cmsSigBlueTRCTag, (void*)GammaTRC ); @@ -680,14 +667,7 @@ bool ICCStore::outputProfileExist (const Glib::ustring& name) const { MyMutex::MyLock lock(mutex_); - - const ProfileMap::const_iterator r = fileProfiles.find (name); - - if (r != fileProfiles.end ()) { - return true; - } - - return false; + return fileProfiles.find(name) != fileProfiles.end(); } cmsHPROFILE ICCStore::getProfile (const Glib::ustring& name) const @@ -735,7 +715,7 @@ cmsHPROFILE ICCStore::getStdProfile (const Glib::ustring& name) const // profile does not exist if (f == fileStdProfilesFileNames.end ()) { - return NULL; + return nullptr; } // but there exists one => load it @@ -761,21 +741,21 @@ ProfileContent ICCStore::getContent (const Glib::ustring& name) const return r != fileProfileContents.end () ? r->second : ProfileContent(); } -std::uint8_t ICCStore::getInputIntents (cmsHPROFILE profile) const +uint8_t ICCStore::getInputIntents (cmsHPROFILE profile) const { MyMutex::MyLock lock (mutex_); return getSupportedIntents (profile, LCMS_USED_AS_INPUT); } -std::uint8_t ICCStore::getOutputIntents (cmsHPROFILE profile) const +uint8_t ICCStore::getOutputIntents (cmsHPROFILE profile) const { MyMutex::MyLock lock (mutex_); return getSupportedIntents (profile, LCMS_USED_AS_OUTPUT); } -std::uint8_t ICCStore::getProofIntents (cmsHPROFILE profile) const +uint8_t ICCStore::getProofIntents (cmsHPROFILE profile) const { MyMutex::MyLock lock (mutex_); @@ -792,15 +772,15 @@ void ICCStore::init (const Glib::ustring& usrICCDir, const Glib::ustring& rtICCD profilesDir = Glib::build_filename (rtICCDir, "output"); fileProfiles.clear(); fileProfileContents.clear(); - loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, NULL, false, true); - loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, NULL, false, true); + loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, nullptr, false, true); + loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, nullptr, false, true); // Input profiles // Load these to different areas, since the short name (e.g. "NIKON D700" may overlap between system/user and RT dir) stdProfilesDir = Glib::build_filename (rtICCDir, "input"); fileStdProfiles.clear(); fileStdProfilesFileNames.clear(); - loadProfiles (stdProfilesDir, NULL, NULL, &fileStdProfilesFileNames, true, false); + loadProfiles (stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true, false); } // Determine the first monitor default profile of operating system, if selected @@ -843,7 +823,7 @@ void ICCStore::findDefaultMonitorProfile () } } -ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(NULL), length(0) +ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(nullptr), length(0) { FILE* f = g_fopen (fileName.c_str (), "rb"); @@ -870,14 +850,14 @@ ProfileContent::ProfileContent (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } } -ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(NULL), length(0) +ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(nullptr), length(0) { - if (hProfile != NULL) { + if (hProfile != nullptr) { cmsUInt32Number bytesNeeded = 0; cmsSaveProfileToMem(hProfile, 0, &bytesNeeded); @@ -901,7 +881,7 @@ ProfileContent& ProfileContent::operator= (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } return *this; @@ -913,7 +893,7 @@ cmsHPROFILE ProfileContent::toProfile () const if (data) { return cmsOpenProfileFromMem (data, length); } else { - return NULL; + return nullptr; } } diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 6aa30033e..dc2c5c12b 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -25,6 +25,7 @@ #include #include #include "procparams.h" +#include "color.h" #include "../rtgui/threadutils.h" namespace rtengine @@ -87,11 +88,11 @@ public: void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir); - static void getGammaArray(const procparams::ColorManagementParams &icm, double ga[]); // ga must be an array of double with 6 elements + static void getGammaArray(const procparams::ColorManagementParams &icm, Color::GammaValues &ga); static cmsHPROFILE makeStdGammaProfile (cmsHPROFILE iprof); static cmsHPROFILE createFromMatrix (const double matrix[3][3], bool gamma = false, const Glib::ustring& name = Glib::ustring()); - static cmsHPROFILE createGammaProfile (const procparams::ColorManagementParams &icm, double ga[]); - static cmsHPROFILE createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, double ga[]); + static cmsHPROFILE createGammaProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga); + static cmsHPROFILE createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga); // Main monitors standard profile name, from OS void findDefaultMonitorProfile (); @@ -114,19 +115,19 @@ public: std::vector getProfiles () const; std::vector getProfilesFromDir (const Glib::ustring& dirName) const; - std::uint8_t getInputIntents (cmsHPROFILE profile) const; - std::uint8_t getOutputIntents (cmsHPROFILE profile) const; - std::uint8_t getProofIntents (cmsHPROFILE profile) const; + uint8_t getInputIntents (cmsHPROFILE profile) const; + uint8_t getOutputIntents (cmsHPROFILE profile) const; + uint8_t getProofIntents (cmsHPROFILE profile) const; - std::uint8_t getInputIntents (const Glib::ustring& name) const; - std::uint8_t getOutputIntents (const Glib::ustring& name) const; - std::uint8_t getProofIntents (const Glib::ustring& name) const; + uint8_t getInputIntents (const Glib::ustring& name) const; + uint8_t getOutputIntents (const Glib::ustring& name) const; + uint8_t getProofIntents (const Glib::ustring& name) const; }; #define iccStore ICCStore::getInstance() inline ProfileContent::ProfileContent () : - data(NULL), + data(nullptr), length(0) { } @@ -146,17 +147,17 @@ inline Glib::ustring ICCStore::getDefaultMonitorProfileName () const return defaultMonitorProfile; } -inline std::uint8_t ICCStore::getInputIntents (const Glib::ustring &name) const +inline uint8_t ICCStore::getInputIntents (const Glib::ustring &name) const { return getInputIntents (getProfile (name)); } -inline std::uint8_t ICCStore::getOutputIntents (const Glib::ustring &name) const +inline uint8_t ICCStore::getOutputIntents (const Glib::ustring &name) const { return getOutputIntents (getProfile (name)); } -inline std::uint8_t ICCStore::getProofIntents (const Glib::ustring &name) const +inline uint8_t ICCStore::getProofIntents (const Glib::ustring &name) const { return getProofIntents (getProfile (name)); } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 5ba2dc5e1..e823b54a1 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -23,6 +23,7 @@ #include "../rtgui/ppversion.h" #include "colortemp.h" #include "improcfun.h" +#include "iccstore.h" #ifdef _OPENMP #include #endif diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index c511bf513..283b5007e 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -92,14 +92,14 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con if (softProof) { cmsHPROFILE oprof; if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - double ga[7]; + Color::GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createGammaProfile (icm, ga); printf("ImProcFunctions::updateColorProfiles / iccStore->createGammaProfile (icm, ga);\n"); } else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - double ga[7]; + Color::GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createCustomGammaOutputProfile (icm, ga); printf("ImProcFunctions::updateColorProfiles / iccStore->createCustomGammaOutputProfile (icm, ga);\n"); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 559456c32..ad7d6f56a 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -362,7 +362,7 @@ public: void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, double *ga=NULL); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, Color::GammaValues *ga=NULL); // CieImage *ciec; bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index ee3b35350..eec8987b7 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -280,7 +280,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, * If a custom gamma profile can be created, divide by 327.68, convert to xyz and apply the custom gamma transform * otherwise divide by 327.68, convert to xyz and apply the sRGB transform, before converting with gamma2curve */ -Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, double *ga) +Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, Color::GammaValues *ga) { //gamutmap(lab); @@ -305,9 +305,9 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int cmsHPROFILE oprof = NULL; if (ga) { - iccStore->getGammaArray(icm, ga); - oprof = iccStore->createGammaProfile(icm, ga); - printf("iccStore->createGammaProfile(icm, ga);\n"); + iccStore->getGammaArray(icm, *ga); + oprof = iccStore->createGammaProfile(icm, *ga); + printf("iccStore->createGammaProfile(icm, *ga);\n"); } else { oprof = iccStore->getProfile (icm.output); printf("iccStore->getProfile (%s);\n", icm.output.c_str()); diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 0f09f1ddd..7a0509966 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -39,6 +39,7 @@ #include "opthelper.h" #include "median.h" #include "EdgePreservingDecomposition.h" +#include "iccstore.h" #ifdef _OPENMP #include diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index a7ca7d86c..27c129a44 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1973,7 +1973,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } else if(retinexParams.gammaretinex == "hig") { retinexgamtab = &(Color::gammatab_145_3); } else if(retinexParams.gammaretinex == "fre") { - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; + Color::GammaValues g_a; double pwr = 1.0 / retinexParams.gam; double gamm = retinexParams.gam; double ts = retinexParams.slope; @@ -1984,21 +1984,21 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } int mode = 0, imax = 0; - Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope + Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); double start; double add; if(gamm2 < 1.) { - start = g_a2; - add = g_a4; + start = g_a.gamma2; + add = g_a.gamma4; } else { - start = g_a3; - add = g_a4; + start = g_a.gamma3; + add = g_a.gamma4; } - double mul = 1. + g_a4; + double mul = 1. + g_a.gamma4; lutTonereti(65536); @@ -2245,7 +2245,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC } else if(deh.gammaretinex == "hig") { retinexigamtab = &(Color::igammatab_145_3); } else if(deh.gammaretinex == "fre") { - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; + Color::GammaValues g_a; double pwr = 1.0 / deh.gam; double gamm = deh.gam; double gamm2 = gamm; @@ -2256,18 +2256,18 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC std::swap(pwr, gamm); } - Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope + Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope - double mul = 1. + g_a4; + double mul = 1. + g_a.gamma4; double add; double start; if(gamm2 < 1.) { - start = g_a3; - add = g_a3; + start = g_a.gamma3; + add = g_a.gamma3; } else { - add = g_a4; - start = g_a2; + add = g_a.gamma4; + start = g_a.gamma2; } // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 270661a33..74b8d6f5a 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1162,9 +1162,9 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - double ga[7]; + Color::GammaValues ga; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; - readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly, ga); + readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly, &ga); customGamma = true; //or selected Free gamma diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index f703169ed..adf950ab0 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -356,7 +356,7 @@ void CurveEditorGroup::setTooltip( Glib::ustring ttip) void CurveEditorGroup::setBatchMode (bool batchMode) { for (std::vector::iterator i = curveEditors.begin(); i != curveEditors.end(); ++i) { - (*i)->curveType->addEntry("curveType-unchanged.png", M("GENERAL_UNCHANGED")); + (*i)->curveType->addEntry("unchanged-18.png", M("GENERAL_UNCHANGED")); (*i)->curveType->show(); } } diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index d74d8ee9d..472081c23 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -68,11 +68,12 @@ private: void prepareIntentBox () { - intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); + // same order than the enum intentBox.addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); + intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); intentBox.addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); - intentBox.setSelected(0); + intentBox.setSelected(1); intentBox.show (); } @@ -146,7 +147,7 @@ private: profile.clear(); intentBox.set_sensitive (false); - intentBox.setSelected (0); + intentBox.setSelected (1); profileBox.set_tooltip_text (""); @@ -158,12 +159,15 @@ private: if (supportsPerceptual || supportsRelativeColorimetric || supportsAbsoluteColorimetric) { intentBox.set_sensitive (true); - intentBox.setItemSensitivity(0, supportsRelativeColorimetric); - intentBox.setItemSensitivity(1, supportsPerceptual); + intentBox.setItemSensitivity(0, supportsPerceptual); + intentBox.setItemSensitivity(1, supportsRelativeColorimetric); intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric); } else { + intentBox.setItemSensitivity(0, true); + intentBox.setItemSensitivity(1, true); + intentBox.setItemSensitivity(2, true); intentBox.set_sensitive (false); - intentBox.setSelected (0); + intentBox.setSelected (1); } profileBox.set_tooltip_text (profileBox.get_active_text ()); @@ -246,10 +250,10 @@ public: switch (options.rtSettings.monitorIntent) { default: - case rtengine::RI_RELATIVE: + case rtengine::RI_PERCEPTUAL: intentBox.setSelected (0); break; - case rtengine::RI_PERCEPTUAL: + case rtengine::RI_RELATIVE: intentBox.setSelected (1); break; case rtengine::RI_ABSOLUTE: @@ -806,8 +810,6 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) } history->resetSnapShotNumber(); - - colorMgmtToolBar->reset (); } void EditorPanel::close () diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 9c8163c8e..4c6d4f4c0 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -26,9 +26,9 @@ #include "../rtengine/improccoordinator.h" #include "../rtengine/color.h" #include "../rtengine/opthelper.h" +#include "../rtengine/iccstore.h" using namespace rtengine; -extern Glib::ustring argv0; extern Options options; diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index e1fc802d6..dcb8b30ce 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -193,13 +193,14 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch Gtk::HBox *riHBox = Gtk::manage ( new Gtk::HBox()); Gtk::Label* outputIntentLbl = Gtk::manage (new Gtk::Label(M("TP_ICM_PROFILEINTENT")+":")); riHBox->pack_start (*outputIntentLbl, Gtk::PACK_SHRINK); - ointent = Gtk::manage (new MyComboBoxText ()); - riHBox->pack_start (*ointent, Gtk::PACK_EXPAND_WIDGET); - ointent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); - ointent->append_text (M("PREFERENCES_INTENT_RELATIVE")); - ointent->append_text (M("PREFERENCES_INTENT_SATURATION")); - ointent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); - ointent->set_active (1); + ointent = Gtk::manage (new PopUpButton ()); + ointent->addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); + ointent->addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); + ointent->addEntry("intent-saturation.png", M("PREFERENCES_INTENT_SATURATION")); + ointent->addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); + ointent->setSelected (1); + ointent->show(); + riHBox->pack_start (*ointent->buttonGroup, Gtk::PACK_EXPAND_PADDING); oVBox->pack_start(*riHBox, Gtk::PACK_SHRINK); // Black Point Compensation @@ -319,6 +320,29 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch show_all (); } +void ICMPanel::updateRenderingIntent (const Glib::ustring &profile) { + const uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); + const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; + const bool supportsRelative = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; + const bool supportsSaturation = supportedIntents & 1 << INTENT_SATURATION; + const bool supportsAbsolute = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC; + + if (!profile.empty() && (supportsPerceptual || supportsRelative || supportsSaturation || supportsAbsolute)) { + ointent->set_sensitive (true); + ointent->setItemSensitivity(0, supportsPerceptual); + ointent->setItemSensitivity(1, supportsRelative); + ointent->setItemSensitivity(2, supportsSaturation); + ointent->setItemSensitivity(3, supportsAbsolute); + } else { + ointent->setItemSensitivity(0, true); + ointent->setItemSensitivity(1, true); + ointent->setItemSensitivity(2, true); + ointent->setItemSensitivity(3, true); + ointent->set_sensitive (false); + ointent->setSelected (1); + } +} + void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) { @@ -535,7 +559,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) if (onames->get_active_row_number() == -1) { onames->set_active_text (M("TP_ICM_NOICM")); } - ointent->set_active(pp->icm.outputIntent); + ointent->setSelected (pp->icm.outputIntent); obpc->set_active (pp->icm.outputBPC); ckbToneCurve->set_active (pp->icm.toneCurve); @@ -558,6 +582,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) wgamma->set_sensitive(!pp->icm.freegamma); gampos->set_sensitive(pp->icm.freegamma); slpos->set_sensitive(pp->icm.freegamma); + updateRenderingIntent(pp->icm.output); } gampos->setValue (pp->icm.gampos); @@ -582,7 +607,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) } if (!pedited->icm.outputIntent) { - ointent->set_active_text(M("GENERAL_UNCHANGED")); + ointent->setSelected (4); } if (!pedited->icm.dcpIlluminant) { @@ -646,7 +671,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.output = onames->get_active_text(); } - int ointentVal = ointent->get_active_row_number(); + int ointentVal = ointent->getSelected (); if (ointentVal >= 0 && ointentVal < RI__COUNT) { pp->icm.outputIntent = static_cast(ointentVal); } else { @@ -690,7 +715,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pedited->icm.input = !iunchanged->get_active (); pedited->icm.working = wnames->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.output = onames->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->icm.outputIntent = ointent->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->icm.outputIntent = ointent->getSelected () < 4; pedited->icm.outputBPC = !obpc->get_inconsistent (); pedited->icm.dcpIlluminant = dcpIll->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.toneCurve = !ckbToneCurve->get_inconsistent (); @@ -966,17 +991,37 @@ void ICMPanel::GamChanged() void ICMPanel::opChanged () { + updateRenderingIntent(onames->get_active_text()); if (listener) { listener->panelChanged (EvOProfile, onames->get_active_text()); } } -void ICMPanel::oiChanged () +void ICMPanel::oiChanged (int n) { if (listener) { - listener->panelChanged (EvOIntent, ointent->get_active_text()); + Glib::ustring str; + switch (n) { + case 0: + str = M("PREFERENCES_INTENT_PERCEPTUAL"); + break; + case 1: + str = M("PREFERENCES_INTENT_RELATIVE"); + break; + case 2: + str = M("PREFERENCES_INTENT_SATURATION"); + break; + case 3: + str = M("PREFERENCES_INTENT_ABSOLUTE"); + break; + case 4: + default: + str = M("GENERAL_UNCHANGED"); + break; + } + listener->panelChanged (EvOIntent, str); } } @@ -1104,7 +1149,7 @@ void ICMPanel::setBatchMode (bool batchMode) iVBox->reorder_child (*iunchanged, 5); removeIfThere (this, saveRef); onames->append_text (M("GENERAL_UNCHANGED")); - ointent->append_text (M("GENERAL_UNCHANGED")); + ointent->addEntry("unchanged-22.png", M("GENERAL_UNCHANGED")); wnames->append_text (M("GENERAL_UNCHANGED")); wgamma->append_text (M("GENERAL_UNCHANGED")); dcpIll->append_text (M("GENERAL_UNCHANGED")); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 03c894017..9ce31fbe0 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -25,6 +25,7 @@ #include "guiutils.h" #include "toolpanel.h" +#include "popupbutton.h" #include "../rtengine/imagedata.h" class ICMPanelListener @@ -81,7 +82,7 @@ private: MyComboBoxText* wgamma; MyComboBoxText* onames; - MyComboBoxText* ointent; + PopUpButton* ointent; Gtk::RadioButton* ofromdir; Gtk::RadioButton* ofromfile; Gtk::RadioButton* iunchanged; @@ -98,6 +99,7 @@ private: Glib::ustring lastRefFilename; Glib::ustring camName; void updateDCP(int dcpIlluminant, Glib::ustring dcp_name); + void updateRenderingIntent (const Glib::ustring &profile); public: ICMPanel (); @@ -110,7 +112,7 @@ public: void wpChanged (); void opChanged (); - void oiChanged (); + void oiChanged (int n); void oBPCChanged (); void ipChanged (); void gpChanged (); diff --git a/rtgui/options.cc b/rtgui/options.cc index 9ba8b175a..b1d68560a 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -636,7 +636,6 @@ void Options::setDefaults () rtSettings.monitorProfile = Glib::ustring(); rtSettings.monitorIntent = rtengine::RI_RELATIVE; rtSettings.monitorBPC = true; - rtSettings.monitorBPC = true; rtSettings.autoMonitorProfile = false; rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows) rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile" diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 7c325033b..c47b58b7d 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -702,8 +702,9 @@ Gtk::Widget* Preferences::getColorManagementPanel () for (std::vector::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) monProfile->append_text (*profile); - monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); + // same order than enum monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); + monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); monIntent->set_active (1); @@ -1454,10 +1455,10 @@ void Preferences::storePreferences () switch (monIntent->get_active_row_number ()) { default: case 0: - moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; + moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; break; case 1: - moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; + moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; break; case 2: moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; @@ -1584,10 +1585,10 @@ void Preferences::fillPreferences () setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); switch (moptions.rtSettings.monitorIntent) { default: - case rtengine::RI_RELATIVE: + case rtengine::RI_PERCEPTUAL: monIntent->set_active (0); break; - case rtengine::RI_PERCEPTUAL: + case rtengine::RI_RELATIVE: monIntent->set_active (1); break; case rtengine::RI_ABSOLUTE: diff --git a/tools/source_icons/scalable/spGamutCheck.file b/tools/source_icons/scalable/spGamutCheck.file new file mode 100644 index 000000000..f8b0d6338 --- /dev/null +++ b/tools/source_icons/scalable/spGamutCheck.file @@ -0,0 +1 @@ +spGamutCheck.png,w22,actions diff --git a/tools/source_icons/scalable/spGamutCheck.svg b/tools/source_icons/scalable/spGamutCheck.svg new file mode 100644 index 000000000..9748e3916 --- /dev/null +++ b/tools/source_icons/scalable/spGamutCheck.svg @@ -0,0 +1,1344 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + ! + diff --git a/tools/source_icons/scalable/unchanged.file b/tools/source_icons/scalable/unchanged.file new file mode 100644 index 000000000..bfeb052cd --- /dev/null +++ b/tools/source_icons/scalable/unchanged.file @@ -0,0 +1,2 @@ +unchanged-22.png,w22,actions +unchanged-18.png,w18,actions diff --git a/tools/source_icons/scalable/unchanged.svg b/tools/source_icons/scalable/unchanged.svg new file mode 100644 index 000000000..f0178a78a --- /dev/null +++ b/tools/source_icons/scalable/unchanged.svg @@ -0,0 +1,1357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + From f11ef69cda92b0ed5973a06177802442a8469da3 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 27 Aug 2016 23:20:37 +0200 Subject: [PATCH 003/115] Bugfix --- rtgui/icmpanel.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index dcb8b30ce..0098b4f16 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -991,7 +991,9 @@ void ICMPanel::GamChanged() void ICMPanel::opChanged () { - updateRenderingIntent(onames->get_active_text()); + if (!batchMode) { + updateRenderingIntent(onames->get_active_text()); + } if (listener) { listener->panelChanged (EvOProfile, onames->get_active_text()); @@ -1150,6 +1152,7 @@ void ICMPanel::setBatchMode (bool batchMode) removeIfThere (this, saveRef); onames->append_text (M("GENERAL_UNCHANGED")); ointent->addEntry("unchanged-22.png", M("GENERAL_UNCHANGED")); + ointent->show(); wnames->append_text (M("GENERAL_UNCHANGED")); wgamma->append_text (M("GENERAL_UNCHANGED")); dcpIll->append_text (M("GENERAL_UNCHANGED")); From 7c7cb9f9f12022de17adeee86271dc8c3bc5719c Mon Sep 17 00:00:00 2001 From: Hombre Date: Mon, 29 Aug 2016 21:04:59 +0200 Subject: [PATCH 004/115] Bug fix: the monitor profile and softproofing profile are now computed automatically even without special trigger event. The order of the Monitor Intent is now correct. --- rtengine/improccoordinator.cc | 7 +++++-- rtengine/improccoordinator.h | 7 +++++++ rtgui/editorpanel.cc | 6 +++--- rtgui/options.cc | 2 +- rtgui/preferences.cc | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index b0064bddb..3bcb2699b 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -88,7 +88,7 @@ ImProcCoordinator::ImProcCoordinator () fullw(1), fullh(1), pW(-1), pH(-1), plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), - resultValid(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), + resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1) {} @@ -778,7 +778,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } // Update the monitor color transform if necessary - if (todo & M_MONITOR) { + if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + lastOutputProfile = params.icm.output; + lastOutputIntent = params.icm.outputIntent; + lastOutputBPC = params.icm.outputBPC; ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck); } diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 4e7a8d62e..f20853d6d 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -180,6 +180,13 @@ protected: MyMutex mProcessing; ProcParams params; + // for optimization purpose, the output profile, output rendering intent and + // output BPC will trigger a regeneration of the profile on parameter change only + // and automatically + Glib::ustring lastOutputProfile; + RenderingIntent lastOutputIntent; + bool lastOutputBPC; + // members of the updater: Glib::Thread* thread; MyMutex updaterThreadStart; diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 472081c23..3323c795d 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -68,7 +68,7 @@ private: void prepareIntentBox () { - // same order than the enum + // same order as the enum intentBox.addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); intentBox.addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); @@ -177,10 +177,10 @@ private: switch (intentBox.getSelected ()) { default: case 0: - intent = rtengine::RI_RELATIVE; + intent = rtengine::RI_PERCEPTUAL; break; case 1: - intent = rtengine::RI_PERCEPTUAL; + intent = rtengine::RI_RELATIVE; break; case 2: intent = rtengine::RI_ABSOLUTE; diff --git a/rtgui/options.cc b/rtgui/options.cc index b1d68560a..66d84914b 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2107,7 +2107,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); - keyFile.set_integer ("Fast Export", "fastexport_icm_output_bpc" , fastexport_icm_outputBPC ); + keyFile.set_boolean ("Fast Export", "fastexport_icm_output_bpc" , fastexport_icm_outputBPC ); keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index c47b58b7d..980fc0702 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -702,7 +702,7 @@ Gtk::Widget* Preferences::getColorManagementPanel () for (std::vector::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) monProfile->append_text (*profile); - // same order than enum + // same order as the enum monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); From d762ef45109e2dd9afc8239c0cfce9e84aa43616 Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 30 Aug 2016 02:06:10 +0200 Subject: [PATCH 005/115] Bugfix + cleanup --- rtengine/improccoordinator.cc | 5 +++++ rtengine/improcfun.cc | 3 --- rtgui/icmpanel.cc | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 3bcb2699b..4aa0b8243 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -779,6 +779,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Update the monitor color transform if necessary if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + if (lastOutputIntent == RI__COUNT) { + // initializing... + monitorProfile = options.rtSettings.monitorProfile; + monitorIntent = options.rtSettings.monitorIntent; + } lastOutputProfile = params.icm.output; lastOutputIntent = params.icm.outputIntent; lastOutputBPC = params.icm.outputBPC; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b53254959..081afdf43 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -95,17 +95,14 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con Color::GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createGammaProfile (icm, ga); - printf("ImProcFunctions::updateColorProfiles / iccStore->createGammaProfile (icm, ga);\n"); } else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 Color::GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createCustomGammaOutputProfile (icm, ga); - printf("ImProcFunctions::updateColorProfiles / iccStore->createCustomGammaOutputProfile (icm, ga);\n"); } else { oprof = iccStore->getProfile(icm.output); - printf("ImProcFunctions::updateColorProfiles / iccStore->getProfile(%s);\n", icm.output.c_str()); } } diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 0098b4f16..ea258a319 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -321,12 +321,14 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch } void ICMPanel::updateRenderingIntent (const Glib::ustring &profile) { - const uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); + const uint8_t supportedIntents = rtengine::iccStore->getOutputIntents (profile); const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; const bool supportsRelative = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; const bool supportsSaturation = supportedIntents & 1 << INTENT_SATURATION; const bool supportsAbsolute = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC; + //printf("Intents: %d / Perceptual: %d Relative: %d Saturation: %d Absolute: %d\n", supportedIntents, supportsPerceptual, supportsRelative, supportsSaturation, supportsAbsolute); + if (!profile.empty() && (supportsPerceptual || supportsRelative || supportsSaturation || supportsAbsolute)) { ointent->set_sensitive (true); ointent->setItemSensitivity(0, supportsPerceptual); From 72db91b574ebd1bfdda1a12ac1bbcae975dcd056 Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 30 Aug 2016 03:16:22 +0200 Subject: [PATCH 006/115] Updated color_management.svg explanation file --- tools/color_management.svg | 505 +++++++++++++++++++++++++++---------- 1 file changed, 365 insertions(+), 140 deletions(-) diff --git a/tools/color_management.svg b/tools/color_management.svg index 0307fa81c..d60fcefd3 100644 --- a/tools/color_management.svg +++ b/tools/color_management.svg @@ -18,6 +18,63 @@ sodipodi:docname="color_management.svg"> + + + + + + + + + + + + + inkscape:isstock="true" + inkscape:collect="always"> image/svg+xml - + @@ -208,115 +266,114 @@ inkscape:groupmode="layer" id="layer1" transform="translate(0,-308.26772)"> + + id="path9187" + d="m 548.40112,670.64952 0,50.45433" + style="fill:none;fill-rule:evenodd;stroke:#b049e1;stroke-width:7;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker9189)" /> + + + + style="opacity:1;fill:#ffffff;fill-opacity:0.71270716;fill-rule:nonzero;stroke:none;stroke-width:7;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect10399" + width="169.52106" + height="31.025021" + x="599.28571" + y="405.36221" /> + + + Output ICC profile & intent + + + Monitor ICC profile & intent + id="g9171" + transform="translate(65.286377,16)"> - Espace couleurde travail (WCS) - - - - Profile ICC/ICMde sortie - - - - Profile ICC/ICMdu moniteur - - - Moniteur + sodipodi:role="line">Monitor + id="g9176" + transform="translate(68.218231,40)"> Imprimante + sodipodi:role="line">Printer - Fichier de sortie + + + Output file + + Epreuvage écran + x="471.19366" + y="469.87708" + style="font-size:10px">Soft-proofing path(Output Black Point Compensation) options.rtSettings.HistogramWorking + sodipodi:role="line" + style="font-size:10px;text-align:center;text-anchor:middle">Only ifoptions.rtSettings.HistogramWorking = 1(Output Black Point Compensation) + x="359.46707" + y="361.55499" /> + transform="translate(322.64831,127.10442)"> Image L*a*b + sodipodi:role="line">L*a*b image Fin du pipeline + sodipodi:role="line">End of pipeline + Normal path(Monitor Black Point Compensation) + + Used fo image analysis only withoptions.rtSettings.HistogramWorking = 1 + Used fo image analysis withoptions.rtSettings.HistogramWorking = 0 + + Working space profile (output intent) + "Working" image + Output image * + Preview image + sodipodi:nodetypes="cc" /> + * When options.rtSettings.HistogramWorking = 1 and soft-proofing is enabled, the Output image does not really exist, i.e. no memory is allocated, the CMM only makes a double conversion of each pixel of the Lab image From d31de41f68cfcb9c3f5043987fdba0d882eed550 Mon Sep 17 00:00:00 2001 From: Hombre Date: Wed, 31 Aug 2016 23:40:27 +0200 Subject: [PATCH 007/115] Cleaner implementation of the gamma array (more C++11) --- rtengine/color.cc | 14 ++--- rtengine/color.h | 13 +---- rtengine/iccstore.cc | 108 ++++++++++++++++++------------------- rtengine/iccstore.h | 6 +-- rtengine/improcfun.cc | 4 +- rtengine/improcfun.h | 2 +- rtengine/iplab2rgb.cc | 2 +- rtengine/rawimagesource.cc | 24 ++++----- rtengine/simpleprocess.cc | 2 +- 9 files changed, 81 insertions(+), 94 deletions(-) diff --git a/rtengine/color.cc b/rtengine/color.cc index 949e3c52e..41b7e7293 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1469,13 +1469,13 @@ void Color::calcGamma (double pwr, double ts, int mode, int imax, GammaValues &g } if (!mode--) { - gamma.gamma0 = g[0]; - gamma.gamma1 = g[1]; - gamma.gamma2 = g[2]; - gamma.gamma3 = g[3]; - gamma.gamma4 = g[4]; - gamma.gamma5 = g[5]; - gamma.gamma6 = 0.; + gamma[0] = g[0]; + gamma[1] = g[1]; + gamma[2] = g[2]; + gamma[3] = g[3]; + gamma[4] = g[4]; + gamma[5] = g[5]; + gamma[6] = 0.; return; } } diff --git a/rtengine/color.h b/rtengine/color.h index b08ad5948..03ae5afb4 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -30,6 +30,8 @@ namespace rtengine { +typedef std::array GammaValues; + #ifdef _DEBUG class MunsellDebugInfo @@ -95,17 +97,6 @@ private: #endif public: - class GammaValues { - public: - double gamma0; - double gamma1; - double gamma2; - double gamma3; - double gamma4; - double gamma5; - double gamma6; - }; - typedef enum Channel { CHANNEL_RED = 1 << 0, CHANNEL_GREEN = 1 << 1, diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 559a5d009..166ee1cc9 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -363,83 +363,79 @@ cmsHPROFILE ICCStore::workingSpaceGamma (const Glib::ustring& name) const } } -void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, Color::GammaValues &ga) +void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, GammaValues &ga) { const double eps = 0.000000001; // not divide by zero if (!icm.freegamma) {//if Free gamma not selected // gamma : ga[0],ga[1],ga[2],ga[3],ga[4],ga[5] by calcul if(icm.gamma == "BT709_g2.2_s4.5") { - ga.gamma0 = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin - ga.gamma1 = 0.909995; - ga.gamma2 = 0.090005; - ga.gamma3 = 0.222222; - ga.gamma4 = 0.081071; - ga.gamma5 = 0.0; + ga[0] = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin + ga[1] = 0.909995; + ga[2] = 0.090005; + ga[3] = 0.222222; + ga[4] = 0.081071; } else if (icm.gamma == "sRGB_g2.4_s12.92") { - ga.gamma0 = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom - ga.gamma1 = 0.947858; - ga.gamma2 = 0.052142; - ga.gamma3 = 0.077399; - ga.gamma4 = 0.039293; - ga.gamma5 = 0.0; + ga[0] = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom + ga[1] = 0.947858; + ga[2] = 0.052142; + ga[3] = 0.077399; + ga[4] = 0.039293; } else if (icm.gamma == "High_g1.3_s3.35") { - ga.gamma0 = 1.3 ; //for high dynamic images - ga.gamma1 = 0.998279; - ga.gamma2 = 0.001721; - ga.gamma3 = 0.298507; - ga.gamma4 = 0.005746; - ga.gamma5 = 0.0; + ga[0] = 1.3 ; //for high dynamic images + ga[1] = 0.998279; + ga[2] = 0.001721; + ga[3] = 0.298507; + ga[4] = 0.005746; } else if (icm.gamma == "Low_g2.6_s6.9") { - ga.gamma0 = 2.6 ; //gamma 2.6 variable : for low contrast images - ga.gamma1 = 0.891161; - ga.gamma2 = 0.108839; - ga.gamma3 = 0.144928; - ga.gamma4 = 0.076332; - ga.gamma5 = 0.0; - } else if (icm.gamma == "linear_g1.0") { - ga.gamma0 = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) - ga.gamma1 = 1.; - ga.gamma2 = 0.; - ga.gamma3 = 1. / eps; - ga.gamma4 = 0.; - ga.gamma5 = 0.0; + ga[0] = 2.6 ; //gamma 2.6 variable : for low contrast images + ga[1] = 0.891161; + ga[2] = 0.108839; + ga[3] = 0.144928; + ga[4] = 0.076332; } else if (icm.gamma == "standard_g2.2") { - ga.gamma0 = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) - ga.gamma1 = 1.; - ga.gamma2 = 0.; - ga.gamma3 = 1. / eps; - ga.gamma4 = 0.; - ga.gamma5 = 0.0; + ga[0] = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; } else if (icm.gamma == "standard_g1.8") { - ga.gamma0 = 1.8; //gamma=1.8 (as gamma of Prophoto) - ga.gamma1 = 1.; - ga.gamma2 = 0.; - ga.gamma3 = 1. / eps; - ga.gamma4 = 0.; - ga.gamma5 = 0.0; + ga[0] = 1.8; //gamma=1.8 (as gamma of Prophoto) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + } else /* if (icm.gamma == "linear_g1.0") */ { + ga[0] = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; } + ga[5] = 0.0; + ga[6] = 0.0; } else { //free gamma selected - Color::GammaValues g_a; //gamma parameters + GammaValues g_a; //gamma parameters double pwr = 1.0 / icm.gampos; double ts = icm.slpos; double slope = icm.slpos == 0 ? eps : icm.slpos; int mode = 0, imax = 0; Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 - ga.gamma4 = g_a.gamma3 * ts; + ga[4] = g_a[3] * ts; //printf("g_a.gamma0=%f g_a.gamma1=%f g_a.gamma2=%f g_a.gamma3=%f g_a.gamma4=%f\n", g_a.gamma0,g_a.gamma1,g_a.gamma2,g_a.gamma3,g_a.gamma4); - ga.gamma0 = icm.gampos; - ga.gamma1 = 1. / (1.0 + g_a.gamma4); - ga.gamma2 = g_a.gamma4 / (1.0 + g_a.gamma4); - ga.gamma3 = 1. / slope; - ga.gamma5 = 0.0; + ga[0] = icm.gampos; + ga[1] = 1. / (1.0 + g_a[4]); + ga[2] = g_a[4] / (1.0 + g_a[4]); + ga[3] = 1. / slope; + ga[5] = 0.0; + ga[6] = 0.0; //printf("ga[0]=%f ga[1]=%f ga[2]=%f ga[3]=%f ga[4]=%f\n", ga[0],ga[1],ga[2],ga[3],ga[4]); } } -cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga) { +cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { float p[6]; //primaries - ga.gamma6 = 0.0; + ga[6] = 0.0; enum class ColorTemp { D50 = 5003, // for Widegamut, Prophoto Best, Beta -> D50 @@ -520,7 +516,7 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam cmsToneCurve* GammaTRC[3]; // 7 parameters for smoother curves - cmsFloat64Number Parameters[7] = { ga.gamma0, ga.gamma1, ga.gamma2, ga.gamma3, ga.gamma4, ga.gamma5, ga.gamma6 } ; + cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] } ; cmsWhitePointFromTemp(&xyD, (double)temp); GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); //5 = smoother than 4 @@ -531,7 +527,7 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam return oprofdef; } -cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga) { +cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { bool pro = false; Glib::ustring outProfile; cmsHPROFILE outputProfile = nullptr; @@ -590,7 +586,7 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan } // 7 parameters for smoother curves - cmsFloat64Number Parameters[7] = { ga.gamma0, ga.gamma1, ga.gamma2, ga.gamma3, ga.gamma4, ga.gamma5, ga.gamma6 }; + cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] }; //change desc Tag , to "free gamma", or "BT709", etc. cmsMLU *mlu; diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index dc2c5c12b..ac52c998a 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -88,11 +88,11 @@ public: void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir); - static void getGammaArray(const procparams::ColorManagementParams &icm, Color::GammaValues &ga); + static void getGammaArray(const procparams::ColorManagementParams &icm, GammaValues &ga); static cmsHPROFILE makeStdGammaProfile (cmsHPROFILE iprof); static cmsHPROFILE createFromMatrix (const double matrix[3][3], bool gamma = false, const Glib::ustring& name = Glib::ustring()); - static cmsHPROFILE createGammaProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga); - static cmsHPROFILE createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, Color::GammaValues &ga); + static cmsHPROFILE createGammaProfile (const procparams::ColorManagementParams &icm, GammaValues &ga); + static cmsHPROFILE createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, GammaValues &ga); // Main monitors standard profile name, from OS void findDefaultMonitorProfile (); diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 081afdf43..7b98e54aa 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -92,13 +92,13 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con if (softProof) { cmsHPROFILE oprof; if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - Color::GammaValues ga; + GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createGammaProfile (icm, ga); } else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - Color::GammaValues ga; + GammaValues ga; iccStore->getGammaArray(icm, ga); oprof = iccStore->createCustomGammaOutputProfile (icm, ga); } else { diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index ad7d6f56a..04b234cbd 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -362,7 +362,7 @@ public: void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, Color::GammaValues *ga=NULL); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=NULL); // CieImage *ciec; bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index eec8987b7..62af03f0a 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -280,7 +280,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, * If a custom gamma profile can be created, divide by 327.68, convert to xyz and apply the custom gamma transform * otherwise divide by 327.68, convert to xyz and apply the sRGB transform, before converting with gamma2curve */ -Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, Color::GammaValues *ga) +Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga) { //gamutmap(lab); diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 27c129a44..8b19f3841 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1973,7 +1973,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } else if(retinexParams.gammaretinex == "hig") { retinexgamtab = &(Color::gammatab_145_3); } else if(retinexParams.gammaretinex == "fre") { - Color::GammaValues g_a; + GammaValues g_a; double pwr = 1.0 / retinexParams.gam; double gamm = retinexParams.gam; double ts = retinexParams.slope; @@ -1991,14 +1991,14 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar double add; if(gamm2 < 1.) { - start = g_a.gamma2; - add = g_a.gamma4; + start = g_a[2]; + add = g_a[4]; } else { - start = g_a.gamma3; - add = g_a.gamma4; + start = g_a[3]; + add = g_a[4]; } - double mul = 1. + g_a.gamma4; + double mul = 1. + g_a[4]; lutTonereti(65536); @@ -2245,7 +2245,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC } else if(deh.gammaretinex == "hig") { retinexigamtab = &(Color::igammatab_145_3); } else if(deh.gammaretinex == "fre") { - Color::GammaValues g_a; + GammaValues g_a; double pwr = 1.0 / deh.gam; double gamm = deh.gam; double gamm2 = gamm; @@ -2258,16 +2258,16 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope - double mul = 1. + g_a.gamma4; + double mul = 1. + g_a[4]; double add; double start; if(gamm2 < 1.) { - start = g_a.gamma3; - add = g_a.gamma3; + start = g_a[3]; + add = g_a[3]; } else { - add = g_a.gamma4; - start = g_a.gamma2; + add = g_a[4]; + start = g_a[2]; } // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 62e16f2f0..a01597d96 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1162,7 +1162,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - Color::GammaValues ga; + GammaValues ga; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly, &ga); customGamma = true; From c96c7dc8f396805fda1c74d01509607ebdece050 Mon Sep 17 00:00:00 2001 From: Hombre Date: Fri, 2 Sep 2016 16:23:21 +0200 Subject: [PATCH 008/115] Soft-proofing ang GamutCheck buttons are now disabled if Monitor profile == NONE of is no suported intent for the selected profile. The Monitor profile list (in the Editor and in Preferences) shows RGB profiles only, whereas the output profile list shows all profiles (RGB, CMYK, ... anything!) Bugfix: When switching to a new image, the image now use the selected profile and intent. --- rtengine/iccstore.cc | 17 ++++++++------- rtengine/iccstore.h | 2 +- rtengine/improccoordinator.cc | 5 ----- rtgui/editorpanel.cc | 39 ++++++++++++++++++++++++++++------- rtgui/preferences.cc | 2 +- 5 files changed, 42 insertions(+), 23 deletions(-) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 166ee1cc9..b0be63151 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -40,7 +40,7 @@ void loadProfiles (const Glib::ustring& dirName, std::map* profiles, std::map* profileContents, std::map* profileNames, - bool nameUpper, bool onlyRgb) + bool nameUpper) { if (dirName.empty ()) { return; @@ -80,7 +80,7 @@ void loadProfiles (const Glib::ustring& dirName, const ProfileContent content (filePath); const cmsHPROFILE profile = content.toProfile (); - if (profile && (!onlyRgb || cmsGetColorSpace (profile) == cmsSigRgbData)) { + if (profile) { profiles->insert (std::make_pair (name, profile)); if (profileContents) { @@ -165,7 +165,7 @@ std::vector getWorkingProfiles () return res; } -std::vector ICCStore::getProfiles () const +std::vector ICCStore::getProfiles (const bool onlyRgb) const { MyMutex::MyLock lock(mutex_); @@ -173,6 +173,7 @@ std::vector ICCStore::getProfiles () const std::vector res; for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) { + if (!onlyRgb || (onlyRgb && cmsGetColorSpace (profile->second) == cmsSigRgbData)) res.push_back (profile->first); } @@ -188,8 +189,8 @@ std::vector ICCStore::getProfilesFromDir (const Glib::ustring& di ProfileMap profiles; - loadProfiles (profilesDir, &profiles, nullptr, nullptr, false, true); - loadProfiles (dirName, &profiles, nullptr, nullptr, false, true); + loadProfiles (profilesDir, &profiles, nullptr, nullptr, false); + loadProfiles (dirName, &profiles, nullptr, nullptr, false); for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { res.push_back (profile->first); @@ -768,15 +769,15 @@ void ICCStore::init (const Glib::ustring& usrICCDir, const Glib::ustring& rtICCD profilesDir = Glib::build_filename (rtICCDir, "output"); fileProfiles.clear(); fileProfileContents.clear(); - loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, nullptr, false, true); - loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, nullptr, false, true); + loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, nullptr, false); + loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, nullptr, false); // Input profiles // Load these to different areas, since the short name (e.g. "NIKON D700" may overlap between system/user and RT dir) stdProfilesDir = Glib::build_filename (rtICCDir, "input"); fileStdProfiles.clear(); fileStdProfilesFileNames.clear(); - loadProfiles (stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true, false); + loadProfiles (stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true); } // Determine the first monitor default profile of operating system, if selected diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index ac52c998a..0c49a7e4c 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -112,7 +112,7 @@ public: cmsHPROFILE getXYZProfile () const; cmsHPROFILE getsRGBProfile () const; - std::vector getProfiles () const; + std::vector getProfiles (const bool onlyRgb = false) const; std::vector getProfilesFromDir (const Glib::ustring& dirName) const; uint8_t getInputIntents (cmsHPROFILE profile) const; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 4aa0b8243..3bcb2699b 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -779,11 +779,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Update the monitor color transform if necessary if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { - if (lastOutputIntent == RI__COUNT) { - // initializing... - monitorProfile = options.rtSettings.monitorProfile; - monitorIntent = options.rtSettings.monitorIntent; - } lastOutputProfile = params.icm.output; lastOutputIntent = params.icm.outputIntent; lastOutputBPC = params.icm.outputBPC; diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 3323c795d..50297632a 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -59,7 +59,7 @@ private: profileBox.set_active (0); #endif - const std::vector profiles = rtengine::iccStore->getProfiles (); + const std::vector profiles = rtengine::iccStore->getProfiles (true); for (std::vector::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) { profileBox.append_text (*iterator); } @@ -119,7 +119,7 @@ private: updateSoftProofParameters (); } - void updateParameters () + void updateParameters (bool noEvent = false) { ConnectionBlocker profileBlocker (profileConn); ConnectionBlocker intentBlocker (intentConn); @@ -148,6 +148,8 @@ private: intentBox.set_sensitive (false); intentBox.setSelected (1); + softProof.set_sensitive(false); + spGamutCheck.set_sensitive(false); profileBox.set_tooltip_text (""); @@ -162,12 +164,16 @@ private: intentBox.setItemSensitivity(0, supportsPerceptual); intentBox.setItemSensitivity(1, supportsRelativeColorimetric); intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric); + softProof.set_sensitive(true); + spGamutCheck.set_sensitive(true); } else { intentBox.setItemSensitivity(0, true); intentBox.setItemSensitivity(1, true); intentBox.setItemSensitivity(2, true); intentBox.set_sensitive (false); intentBox.setSelected (1); + softProof.set_sensitive(false); + spGamutCheck.set_sensitive(false); } profileBox.set_tooltip_text (profileBox.get_active_text ()); @@ -191,19 +197,28 @@ private: return; } - processor->beginUpdateParams (); + if (!noEvent) { + processor->beginUpdateParams (); + } processor->setMonitorProfile (profile, intent); - processor->endUpdateParams (rtengine::EvMonitorTransform); + processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); + if (!noEvent) { + processor->endUpdateParams (rtengine::EvMonitorTransform); + } } - void updateSoftProofParameters () + void updateSoftProofParameters (bool noEvent = false) { spGamutCheck.set_sensitive(softProof.get_active()); if (profileBox.get_active_row_number () > 0) { - processor->beginUpdateParams (); - processor->setSoftProofing (softProof.get_active(), spGamutCheck.get_active()); - processor->endUpdateParams (rtengine::EvMonitorTransform); + if (!noEvent) { + processor->beginUpdateParams (); + } + processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); + if (!noEvent) { + processor->endUpdateParams (rtengine::EvMonitorTransform); + } } } @@ -232,6 +247,13 @@ public: box->pack_end (profileBox, Gtk::PACK_SHRINK, 0); } + void updateProcessor() + { + if (processor) { + updateParameters(true); + } + } + void reset () { ConnectionBlocker profileBlocker (profileConn); @@ -762,6 +784,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) this->isrc = isrc; ipc = rtengine::StagedImageProcessor::create (isrc); ipc->setProgressListener (this); + colorMgmtToolBar->updateProcessor(); ipc->setPreviewImageListener (previewHandler); ipc->setPreviewScale (10); // Important tpc->initImage (ipc, tmb->getType() == FT_Raw); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 980fc0702..28f5e2096 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -698,7 +698,7 @@ Gtk::Widget* Preferences::getColorManagementPanel () monProfile->append_text (M("PREFERENCES_PROFILE_NONE")); monProfile->set_active (0); - const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (); + const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (true); for (std::vector::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) monProfile->append_text (*profile); From a69c631f22a76e3ed4085fd7717d4a4082e372b5 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 3 Sep 2016 00:49:35 +0200 Subject: [PATCH 009/115] Fix issue #3411 + revert some code to the old one for better readability --- rtengine/iccstore.cc | 3 +- rtengine/image16.cc | 16 +++---- rtengine/image16.h | 2 +- rtengine/iplab2rgb.cc | 97 ++++++++---------------------------------- rtengine/procparams.cc | 2 +- rtengine/settings.h | 2 +- rtgui/paramsedited.cc | 2 - 7 files changed, 31 insertions(+), 93 deletions(-) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index b0be63151..13d1fbbdd 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -519,11 +519,12 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam // 7 parameters for smoother curves cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] } ; + lcmsMutex->lock (); cmsWhitePointFromTemp(&xyD, (double)temp); GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); //5 = smoother than 4 cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile - cmsFreeToneCurve(GammaTRC[0]); + lcmsMutex->unlock (); return oprofdef; } diff --git a/rtengine/image16.cc b/rtengine/image16.cc index d57bcf6a9..f41ccd036 100644 --- a/rtengine/image16.cc +++ b/rtengine/image16.cc @@ -326,7 +326,7 @@ Image16::tofloat() } // Parallized transformation; create transform with cmsFLAGS_NOCACHE! -void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage) +void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy) { // LittleCMS cannot parallelize planar Lab float images // so build temporary buffers to allow multi processor execution @@ -341,15 +341,15 @@ void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImag #pragma omp for schedule(static) #endif - for (int y = 0; y < height; y++) + for (int y = cy; y < cy + height; y++) { unsigned short *pRGB, *pR, *pG, *pB; float *pLab, *pL, *pa, *pb; pLab= bufferLab.data; - pL = labImage.L[y]; - pa = labImage.a[y]; - pb = labImage.b[y]; + pL = labImage.L[y] + cx; + pa = labImage.a[y] + cx; + pb = labImage.b[y] + cx; for (int x = 0; x < width; x++) { *(pLab++) = *(pL++) / 327.68f; @@ -360,9 +360,9 @@ void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImag cmsDoTransform (hTransform, bufferLab.data, bufferRGB.data, width); pRGB = bufferRGB.data; - pR = r(y); - pG = g(y); - pB = b(y); + pR = r(y - cy); + pG = g(y - cy); + pB = b(y - cy); for (int x = 0; x < width; x++) { *(pR++) = *(pRGB++); diff --git a/rtengine/image16.h b/rtengine/image16.h index 7fcff307f..58e142560 100644 --- a/rtengine/image16.h +++ b/rtengine/image16.h @@ -96,7 +96,7 @@ public: delete this; } - void ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage); + void ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy); }; } diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 62af03f0a..01144b397 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -238,14 +238,14 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, float* rL = lab->L[i]; float* ra = lab->a[i]; float* rb = lab->b[i]; - uint8_t* dest = image->r(i - cy) + cx; + int ix = 3 * i * cw; for (int j = cx; j < cx + cw; j++) { - float fy = (0.0086206897f * (*rL)) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002f * *(ra++)) / 327.68f + fy; - float fz = fy - (0.005f * *(rb++)) / 327.68f; - float LL = *(rL++) / 327.68f; + float fy = (0.0086206897f * rL[j]) / 327.68f + 0.1379310345f; // (L+16)/116 + float fx = (0.002f * ra[j]) / 327.68f + fy; + float fz = fy - (0.005f * rb[j]) / 327.68f; + float LL = rL[j] / 327.68f; float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; //float y_ = 65535.0f * Color::f2xyz(fy); @@ -254,9 +254,9 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Color::xyz2rgb(x_, y_, z_, R, G, B, xyz_rgb); - *(dest++) = (int)Color::gamma2curve[CLIP(R)] >> 8; - *(dest++) = (int)Color::gamma2curve[CLIP(G)] >> 8; - *(dest++) = (int)Color::gamma2curve[CLIP(B)] >> 8; + image->data[ix++] = (int)Color::gamma2curve[R] >> 8; + image->data[ix++] = (int)Color::gamma2curve[G] >> 8; + image->data[ix++] = (int)Color::gamma2curve[B] >> 8; } } } @@ -314,63 +314,6 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int } if (oprof) { - - - /* - - -#ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) -#endif - - for (int i = cy; i < cy + ch; i++) { - float* rL = lab->L[i]; - float* ra = lab->a[i]; - float* rb = lab->b[i]; - short* xa = (short*)image->r(i - cy) + cx; - short* ya = (short*)image->g(i - cy) + cx; - short* za = (short*)image->b(i - cy) + cx; - - for (int j = 0; j < cw; j++) { - - float fy = (0.0086206897f * *rL) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002f * *(ra++)) / 327.68f + fy; - float fz = fy - (0.005f * *(rb++)) / 327.68f; - float LL = *(rL++) / 327.68f; - - float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; - //float y_ = 65535.0f * Color::f2xyz(fy); - float z_ = 65535.0f * Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > (float)Color::epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / (float)Color::kappa; - - *xa = CLIP((int) round(x_)) ; - *(ya++) = CLIP((int) round(y_)); - *za = CLIP((int) round(z_)); - - if(bw && y_ < 65535.f) { //force Bw value and take highlight into account - *xa = (int) round(y_ * Color::D50x); - *za = (int) round(y_ * Color::D50z); - } - ++xa; - ++za; - } - } - - cmsHPROFILE iprof = iccStore->getXYZProfile (); - - - */ - - cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); - - - - - // ---------------------------------------------------------------------------- - - - - cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; if (icm.outputBPC) { flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; @@ -378,12 +321,11 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int } else printf("lab2rgb16 / icm.outputBPC=false / outputIntent=%d\n", icm.outputIntent); lcmsMutex->lock (); - //cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_RGB_16, oprof, TYPE_RGB_16, icm.outputIntent, flags); + cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, oprof, TYPE_RGB_16, icm.outputIntent, flags); lcmsMutex->unlock (); - //image->ExecCMSTransform(hTransform); - image->ExecCMSTransform(hTransform, *lab); + image->ExecCMSTransform(hTransform, *lab, cx, cy); cmsDeleteTransform(hTransform); } else { // @@ -395,16 +337,13 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int float* rL = lab->L[i]; float* ra = lab->a[i]; float* rb = lab->b[i]; - uint16_t* rR = image->r(i - cy) + cx; - uint16_t* rG = image->g(i - cy) + cx; - uint16_t* rB = image->b(i - cy) + cx; - for (int j = 0; j < cw; j++) { + for (int j = cx; j < cx + cw; j++) { - float fy = (0.0086206897f * *rL) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002f * *(ra++)) / 327.68f + fy; - float fz = fy - (0.005f * *(rb++)) / 327.68f; - float LL = *(rL++) / 327.68f; + float fy = (0.0086206897f * rL[j]) / 327.68f + 0.1379310345f; // (L+16)/116 + float fx = (0.002f * ra[j]) / 327.68f + fy; + float fz = fy - (0.005f * rb[j]) / 327.68f; + float LL = rL[j] / 327.68f; float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; //float y_ = 65535.0 * Color::f2xyz(fy); @@ -413,9 +352,9 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int Color::xyz2srgb(x_, y_, z_, R, G, B); - *(rR++) = (int)Color::gamma2curve[CLIP(R)]; - *(rG++) = (int)Color::gamma2curve[CLIP(G)]; - *(rB++) = (int)Color::gamma2curve[CLIP(B)]; + image->r(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(R)]; + image->g(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(G)]; + image->b(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(B)]; } } } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index a5a2515a5..69cdd17c5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -5930,7 +5930,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) icm.outputBPC = keyFile.get_boolean ("Color Management", "OutputBPC"); if (pedited) { - pedited->icm.gamfree = true; + pedited->icm.outputBPC = true; } } diff --git a/rtengine/settings.h b/rtengine/settings.h index 3c728f061..4599a28a7 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -40,7 +40,7 @@ public: Glib::ustring monitorProfile; ///< ICC profile name used for the monitor RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile - bool monitorBPC; ///< Black Point Compensation for the WCS->Monitor transform (directly, i.e. not soft-proofing) + bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between) bool autoMonitorProfile; ///< Try to auto-determine the correct monitor color profile bool autocielab; bool rgbcurveslumamode_gamut;// controls gamut enforcement for RGB curves in lumamode diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index b448cd2ee..ff3e4c0b1 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -2216,8 +2216,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.icm.outputBPC = mods.icm.outputBPC; } - //if (icm.gampos) toEdit.icm.gampos = mods.icm.gampos; - //if (icm.slpos) toEdit.icm.slpos = mods.icm.slpos; if (icm.gampos) { toEdit.icm.gampos = dontforceSet && options.baBehav[ADDSET_FREE_OUPUT_GAMMA] ? toEdit.icm.gampos + mods.icm.gampos : mods.icm.gampos; } From a9fc506ac96e5d5f5e9561fc33c2de5f52d39e55 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 3 Sep 2016 23:29:26 +0200 Subject: [PATCH 010/115] Bugfix: the options file were reseted unexpectedly The error was that it was reading a wrong value, which thrown an exception, but the error was diplayed in verbose mode only. Bug fixed, and now it'll report any error in evry case. --- rtgui/options.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/rtgui/options.cc b/rtgui/options.cc index 8bf8de19f..774afde2e 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -1473,7 +1473,7 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.monitorIntent = static_cast(keyFile.get_integer("Color Management", "Intent")); } - if (keyFile.has_key ("Color Management", "Intent")) { + if (keyFile.has_key ("Color Management", "MonitorBPC")) { rtSettings.monitorBPC = keyFile.get_boolean("Color Management", "MonitorBPC"); } @@ -1796,13 +1796,9 @@ int Options::readFromFile (Glib::ustring fname) } } catch (Glib::Error &err) { - if (options.rtSettings.verbose) { - printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); - } + printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } catch (...) { - if (options.rtSettings.verbose) { - printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); - } + printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } return 1; From ee4749f27197057b97d31056960f76af26bc5357 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 11 Sep 2016 03:49:33 +0200 Subject: [PATCH 011/115] Fix a recursive Mutex lock bug when selecting an output Gamma profile. --- rtengine/iccstore.cc | 6 ++++-- rtengine/iplab2rgb.cc | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 13d1fbbdd..7b52a7a53 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -434,6 +434,7 @@ void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, Gamma } } +// WARNING: the caller must lock lcmsMutex cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { float p[6]; //primaries ga[6] = 0.0; @@ -519,16 +520,17 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam // 7 parameters for smoother curves cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] } ; - lcmsMutex->lock (); + //lcmsMutex->lock (); Mutex acquired by the caller cmsWhitePointFromTemp(&xyD, (double)temp); GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); //5 = smoother than 4 cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile cmsFreeToneCurve(GammaTRC[0]); - lcmsMutex->unlock (); + //lcmsMutex->unlock (); return oprofdef; } +// WARNING: the caller must lock lcmsMutex cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { bool pro = false; Glib::ustring outProfile; diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 01144b397..b82b0ca22 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -305,8 +305,10 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int cmsHPROFILE oprof = NULL; if (ga) { + lcmsMutex->lock (); iccStore->getGammaArray(icm, *ga); oprof = iccStore->createGammaProfile(icm, *ga); + lcmsMutex->unlock (); printf("iccStore->createGammaProfile(icm, *ga);\n"); } else { oprof = iccStore->getProfile (icm.output); From f904bc8f84b629c19721504e99a647604a41036c Mon Sep 17 00:00:00 2001 From: Hombre Date: Fri, 30 Sep 2016 01:03:57 +0200 Subject: [PATCH 012/115] First patch of the LockableColorPicker tool. Still Work In Progress, but can be used without too much hassle. --- .../images/Dark/actions/colorPickers-hide.png | Bin 0 -> 685 bytes .../images/Dark/actions/colorPickers-show.png | Bin 0 -> 833 bytes .../Dark/actions/gtk-color-picker-add.png | Bin 0 -> 851 bytes .../Light/actions/colorPickers-hide.png | Bin 0 -> 645 bytes .../Light/actions/colorPickers-show.png | Bin 0 -> 796 bytes .../Light/actions/gtk-color-picker-add.png | Bin 0 -> 810 bytes rtdata/languages/Francais | 4 +- rtdata/languages/default | 4 +- rtengine/coord.h | 25 +- rtgui/CMakeLists.txt | 2 +- rtgui/batchtoolpanelcoord.cc | 4 + rtgui/crophandler.cc | 67 + rtgui/crophandler.h | 22 +- rtgui/cropwindow.cc | 155 +- rtgui/cropwindow.h | 10 +- rtgui/cursormanager.cc | 6 +- rtgui/cursormanager.h | 3 +- rtgui/dirbrowser.cc | 2 +- rtgui/edit.h | 6 +- rtgui/editenums.h | 4 +- rtgui/editorpanel.cc | 1 + rtgui/filepanel.cc | 1 - rtgui/guiutils.cc | 74 +- rtgui/guiutils.h | 44 +- rtgui/imagearea.cc | 16 +- rtgui/imagearea.h | 6 +- rtgui/imageareatoollistener.h | 2 +- rtgui/lockablecolorpicker.cc | 332 ++ rtgui/lockablecolorpicker.h | 85 + rtgui/options.cc | 6 + rtgui/options.h | 1 + rtgui/preferences.cc | 13 +- rtgui/preferences.h | 1 + rtgui/toolbar.cc | 156 +- rtgui/toolbar.h | 31 +- rtgui/toolenum.h | 2 +- rtgui/toolpanelcoord.h | 6 - .../scalable/colorPickers-hide.file | 1 + .../scalable/colorPickers-hide.svg | 4301 +++++++++++++++ .../scalable/colorPickers-show.file | 1 + .../scalable/colorPickers-show.svg | 4372 +++++++++++++++ .../scalable/gtk-color-picker-add.file | 1 + .../scalable/gtk-color-picker-add.svg | 4839 +++++++++++++++++ 43 files changed, 14509 insertions(+), 97 deletions(-) create mode 100644 rtdata/images/Dark/actions/colorPickers-hide.png create mode 100644 rtdata/images/Dark/actions/colorPickers-show.png create mode 100644 rtdata/images/Dark/actions/gtk-color-picker-add.png create mode 100644 rtdata/images/Light/actions/colorPickers-hide.png create mode 100644 rtdata/images/Light/actions/colorPickers-show.png create mode 100644 rtdata/images/Light/actions/gtk-color-picker-add.png create mode 100644 rtgui/lockablecolorpicker.cc create mode 100644 rtgui/lockablecolorpicker.h create mode 100644 tools/source_icons/scalable/colorPickers-hide.file create mode 100644 tools/source_icons/scalable/colorPickers-hide.svg create mode 100644 tools/source_icons/scalable/colorPickers-show.file create mode 100644 tools/source_icons/scalable/colorPickers-show.svg create mode 100644 tools/source_icons/scalable/gtk-color-picker-add.file create mode 100644 tools/source_icons/scalable/gtk-color-picker-add.svg diff --git a/rtdata/images/Dark/actions/colorPickers-hide.png b/rtdata/images/Dark/actions/colorPickers-hide.png new file mode 100644 index 0000000000000000000000000000000000000000..54b33a7fb139f57b238f5f4e099ee5ed70a52d0e GIT binary patch literal 685 zcmV;e0#f~nP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10xC&FK~y-6wbajR6G0RQ@b7nK*PsSMNx)VLm5Njp>#YPt%j5@v zQatwW>EE+=>9$?6N(*|3ps3(QD1sHGr9G(0Zg%E*X~JTE*sk?m=e-Ya-n?C+V8n4; z1~8o@i6*(z>2!YP&shXrTU)#3dESDEXaG=34Yk&xG3Li8M_m*R!*I&?{rU(60Oy>a zB*{!Z&$|e^v9WPSDfQ4fckHH~=M4+N>+9=J05nNDlDi@@zBb8JYyCN&f38skK~UCO zKT=9v6_M)zW=WQhjx&4SnB_Tdmf&KWqL9M^Q9y zt(_2&X8^wDaLKaljWK5Lq`EWLEsCOf=iEfQ-QFVUqA0o{B2NKSJkNV>jOm?Ld+OtD zZf-uvqd^d8Ywdld)T>sj^?{^2tEm&=IF9dTSynwfJRGByN@daa{ryIx@$M{e6vsx< z?RMv^wNnQN2U{yED>euMU9DCZN$xiqjko7PkHJwC&1P9P)9G|xkaTezd&A*yk>vMw zyM3-sM={{$uA{Ar#1sA`HU? zlE1Xp696h&>-WZ(ogyf3v=ytXtIG4dJ(9J4zyD=;C9Qp&$Hcxh=VNz?Qr$=$(V@aeMP{}#Uiw#n=9 TIpvL=00000NkvXXu0mjf2wOQJ literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/colorPickers-show.png b/rtdata/images/Dark/actions/colorPickers-show.png new file mode 100644 index 0000000000000000000000000000000000000000..d9d039c2b4eb5009ec34d0ec0bb8e47cfc74a311 GIT binary patch literal 833 zcmV-H1HSx;P)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10=`K^K~y-6os~~WR8bhkzjNPxFP%xjlo6o(%u^!@ zAxN_5pNNa1Kl>I!ZImD?B&fjJg{x{YGV`vpNrV>GDpw&vWd0v!Q1iWc?|y9@d8p4O z&-Q%h$GK;7LAz8sojyQBtpLneEcUUvxp_M5V>i%DCUd^7u5PfQp`mtue%_s%oBI_6 z!I`$Uwx6XN@xM^Vahel}#LGk?v2SK(W^HzM)@9~e0B6H@vRoiDLn(EMnIE{WYfeo~ zt+=kM*F7epdpK{ibP70H`1$FtcW6 zPY9v4);THV^_G^F&*4m28(Wrjk%-oah_u!MfB;|um|gw+y1&;ZpV!s$GNYyKE}*%00czjYOTA35S7gQESXFWM`a@$XEK?)M0C{m z{kH%D0Fs#x2_c^5a=FIV*4BOi9F^a;aXOvu2GGRJLsH5BfYe&w1n|YS?dLnaG7_wm zy2i|>nR%$xRBPQ0V8XWT$K^n`fE~xVKty&J%FI0g#==dr+3blR2>PR-mSx@801poj z8vuF%JXwdDTI(JFpEf_=_x%b04N>4?v1o39YiepPGxK+5{sUky5nUBRj3txFEt{IA z`Hh+HM1cWJho?Bq%rioWD_ZM=00wQ_{;*xp^E@GhsMw*gkn1y8%gf6P@pwGJ%&GD5 z@%MdweL5-#;0O^7MERCwos&dFD=RB6s;a6wR##U~b#!!0Mg>X=f?(A!j2}_Hl+uGz zsy3g`PgYk~*DNh9z3S}jy!9_|Ig-BbTc&9i^Z9%s9*;-v7S_nfNRwe052Jj;FnVQs zd;4#t)NLu{@yg1|*X4i>!-xTBjPjXz&#wMFrBpo;os9B5&&&P=RW3YXvq&rd00000 LNkvXXu0mjf**17m literal 0 HcmV?d00001 diff --git a/rtdata/images/Dark/actions/gtk-color-picker-add.png b/rtdata/images/Dark/actions/gtk-color-picker-add.png new file mode 100644 index 0000000000000000000000000000000000000000..77a30c250e8cfefc2207186e57d1c91ed34a5878 GIT binary patch literal 851 zcmV-Z1FZasP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10?kk6k!;~pZEKwSrun&q7o00A|zxG1zjXMxH~NF zrJydIqA(Hy?Gl}e34#JIi4+MP(u0RN6tb}%cGeB`)J2F6sV6H7(Hz1u*V*~r4(*Dr zntz|$eDC-CczC{ffj!D`95FC3V3eNIZh_29p69h1hH=+0j6>7Y)9;C>&9?2&03db? z&SWx9ZEbC5U0vO=#l=MeaF&Sf7w6hefsW&drlzJFmSwetVMycSfY59a6R|EwCb5MsFav7;)O`Dt}^b+hmLl9?mSEC7Ir7{DZe?j3_& z*DV)9oS2!JVF0q=)eA{KDy6R2w*9ksUv3AQ&1TDVU4H>!K}uQA%m5&ylnTJK5aMDi z7Moq|*%Iu!t{#a*x&cfP(HkPth^Rp+1po^~)DewFKa~3Z`*^8TDx&N9a{yBSh5;Z5 zg11u2qf$ywDK#34#l}3(yT#0A5CpFhiNx%G!96`a2Q*FV0x-qQ!vLUZS|u~zR!Tjw zZF{JAmzl2usF6}80c;M=X0uv8pYI}~Z$+pO!pP_I?acf*9*+-gMDndQaYX@+;koX*c2!Jsn`n_Rd(=;zhDYY;RM*u)dX@+6gA%t*j z+g@1!rPN6xI$vTxQ}|=nf?e0urIgp1xwinV3d8UYGds~}bhrfa5-Lqul*JhW|lbmJ!fDV+6r?a=BIjlR*$%-U_;zR;oxQlZWT#=3FAWXBfu2L?V&fE@XLm`C3_7ndbZcmvzJb z{{Cl!gM&+beSO*8BrMfR6%`c~r-C5Jo2J>2N~O$w16Nj7z9ym{x~^wiT3QzN3SJ}E db<6jQ^%uVGD_S?+x=8>4002ovPDHLkV1lOHcEtby literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/colorPickers-hide.png b/rtdata/images/Light/actions/colorPickers-hide.png new file mode 100644 index 0000000000000000000000000000000000000000..434087f1ca6f29d2e5951462255ee39ae4adbeb3 GIT binary patch literal 645 zcmV;00($+4P)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10s=`yK~y-6wbkEi6G0FM@bAuE5;P$tprD~8k{`E+hxSbbsRsR< z1;Gcw7W7fHk!y1KfnX$>r=)?LcRS;QJ-KR&UK;0ZXJ zWHy_vvh!*a)bqSMBJzNlH2{c6Tq>1b^m@J1w1)DcjYi`(Ge1mG08mO5q9|%)>zq7j zv)Swr(Y}cMu~Wx!;*H==r}J1T^$Y+5n2N}0X8QYjz5bM~|EHtyeZQiVdL$y(M5N5j zO{G)?07N87lH_PInXGfeaU8dZXr7LhQW`*AL}DU(H6D*=zxVtVHpbj%=GtntdajiE zlIEFNMC4t+-=AO9r!PuoQEP2248z04VzH=Jt7EP8O#oJF{cE(HzcP~kj zS{R0h_<3QPh%o7URB z;c)mG0C&4xr&ug@9mn~0a&q!M51f4!N<{8jYu}{kbUJ-PL|=m-_>c!Zw_;jhlq}YAed}|W?=#_*IM5I@Ody8908C`(G-L+ zro+s8g+k$DzuzBS6$JqDeZOd}y#+wUalCs~@E06Kk;2(eLPUkF!C@FirBW$y9A{cC fmxtSe|6BY3Npb3JcFWf~00000NkvXXu0mjfbfFw+ literal 0 HcmV?d00001 diff --git a/rtdata/images/Light/actions/colorPickers-show.png b/rtdata/images/Light/actions/colorPickers-show.png new file mode 100644 index 0000000000000000000000000000000000000000..d93deb3eb31565ae5b755094ebf1426e2ae97392 GIT binary patch literal 796 zcmV+%1LOROP)=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10+~rfK~y-6oz*{R6LAy=@b7zfm(<{*1tpM#hTa{OE*2~z=p+gv ziXaG9@n0z&6#wjQx>y8JDdHbcH*r!2-CT5WP?x4d?^^5yqs2l&OfG-8_gtD1V=ue((2Nj?iNb4i09CXg?8I)oS%su~;m%_Nf=tw(Y~|bb5MVV4%NLD%FA@_$nd? z=I7^&%^Ch*)OFq6nM~$EE|=RJ1VJ?jf*KL^GxNdLIrBeEavbNls$LDl(3+W^RO;Hk+MTT3W)&%1T{TW$i?wWg>d>#}?h7wryva`6GZnRV4sIM0F7n zB3c1(#`C-nt(mUgn3<0eQB_r&83tex(GOJ}Ye&0+ZQH&KU_?Zo5m5s`1VBZkN<`Ov z-~YT`uHzfqwtWS_2!JQ58ZmQCM8*JY0B~n+Zti(pHWqdq=aQ;!XXd9O5;3zWA~q4- zP9zfd3xz_x(^Bigwr!6C7-ifG zh^#f(b=?yp;;U*XA{(P9I@P{u%SHtexfllA7@!ufx}-IN)IVZt=cM!8)6X&6TA zyS0|=GXMYp8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10;fqtK~y-6t&%@zQ&AMgzjJS58qim3+d+6@O5bZ56A%qpI_TgkD%weefH>IXrr>{Q5Fu$v8eh-nU{hj@T3f&E z-gD0HeCON?Y+NRtPH*YFjBNlY!^6X;2L}f)dY-q9RFDDHI9|i;IiPA_9^-*9Fe!^S!lNZF*o} z;6SBP`8Gd4UvI@kge0G>cK;V}wOYOI`~Ja7rD91YTJ`*)lIM9-tBuwQ^?g6t)6?@v zL~;Nu00p3`S~teLR@LL>a(TX$Z`T4%rBXeKMB=u!wgzB$<=OyH5&0-0hn;hk_L{$f zv)Sw>l2ZWQl6)W{F%d}v0LdE3ap&Bt&bmLYA_#(nh}iGCA02G)|K&kv!TBx)!ZE9vK-KSXx@TXRW;i;Hh(N zX|0ebicVN-WAS+W{V&0xp`n|ZOs0`arJk(EVW(DCAtE_djf^qrAPBtw2DaATkD};{ oG3JSLuC`I|Px5^~`M+4-0Y~{Z9>+C@fdBvi07*qoM6N<$g3Q`*3IG5A literal 0 HcmV?d00001 diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index d35371458..6bec9aa46 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -988,7 +988,8 @@ PREFERENCES_REMEMBERZOOMPAN;Se souvenir de niveau de zoom et de la position de l PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Retient le niveau de zoom et la position de l'image courante lors de l'ouverture d'une nouvelle image.\n\nCette option ne fonctionne que dans le mode "Éditeur unique" et quand "Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%" is set to "Idem PP3". PREFERENCES_RGBDTL_LABEL;Nombre maximum d'unités de calcul pour la Réduction du bruit PREFERENCES_RGBDTL_TOOLTIP;La réduction du bruit nécessite un minimum d'à peu près 128Mo de RAM pour une image de 10MPix ou 512Mo pour une image de 40MPix, ainsi que 128Mo de RAM supplémentaire par unité de calcul. Plus il y aura d'unités de calcul travaillant en parallèle, plus ce sera rapide. Laissez la valeur à "0" pour utiliser automatiquement autant d'unités de calcul que possible. -PREFERENCES_SELECTFONT;Police de caractère +PREFERENCES_SELECTFONT;Police générale +PREFERENCES_SELECTFONT_COLPICKER;Police des pipette à couleur PREFERENCES_SELECTLANG;Choix de la langue PREFERENCES_SELECTTHEME;Choisissez un thème PREFERENCES_SERIALIZE_TIFF_READ;Réglage de lecture des images TIFF @@ -1089,6 +1090,7 @@ THRESHOLDSELECTOR_HINT;Maintenez la touche Shift appuyée pour déplacer THRESHOLDSELECTOR_T;Haut THRESHOLDSELECTOR_TL;Haut-Gauche THRESHOLDSELECTOR_TR;Haut-droite +TOOLBAR_TOOLTIP_COLORPICKER;Ancre de Vérification Couleur\n\nLorque activé:\nCliquez la zone d'image avec le bouton gauche de la souris pour ajouter une ancre\nDéplacez-le en le "tirant" avec le bouton gauche de la souris\nSupprimez une ancre en cliquant dessus avec le bouton droit de la souris\nSupprimez toutes les ancres avec Shift + click avec le bouton droit\nCliquez avec le bouton droit de la souris en dehors de toute ancre pour revenir au mode Déplacement TOOLBAR_TOOLTIP_CROP;Sélection du recadrage\nRaccourci: c\nDéplacez le recadrage en utilisant Shift + Glisser TOOLBAR_TOOLTIP_HAND;Outil de navigation\nRaccourci: h TOOLBAR_TOOLTIP_STRAIGHTEN;Sélection de la ligne d'horizon\nRaccourci: s\n\nIndiquez la verticale ou l'horizontale en dessinant une ligne à travers l'image de prévisualisation. L'angle de rotation sera affiché près de la ligne guide. Le centre de rotation est le centre géométrique de l'image. diff --git a/rtdata/languages/default b/rtdata/languages/default index 5998c585d..870ee78e6 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1037,7 +1037,8 @@ PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -PREFERENCES_SELECTFONT;Select font +PREFERENCES_SELECTFONT;Select global font +PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font PREFERENCES_SELECTLANG;Select language PREFERENCES_SELECTTHEME;Select theme PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings @@ -1140,6 +1141,7 @@ THRESHOLDSELECTOR_HINT;Hold the Shift key to move individual control poin THRESHOLDSELECTOR_T;Top THRESHOLDSELECTOR_TL;Top-left THRESHOLDSELECTOR_TR;Top-right +TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool TOOLBAR_TOOLTIP_CROP;Crop selection.\nShortcut: c\nMove the crop area using Shift-mouse drag TOOLBAR_TOOLTIP_HAND;Hand tool.\nShortcut: h TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image preview. Angle of rotation will be shown next to the guide line. Center of rotation is the geometrical center of the image. diff --git a/rtengine/coord.h b/rtengine/coord.h index 2242cec1e..0a7d78326 100644 --- a/rtengine/coord.h +++ b/rtengine/coord.h @@ -48,7 +48,10 @@ struct Coord Coord& operator+= (const Coord& other); Coord& operator-= (const Coord& other); Coord& operator*= (const double scale); - + bool operator< (const Coord& rhs) const; + bool operator> (const Coord& rhs) const; + bool operator<=(const Coord& rhs) const; + bool operator>=(const Coord& rhs) const; }; bool operator== (const Coord& lhs, const Coord& rhs); @@ -130,6 +133,26 @@ inline Coord& Coord::operator*= (const double scale) return *this; } +inline bool Coord::operator< (const Coord& rhs) const +{ + return x < rhs.x && y < rhs.y; +} + +inline bool Coord::operator> (const Coord& rhs) const +{ + return x > rhs.x && y > rhs.y; +} + +inline bool Coord::operator<=(const Coord& rhs) const +{ + return x <= rhs.x && y <= rhs.y; +} + +inline bool Coord::operator>=(const Coord& rhs) const +{ + return x >= rhs.x && y >= rhs.y; +} + inline bool operator== (const Coord& lhs, const Coord& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y; diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index 1adc6ddd4..ad896041f 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -8,7 +8,7 @@ set (BASESOURCEFILES coarsepanel.cc cacorrection.cc chmixer.cc blackwhite.cc resize.cc icmpanel.cc crop.cc shadowshighlights.cc impulsedenoise.cc dirpyrdenoise.cc epd.cc - exifpanel.cc toolpanel.cc lensprofile.cc + exifpanel.cc toolpanel.cc lensprofile.cc lockablecolorpicker.cc sharpening.cc vibrance.cc rgbcurves.cc colortoning.cc whitebalance.cc vignetting.cc gradient.cc pcvignette.cc rotate.cc distortion.cc crophandler.cc dirbrowser.cc diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 0b3d65961..004a2c812 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -42,6 +42,10 @@ BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolP toolPanels.erase (ipi); } + if (toolBar) { + toolBar->setBatchMode (); + } + toolPanelNotebook->remove_page (*metadataPanel); metadataPanel = 0; toiM = 0; diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index a76f23717..d47ec91ff 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -22,6 +22,7 @@ #include #include "guiutils.h" #include "cropwindow.h" +#include "imagearea.h" #include "../rtengine/dcrop.h" #include "../rtengine/refreshmap.h" #include "../rtengine/rt_math.h" @@ -188,6 +189,15 @@ void CropHandler::setZoom (int z, int centerx, int centery) } } +float CropHandler::getZoomFactor () +{ + if (zoom >= 1000) { + return zoom / 1000; + } else { + return 1.f / (float)zoom; + } +} + void CropHandler::setWSize (int w, int h) { @@ -465,6 +475,63 @@ bool CropHandler::getEnabled () return enabled; } +void CropHandler::colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::PickerSize size) +{ + + int xSize = (int)size; + int ySize = (int)size; + int pixbufW = cropPixbuf->get_width(); + rtengine::Coord topLeftPos(pickerPos.x - xSize/2, pickerPos.y - ySize/2); + + if (topLeftPos.x > pixbufW || topLeftPos.y > pixbufW || topLeftPos.x + xSize < 0 || topLeftPos.y + ySize < 0) { + return; + } + + // Store the position of the center of the picker + int radius = (int)size / 2; + + // X/Width clip + if (topLeftPos.x < 0) { + xSize += topLeftPos.x; + topLeftPos.x = 0; + } + if (topLeftPos.x + xSize > pixbufW) { + xSize = pixbufW - topLeftPos.x; + } + // Y/Height clip + if (topLeftPos.y < 0) { + ySize += topLeftPos.y; + topLeftPos.y = 0; + } + if (topLeftPos.y + ySize > cropimg_height) { + ySize = cropimg_height - topLeftPos.y; + } + + // Accumulating the data + std::uint32_t r2=0, g2=0, b2=0; + std::uint32_t count = 0; + const guint8* data = cropPixbuf->get_pixels(); + for (int j = topLeftPos.y ; j < topLeftPos.y + ySize ; ++j) { + const guint8* data2 = data + cropPixbuf->get_rowstride()*j; + for (int i = topLeftPos.x ; i < topLeftPos.x + xSize ; ++i) { + const guint8* data3 = data2 + i*3; + rtengine::Coord currPos(i, j); + rtengine::Coord delta = pickerPos - currPos; + rtengine::PolarCoord p(delta); + if (p.radius <= radius) { + r2 += *data3; + g2 += *(data3+1); + b2 += *(data3+2); + ++count; + } + } + } + // Averaging + r = (float)r2 / (float)count / 255.f; + g = (float)g2 / (float)count / 255.f; + b = (float)b2 / (float)count / 255.f; +} + void CropHandler::getSize (int& w, int& h) { diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index 6e479bb16..2f7395216 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -22,6 +22,7 @@ #include "../rtengine/rtengine.h" #include "threadutils.h" #include "edit.h" +#include "lockablecolorpicker.h" #include class CropDisplayHandler @@ -94,23 +95,26 @@ public: } void setEditSubscriber (EditSubscriber* newSubscriber); - void newImage (rtengine::StagedImageProcessor* ipc_, bool isDetailWindow); - void setZoom (int z, int centerx = -1, int centery = -1); - double getFitZoom (); + void newImage (rtengine::StagedImageProcessor* ipc_, bool isDetailWindow); + void setZoom (int z, int centerx = -1, int centery = -1); + float getZoomFactor (); + double getFitZoom (); double getFitCropZoom(); - void setWSize (int w, int h); - void getWSize (int& w, int &h); + void setWSize (int w, int h); + void getWSize (int& w, int &h); void getAnchorPosition (int& x, int& y); void setAnchorPosition (int x, int y, bool update = true); - void moveAnchor (int deltaX, int deltaY, bool update = true); - void centerAnchor (bool update = true); - void getPosition (int& x, int& y); - void getSize (int& w, int& h); + void moveAnchor (int deltaX, int deltaY, bool update = true); + void centerAnchor (bool update = true); + void getPosition (int& x, int& y); + void getSize (int& w, int& h); void getFullImageSize (int& w, int& h); void setEnabled (bool e); bool getEnabled (); + void colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::PickerSize size); + rtengine::DetailedCrop* getCrop() { return crop; diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index c4b555e8f..0a97b3158 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -30,6 +30,7 @@ #include "cursormanager.h" #include "options.h" #include "imagearea.h" +#include "lockablecolorpicker.h" using namespace rtengine; @@ -67,7 +68,7 @@ ZoomStep zoomSteps[] = { CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_, bool isDetailWindow) : ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false), - fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), cropLabel(Glib::ustring("100%")), + fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3), upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0), imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(NULL), @@ -112,6 +113,13 @@ CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, cropHandler.newImage (ipc_, isDetailWindow); } +CropWindow::~CropWindow () +{ + for (auto colorPicker : colorPickers) { + delete colorPicker; + } +} + void CropWindow::enable() { cropHandler.setEnabled (true); @@ -308,7 +316,25 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) press_y = height; } else { if (onArea (CropImage, x, y)) { // events inside of the image domain - if (onArea (CropTopLeft, x, y)) { + if (iarea->getToolMode () == TMColorPicker) { + if (hoveredPicker) { + // Color Picker drag starts + state = SDragPicker; + } else { + // Add a new Color Picker + int x2, y2; + screenCoordToImage(x, y, x2, y2); + LockableColorPicker *newPicker = new LockableColorPicker(x2, y2, LockableColorPicker::PickerSize::S15, 0., 0., 0., this); + colorPickers.push_back(newPicker); + hoveredPicker = newPicker; + state = SDragPicker; + press_x = x; + press_y = y; + action_x = 0; + action_y = 0; + needRedraw = true; + } + } else if (onArea (CropTopLeft, x, y)) { state = SResizeTL; press_x = x; action_x = cropHandler.cropParams.x; @@ -430,6 +456,9 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) action_x = 0; action_y = 0; } + } else if (iarea->getToolMode () == TMColorPicker && hoveredPicker) { + // Color Picker drag starts + state = SDragPicker; } } } @@ -473,6 +502,32 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) action_y = 0; } } + else if (iarea->getToolMode () == TMColorPicker && type == GDK_BUTTON_PRESS && state == SNormal) { + if (hoveredPicker) { + if((bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { + // Deleting all pickers ! + for (auto colorPicker : colorPickers) { + delete colorPicker; + } + colorPickers.clear(); + hoveredPicker = nullptr; + state = SDeletePicker; + needRedraw = true; + } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + // Deleting the hovered picker + for (std::vector::iterator i = colorPickers.begin(); i != colorPickers.end(); i++) { + if (*i == hoveredPicker) { + colorPickers.erase(i); + delete hoveredPicker; + hoveredPicker = nullptr; + state = SDeletePicker; + needRedraw = true; + break; + } + } + } + } + } } if (needRedraw) { @@ -602,6 +657,10 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } else { iarea->object = 0; } + } else if (state == SDeletePicker) { + needRedraw = true; + } else if (state == SNormal && iarea->getToolMode() == TMColorPicker && !hoveredPicker && button == 3) { + iarea->setToolHand (); } if (cropgl && (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove)) { @@ -620,7 +679,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) return; } - if (state != SEditDrag3 && state != SEditPick3 && button == 3 && !(bstate & (GDK_SHIFT_MASK|GDK_CONTROL_MASK))) { + if (state != SDeletePicker && state != SEditDrag3 && state != SEditPick3 && button == 3 && !(bstate & (GDK_SHIFT_MASK|GDK_CONTROL_MASK))) { iarea->pipetteVal[0] = iarea->pipetteVal[1] = iarea->pipetteVal[2] = -1.f; needRedraw = iarea->object == 1; @@ -778,6 +837,33 @@ void CropWindow::pointerMoved (int bstate, int x, int y) action_x = new_action_x; action_y = new_action_y; iarea->redraw (); + } else if (state == SDragPicker) { + Coord imgPos, cropPos; + action_x = x - press_x; + action_x = y - press_y; + screenCoordToImage (x, y, imgPos.x, imgPos.y); + if (imgPos.x < 0) { + imgPos.x = 0; + }else if (imgPos.x >= ipc->getFullWidth()) { + imgPos.x = ipc->getFullWidth()-1; + } + if (imgPos.y < 0) { + imgPos.y = 0; + }else if (imgPos.y >= ipc->getFullHeight()) { + imgPos.y = ipc->getFullHeight()-1; + } + imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); + float r=0.f, g=0.f, b=0.f; + bool isValid = isHoveredPickerFullyInside (cropPos); + hoveredPicker->setValidity (isValid); + if (isValid) { + cropHandler.colorPick(cropPos, r, g, b, hoveredPicker->getSize()); + } + hoveredPicker->setPosition (imgPos, r, g, b); + iarea->redraw (); + } else if (state == SNormal && iarea->getToolMode () == TMColorPicker && onArea(ColorPicker, x, y)) { + // TODO: we could set the hovered picker as Highlighted here + // Keep this if statement, the onArea will find out the hoveredPicker and will be used to update the cursor } else if (editSubscriber) { rtengine::Crop* crop = static_cast(cropHandler.getCrop()); @@ -931,6 +1017,16 @@ bool CropWindow::onArea (CursorArea a, int x, int y) case CropImage: return x >= xpos + imgX + imgAreaX && y >= ypos + imgY + imgAreaY && x < xpos + imgX + imgAreaX + imgW && y < ypos + imgY + imgAreaY + imgH; + case ColorPicker: + for (auto colorPicker : colorPickers) { + if (colorPicker->isOver(x, y)) { + hoveredPicker = colorPicker; + return true; + } + } + hoveredPicker = nullptr; + return false; + case CropBorder: return (x >= xpos + imgAreaX && y >= ypos + imgAreaY && x < xpos + imgAreaX + imgAreaW && y < ypos + imgAreaY + imgAreaH) && @@ -1048,6 +1144,8 @@ void CropWindow::updateCursor (int x, int y) cursorManager.setCursor (iarea->get_window(), CSMove); } else if (onArea (CropResize, x, y)) { cursorManager.setCursor (iarea->get_window(), CSResizeDiagonal); + } else if (tm == TMColorPicker && hoveredPicker) { + cursorManager.setCursor (iarea->get_window(), CSMove); } else if (tm == TMHand && (onArea (CropTopLeft, x, y))) { cursorManager.setCursor (iarea->get_window(), CSResizeTopLeft); } else if (tm == TMHand && (onArea (CropTopRight, x, y))) { @@ -1083,6 +1181,8 @@ void CropWindow::updateCursor (int x, int y) cursorManager.setCursor (iarea->get_window(), CSCropSelect); } else if (tm == TMStraighten) { cursorManager.setCursor (iarea->get_window(), CSStraighten); + } else if (tm == TMColorPicker) { + cursorManager.setCursor (iarea->get_window(), CSAddColPicker); } } else { int objectID = -1; @@ -1121,6 +1221,8 @@ void CropWindow::updateCursor (int x, int y) cursorManager.setCursor (iarea->get_window(), CSResizeBottomRight); } else if (state == SCropWinResize) { cursorManager.setCursor (iarea->get_window(), CSResizeDiagonal); + } else if (state == SDragPicker) { + cursorManager.setCursor (iarea->get_window(), CSMove2D); } } @@ -1674,6 +1776,12 @@ void CropWindow::expose (Cairo::RefPtr cr) } } + if ((state == SNormal || state == SDragPicker) && iarea->showColorPickers()) { + for (auto colorPicker : colorPickers) { + colorPicker->draw(cr); + } + } + //t2.set (); // printf ("etime --> %d, %d\n", t2.etime (t1), t4.etime (t3)); } @@ -1924,6 +2032,25 @@ void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) iarea->redraw (); } +bool CropWindow::isHoveredPickerFullyInside (const rtengine::Coord &pos) +{ + + return true; + if (!cropHandler.cropPixbuf) { + return false; + } + rtengine::Coord cropPos; + rtengine::Coord pickerPos, cropPickerPos; + hoveredPicker->getImagePosition(pickerPos); + rtengine::Coord minPos(0, 0); + rtengine::Coord maxPos(cropHandler.cropPixbuf->get_width(), cropHandler.cropPixbuf->get_height()); + rtengine::Coord halfPickerSize((int)hoveredPicker->getSize()/2, (int)hoveredPicker->getSize()/2); + imageCoordToCropImage (pickerPos.x, pickerPos.y, cropPickerPos.x, cropPickerPos.y); + rtengine::Coord pickerMinPos = cropPickerPos - halfPickerSize; + rtengine::Coord pickerMaxPos = cropPickerPos + halfPickerSize; + return pickerMinPos >= minPos && pickerMaxPos <= maxPos; +} + void CropWindow::screenCoordToCropBuffer (int phyx, int phyy, int& cropx, int& cropy) { @@ -1945,8 +2072,8 @@ void CropWindow::screenCoordToImage (int phyx, int phyy, int& imgx, int& imgy) int cropX, cropY; cropHandler.getPosition (cropX, cropY); - imgx = cropX + (phyx - xpos - imgX) / zoomSteps[cropZoom].zoom; - imgy = cropY + (phyy - ypos - imgY) / zoomSteps[cropZoom].zoom; + imgx = cropX + (phyx - xpos - imgX - imgAreaX) / zoomSteps[cropZoom].zoom; + imgy = cropY + (phyy - ypos - imgY - imgAreaY) / zoomSteps[cropZoom].zoom; } void CropWindow::screenCoordToCropCanvas (int phyx, int phyy, int& prevx, int& prevy) @@ -1983,6 +2110,14 @@ void CropWindow::imageCoordToCropBuffer (int imgx, int imgy, int& phyx, int& phy phyy = (imgy - cropY) * zoomSteps[cropZoom].zoom + /*ypos + imgY +*/ crop->getUpperBorder(); } +void CropWindow::imageCoordToCropImage (int imgx, int imgy, int& phyx, int& phyy) +{ + int cropX, cropY; + cropHandler.getPosition (cropX, cropY); + phyx = (imgx - cropX) * zoomSteps[cropZoom].zoom; + phyy = (imgy - cropY) * zoomSteps[cropZoom].zoom; +} + int CropWindow::scaleValueToImage (int value) { return int(double(value) / zoomSteps[cropZoom].zoom); @@ -2220,6 +2355,14 @@ void CropWindow::drawObservedFrame (Cairo::RefPtr cr, int rw, in void CropWindow::cropImageUpdated () { + for (auto colorPicker : colorPickers) { + Coord imgPos, cropPos; + colorPicker->getImagePosition(imgPos); + imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); + float r=0.f, g=0.f, b=0.f; + cropHandler.colorPick(cropPos, r, g, b, colorPicker->getSize()); + colorPicker->setRGB (r, g, b); + } iarea->redraw (); } @@ -2281,7 +2424,7 @@ void CropWindow::delCropWindowListener (CropWindowListener* l) } } -EditDataProvider* CropWindow::getImageArea() +ImageArea* CropWindow::getImageArea() { return iarea; } diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index d9f738f66..d58291776 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -59,6 +59,10 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed bool fitZoom; bool isLowUpdatePriority; + // color pickers + std::vector colorPickers; + LockableColorPicker* hoveredPicker; + // decoration LWButton *bZoomIn, *bZoomOut, *bZoom100, /**bZoomFit,*/ *bClose; LWButtonSet buttonSet; @@ -101,12 +105,15 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed void drawObservedFrame (Cairo::RefPtr cr, int rw = 0, int rh = 0); void changeZoom (int zoom, bool notify = true, int centerx = -1, int centery = -1); + bool isHoveredPickerFullyInside(const rtengine::Coord &pos); + // Used by the mainCropWindow only void getObservedFrameArea (int& x, int& y, int& w, int& h, int rw = 0, int rh = 0); public: CropHandler cropHandler; CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_, bool isDetailWindow); + ~CropWindow (); void setDecorated (bool decorated) { @@ -127,6 +134,7 @@ public: void imageCoordToCropCanvas (int imgx, int imgy, int& phyx, int& phyy); void imageCoordToScreen (int imgx, int imgy, int& phyx, int& phyy); void imageCoordToCropBuffer (int imgx, int imgy, int& phyx, int& phyy); + void imageCoordToCropImage (int imgx, int imgy, int& phyx, int& phyy); int scaleValueToImage (int value); float scaleValueToImage (float value); double scaleValueToImage (double value); @@ -208,7 +216,7 @@ public: void remoteMove (int deltaX, int deltaY); void remoteMoveReady (); - EditDataProvider* getImageArea(); + ImageArea* getImageArea(); }; #endif diff --git a/rtgui/cursormanager.cc b/rtgui/cursormanager.cc index e011fd969..78e2513a5 100644 --- a/rtgui/cursormanager.cc +++ b/rtgui/cursormanager.cc @@ -44,6 +44,7 @@ void CursorManager::init (Glib::RefPtr mainWin) Glib::RefPtr hand = RTImage::createFromFile ("cross.png"); Glib::RefPtr close_hand = RTImage::createFromFile ("closedhand.png"); Glib::RefPtr wbpick = RTImage::createFromFile ("gtk-color-picker-small.png"); + Glib::RefPtr cpick = RTImage::createFromFile ("gtk-color-picker-add.png"); Glib::RefPtr empty = RTImage::createFromFile ("empty.png"); Glib::RefPtr move2D = RTImage::createFromFile ("move-2D.png"); Glib::RefPtr move1DH = RTImage::createFromFile ("move-1D-h.png"); @@ -52,7 +53,8 @@ void CursorManager::init (Glib::RefPtr mainWin) cHand = hand ? new Gdk::Cursor (cAdd->get_display(), hand, 10, 10) : new Gdk::Cursor (Gdk::HAND2); cClosedHand = close_hand ? new Gdk::Cursor (cAdd->get_display(), close_hand, 10, 10) : new Gdk::Cursor (Gdk::HAND2); - cWB = wbpick ? new Gdk::Cursor (cAdd->get_display(), wbpick, 1, 12) : new Gdk::Cursor (Gdk::ARROW); + cWB = wbpick ? new Gdk::Cursor (cAdd->get_display(), wbpick, 3, 15) : new Gdk::Cursor (Gdk::ARROW); + cAddPicker = cpick ? new Gdk::Cursor (cAdd->get_display(), cpick, 3, 18) : new Gdk::Cursor (Gdk::ARROW); cHidden = empty ? new Gdk::Cursor (cAdd->get_display(), empty, 12, 12) : new Gdk::Cursor (Gdk::FLEUR); cMove2D = move2D ? new Gdk::Cursor (cAdd->get_display(), move2D, 11, 11) : new Gdk::Cursor (Gdk::FLEUR); cMove1DH = move1DH ? new Gdk::Cursor (cAdd->get_display(), move1DH, 11, 11) : new Gdk::Cursor (Gdk::FLEUR); @@ -100,6 +102,8 @@ void CursorManager::setCursor (Glib::RefPtr window, CursorShape sha window->set_cursor (*cMoveRotate); } else if (shape == CSSpotWB) { window->set_cursor (*cWB); + } else if (shape == CSAddColPicker) { + window->set_cursor (*cAddPicker); } else if (shape == CSCropSelect) { window->set_cursor (*cHand); } else if (shape == CSMoveLeft) { diff --git a/rtgui/cursormanager.h b/rtgui/cursormanager.h index b51fb1e38..f256415c1 100644 --- a/rtgui/cursormanager.h +++ b/rtgui/cursormanager.h @@ -26,7 +26,7 @@ enum CursorShape { CSMoveRight, CSResizeWidth, CSResizeHeight, CSResizeDiagonal, CSResizeTopLeft, CSResizeTopRight, CSResizeBottomLeft, CSResizeBottomRight, CSMove2D, CSMove1DH, CSMove1DV, CSMoveRotate, - CSSpotWB, CSCropSelect, CSStraighten, CSPlus, CSWait, CSEmpty + CSSpotWB, CSAddColPicker, CSCropSelect, CSStraighten, CSPlus, CSWait, CSEmpty }; class CursorManager @@ -51,6 +51,7 @@ protected: Gdk::Cursor* cHand; Gdk::Cursor* cClosedHand; Gdk::Cursor* cWB; + Gdk::Cursor* cAddPicker; Gdk::Cursor* cHidden; Gdk::Cursor* cMove2D; Gdk::Cursor* cMove1DH; diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index d3fc8bf79..6f25f0f47 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -59,7 +59,7 @@ std::vector listSubDirs (const Glib::RefPtr& dir, bool } catch (const Glib::Exception& exception) { if (options.rtSettings.verbose) { - std::cerr << "Failed to list subdirectories of \"" << dir << "\": " << exception.what () << std::endl; + std::cerr << "Failed to list subdirectories of \"" << dir->get_basename() << "\": " << exception.what () << std::endl; } } diff --git a/rtgui/edit.h b/rtgui/edit.h index c49c45408..42d19ebbe 100644 --- a/rtgui/edit.h +++ b/rtgui/edit.h @@ -208,10 +208,12 @@ public: virtual void screenCoordToImage (int phyx, int phyy, int& imgx, int& imgy) = 0; /// Convert the image coords to the widget's DrawingArea (i.e. preview area) coords virtual void imageCoordToScreen (int imgx, int imgy, int& phyx, int& phyy) = 0; - /// Convert the image coords to the crop's canvas coords + /// Convert the image coords to the crop's canvas coords (full image + padding) virtual void imageCoordToCropCanvas (int imgx, int imgy, int& phyx, int& phyy) = 0; - /// Convert the image coords to the edit buffer coords + /// Convert the image coords to the edit buffer coords (includes borders) virtual void imageCoordToCropBuffer (int imgx, int imgy, int& phyx, int& phyy) = 0; + /// Convert the image coords to the displayed image coords (no borders here) + virtual void imageCoordToCropImage (int imgx, int imgy, int& phyx, int& phyy) = 0; /// Convert a size value from the preview's scale to the image's scale virtual int scaleValueToImage (int value) = 0; /// Convert a size value from the preview's scale to the image's scale diff --git a/rtgui/editenums.h b/rtgui/editenums.h index 557912222..264576789 100644 --- a/rtgui/editenums.h +++ b/rtgui/editenums.h @@ -21,9 +21,9 @@ enum ImgEditState {SNormal, SCropMove, SHandMove, SResizeW1, SResizeW2, SResizeH1, SResizeH2, SResizeTL, SResizeTR, SResizeBL, SResizeBR, SCropSelecting, SRotateSelecting, SCropWinMove, SCropFrameMove, SCropImgMove, SCropWinResize, SObservedMove, - SEditDrag1, SEditDrag2, SEditDrag3, SEditPick1, SEditPick2, SEditPick3 + SEditDrag1, SEditDrag2, SEditDrag3, SEditPick1, SEditPick2, SEditPick3, SDragPicker, SDeletePicker }; -enum CursorArea {CropWinButtons, CropToolBar, CropImage, CropBorder, CropTop, CropTopLeft, CropTopRight, CropBottom, CropBottomLeft, +enum CursorArea {CropWinButtons, CropToolBar, CropImage, ColorPicker, CropBorder, CropTop, CropTopLeft, CropTopRight, CropBottom, CropBottomLeft, CropBottomRight, CropLeft, CropRight, CropInside, CropResize, CropObserved }; diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 80dc3dfae..e8baf7730 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -313,6 +313,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iareapanel = new ImageAreaPanel (); tpc->setEditProvider(iareapanel->imageArea); + tpc->getToolBar()->setLockablePickerToolListener(iareapanel->imageArea); Gtk::HBox* toolBarPanel = Gtk::manage (new Gtk::HBox ()); toolBarPanel->pack_start (*hidehp, Gtk::PACK_SHRINK, 1); diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc index fd53db555..429c8f430 100644 --- a/rtgui/filepanel.cc +++ b/rtgui/filepanel.cc @@ -52,7 +52,6 @@ FilePanel::FilePanel () : parent(NULL) dirpaned->pack1 (*placespaned, false, true); tpc = new BatchToolPanelCoordinator (this); - tpc->removeWbTool(); fileCatalog = Gtk::manage ( new FileCatalog (tpc->coarse, tpc->getToolBar(), this) ); ribbonPane = Gtk::manage ( new Gtk::Paned() ); ribbonPane->add(*fileCatalog); diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index c984a03f1..e52c83e65 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -1080,11 +1080,35 @@ void TextOrIcon::switchTo(TOITypes type) BackBuffer::BackBuffer() : x(0), y(0), w(0), h(0), offset(0, 0), dirty(true) {} +void BackBuffer::setDestPosition(int x, int y) +{ + // values will be clamped when used... + this->x = x; + this->y = y; +} + void BackBuffer::setSrcOffset(int x, int y) { // values will be clamped when used... - offset.x = x; - offset.y = y; + offset.set(x, y); +} + +void BackBuffer::setSrcOffset(const rtengine::Coord &newOffset) +{ + // values will be clamped when used... + offset = newOffset; +} + +void BackBuffer::getSrcOffset(int &x, int &y) +{ + // values will be clamped when used... + offset.get(x, y); +} + +void BackBuffer::getSrcOffset(rtengine::Coord &offset) +{ + // values will be clamped when used... + offset = this->offset; } // Note: newW & newH must be > 0 @@ -1092,12 +1116,16 @@ bool BackBuffer::setDrawRectangle(Glib::RefPtr window, int newX, in { assert(newW && newH); - bool newSize = w != newW || h != newH; + bool newSize = (newW > 0 && w != newW) || (newH > 0 && h != newH); x = newX; y = newY; - w = newW; - h = newH; + if (newH > 0) { + w = newW; + } + if (newH > 0) { + h = newH; + } // WARNING: we're assuming that the surface type won't change during all the execution time of RT. I guess it may be wrong when the user change the gfx card display settings!? if (updateBackBufferSize && newSize && window) { @@ -1113,14 +1141,18 @@ bool BackBuffer::setDrawRectangle(Glib::RefPtr window, int newX, in // Note: newW & newH must be > 0 bool BackBuffer::setDrawRectangle(Cairo::Format format, int newX, int newY, int newW, int newH, bool updateBackBufferSize) { - assert(!newW && !newH); + assert(newW && newH); - bool newSize = w != newW || h != newH; + bool newSize = (newW > 0 && w != newW) || (newH > 0 && h != newH); x = newX; y = newY; - w = newW; - h = newH; + if (newH > 0) { + w = newW; + } + if (newH > 0) { + h = newH; + } // WARNING: we're assuming that the surface type won't change during all the execution time of RT. I guess it may be wrong when the user change the gfx card display settings!? if (updateBackBufferSize && newSize) { @@ -1136,7 +1168,7 @@ bool BackBuffer::setDrawRectangle(Cairo::Format format, int newX, int newY, int /* * Copy the backbuffer to a Gdk::Window */ -void BackBuffer::copySurface(Glib::RefPtr window, GdkRectangle *rectangle) +void BackBuffer::copySurface(Glib::RefPtr &window, GdkRectangle *rectangle) { if (surface && window) { // TODO: look out if window can be different on each call, and if not, store a reference to the window @@ -1190,7 +1222,7 @@ void BackBuffer::copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle /* * Copy the BackBuffer to another Cairo::Surface */ -void BackBuffer::copySurface(Cairo::RefPtr destSurface, GdkRectangle *rectangle) +void BackBuffer::copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle) { if (surface && destSurface) { // compute the source offset @@ -1212,3 +1244,23 @@ void BackBuffer::copySurface(Cairo::RefPtr destSurface, Gdk } } +void BackBuffer::copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle) +{ + if (surface && context) { + // compute the source offset + int offsetX = rtengine::LIM(offset.x, 0, surface->get_width()); + int offsetY = rtengine::LIM(offset.y, 0, surface->get_height()); + + // now copy the off-screen Surface to the destination Surface + context->set_source(surface, x - offsetX, y - offsetY); + context->set_line_width(0.); + + if (rectangle) { + context->rectangle(rectangle->x, rectangle->y, rectangle->width, rectangle->height); + } else { + context->rectangle(x, y, w, h); + } + + context->fill(); + } +} diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index f91bb0245..92f32204a 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -21,6 +21,7 @@ #include #include "../rtengine/rtengine.h" +#include "../rtengine/coord.h" #include #include @@ -382,33 +383,6 @@ public: } }; -/** - * @brief Handle point coordinates - */ -template -class Point -{ -public: - T x, y; - Point() - { - x = T(0); - y = T(0); - } - - Point(T coordX, T coordY) - { - x = coordX; - y = coordY; - } - - void setCoords(T coordX, T coordY) - { - x = coordX; - y = coordY; - } -}; - /** * @brief Handle backbuffers as automatically as possible */ @@ -417,7 +391,7 @@ class BackBuffer protected: int x, y, w, h; // Rectangle where the colored bar has to be drawn - Point offset; // Offset of the source region to draw, relative to the top left corner + rtengine::Coord offset; // Offset of the source region to draw, relative to the top left corner Cairo::RefPtr surface; bool dirty; // mean that the Surface has to be (re)allocated @@ -426,13 +400,19 @@ public: // set the destination drawing rectangle; return true if the dimensions are different // Note: newW & newH must be > 0 - bool setDrawRectangle(Glib::RefPtr window, int newX, int newY, int newW, int newH, bool updateBackBufferSize = true); - bool setDrawRectangle(Cairo::Format format, int newX, int newY, int newW, int newH, bool updateBackBufferSize = true); + bool setDrawRectangle(Glib::RefPtr window, int newX, int newY, int newW=-1, int newH=-1, bool updateBackBufferSize = true); + bool setDrawRectangle(Cairo::Format format, int newX, int newY, int newW=-1, int newH=-1, bool updateBackBufferSize = true); + // set the destination drawing location, do not modify other parameters like size and offset. Use setDrawRectangle to set all parameters at the same time + void setDestPosition(int x, int y); void setSrcOffset(int x, int y); + void setSrcOffset(const rtengine::Coord &newOffset); + void getSrcOffset(int &x, int &y); + void getSrcOffset(rtengine::Coord &offset); - void copySurface(Glib::RefPtr window, GdkRectangle *rectangle = NULL); + void copySurface(Glib::RefPtr &window, GdkRectangle *rectangle = NULL); void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = NULL); - void copySurface(Cairo::RefPtr destSurface, GdkRectangle *rectangle = NULL); + void copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle = NULL); + void copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle = NULL); void setDirty(bool isDirty) { diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 0b757d8ec..8827d96e5 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -178,7 +178,6 @@ CropWindow* ImageArea::getCropWindow (int x, int y) return cw; } - void ImageArea::redraw () { // dirty prevents multiple updates queued up @@ -188,6 +187,11 @@ void ImageArea::redraw () } } +void ImageArea::switchPickerVisibility (bool isVisible) +{ + redraw(); +} + bool ImageArea::on_expose_event(GdkEventExpose* event) { dirty = false; @@ -690,6 +694,16 @@ ToolMode ImageArea::getToolMode () } } +bool ImageArea::showColorPickers () +{ + + if (listener && listener->getToolBar()) { + return listener->getToolBar()->showColorPickers (); + } else { + return false; + } +} + void ImageArea::setToolHand () { diff --git a/rtgui/imagearea.h b/rtgui/imagearea.h index bd2c19093..deabe8aa7 100644 --- a/rtgui/imagearea.h +++ b/rtgui/imagearea.h @@ -33,7 +33,7 @@ #include "edit.h" class ImageAreaPanel; -class ImageArea : public Gtk::DrawingArea, public CropWindowListener, public EditDataProvider +class ImageArea : public Gtk::DrawingArea, public CropWindowListener, public EditDataProvider, public LockablePickerToolListener { friend class ZoomPanel; @@ -122,6 +122,7 @@ public: void cropWindowSelected (CropWindow* cw); void cropWindowClosed (CropWindow* cw); ToolMode getToolMode (); + bool showColorPickers (); void setToolHand (); void straightenReady (double rotDeg); void spotWBSelected (int x, int y); @@ -143,6 +144,9 @@ public: void cropZoomChanged (CropWindow* cw); void initialImageArrived (CropWindow* cw) ; + // LockablePickerToolListener interface + void switchPickerVisibility (bool isVisible); + CropWindow* getMainCropWindow () { return mainCropWindow; diff --git a/rtgui/imageareatoollistener.h b/rtgui/imageareatoollistener.h index 3f1238810..edb93f030 100644 --- a/rtgui/imageareatoollistener.h +++ b/rtgui/imageareatoollistener.h @@ -27,6 +27,7 @@ class ImageAreaToolListener { public: + virtual ~ImageAreaToolListener() {} virtual void spotWBselected (int x, int y, Thumbnail* thm = NULL) {} virtual int getSpotWBRectSize () { @@ -38,7 +39,6 @@ public: { return NULL; } - virtual void removeWbTool() = 0; virtual CropGUIListener* startCropEditing (Thumbnail* thm = NULL) { return NULL; diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc new file mode 100644 index 000000000..22383c294 --- /dev/null +++ b/rtgui/lockablecolorpicker.cc @@ -0,0 +1,332 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#include "lockablecolorpicker.h" +#include "options.h" +#include "../rtengine/color.h" +#include "../rtengine/rt_math.h" +#include "imagearea.h" +#include "multilangmgr.h" + +extern Options options; + +LockableColorPicker::LockableColorPicker (CropWindow* cropWindow) +: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(PickerSize::S20), + isValid(false), r(0.f), g(0.f), b(0.f), h(0.f), s(0.f), v(0.f) +{ +} + +LockableColorPicker::LockableColorPicker (int x, int y, PickerSize size, const float R, const float G, const float B, CropWindow* cropWindow) +: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(x, y), size(size), + isValid(false), r(R), g(G), b(B) +{ + float h_, s_, v_; + rtengine::Color::rgb2hsv((float)r*65535.f, (float)g*65535.f, (float)b*65535.f, h_, s_, v_); + h = (int)(h_*255.f); + s = (int)(s_*255.f); + v = (int)(v_*255.f); +} + +void LockableColorPicker::updateBackBuffer () +{ + int newW, newH; + + // -------------------- setting some key constants --------------------- + const float circlePadding = 3.f; + // --------------------------------------------------------------------- + + if (isValid) { + Gtk::DrawingArea *iArea = cropWindow->getImageArea(); + Cairo::RefPtr bbcr = BackBuffer::getContext(); + + Glib::RefPtr pangoContext = iArea->get_pango_context (); + Pango::FontDescription fontd(options.colorPickerFont); + pangoContext->set_font_description (fontd); + + // for drawing text + bbcr->set_line_width (0.); + + Glib::RefPtr layout[3][2]; + + switch (displayedValues) { + case ColorPickerType::RGB: + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_R") + " "); + layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(r*255.f))); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_G") + " "); + layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(g*255.f))); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_B") + " "); + layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(b*255.f))); + break; + case ColorPickerType::HSV: + default: + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_H") + " "); + layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(h*255.f))); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_S") + " "); + layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(s*255.f))); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_V") + " "); + layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(v*255.f))); + } + + int w00, w01, w10, w11, w20, w21, h00, h01, h10, h11, h20, h21; + layout[0][0]->get_pixel_size(w00, h00); + layout[1][0]->get_pixel_size(w10, h10); + layout[2][0]->get_pixel_size(w20, h20); + layout[0][1]->get_pixel_size(w01, h01); + layout[1][1]->get_pixel_size(w11, h11); + layout[2][1]->get_pixel_size(w21, h21); + int maxWCol0 = rtengine::max(w00, w10, w20); + int maxWCol1 = rtengine::max(w01, w11, w21); + int maxHRow0 = rtengine::max(h00, h01); + int maxHRow1 = rtengine::max(h10, h11); + int maxHRow2 = rtengine::max(h20, h21); + + // -------------------- setting some key constants --------------------- + const int textPadding = 2; + const int textWidth = maxWCol0 + maxWCol1 + textPadding; + const int textHeight = maxHRow0 + maxHRow1 + maxHRow2 + 2*textPadding; + const double opacity = 0.75; + // --------------------------------------------------------------------- + + newW = rtengine::max((int)size + 2 * circlePadding, textWidth + 2 * textPadding); + newH = (int)size + 2 * circlePadding + textHeight + 2 * textPadding; + + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, newW, newH, true); + + float center = (float)size/2.f + circlePadding; + + // black background of the whole color picker + bbcr->set_line_width (0.); + bbcr->arc_negative (center, center, center, 0.f, (float)M_PI); + bbcr->line_to (0, 2.f * center + textHeight + 2*textPadding); + bbcr->line_to (textWidth + 2*textPadding, 2.f * center + textHeight + 2*textPadding); + bbcr->line_to (textWidth + 2*textPadding, 2.f * center); + bbcr->line_to (2.f * center, 2.f * center); + bbcr->close_path(); + bbcr->set_source_rgba (0., 0., 0., opacity); + bbcr->set_line_join (Cairo::LINE_JOIN_BEVEL); + bbcr->set_line_cap (Cairo::LINE_CAP_SQUARE); + bbcr->fill (); + + // light grey circle around the color mark + bbcr->arc (center, center, center - circlePadding / 2.f - 0.5f, 0.f, 2.f * (float)M_PI); + bbcr->set_source_rgb (0.7, 0.7, 0.7); + bbcr->set_line_width (circlePadding-2.f); + bbcr->stroke (); + + // spot disc with picked color + bbcr->arc (center, center, center - circlePadding - 0.5f, 0.f, 2.f * (float)M_PI); + bbcr->set_source_rgb (r, g, b); // <- set the picker color here + bbcr->set_line_width (0.); + bbcr->fill(); + + // adding the font + bbcr->set_line_width (0.); + bbcr->set_line_join (Cairo::LINE_JOIN_ROUND); + bbcr->set_line_cap (Cairo::LINE_CAP_ROUND); + bbcr->set_source_rgb (1., 1., 1.); + double txtOffsetX = textPadding; + double txtOffsetY = (double)size + 2.f * circlePadding + textPadding; + switch (iArea->get_direction()) { + case Gtk::TEXT_DIR_RTL: + bbcr->move_to (txtOffsetX , txtOffsetY); + layout[0][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol1 + textPadding, txtOffsetY); + layout[0][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + textPadding); + layout[1][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol1 + textPadding, txtOffsetY + maxHRow0 + textPadding); + layout[1][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol1 + textPadding, txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + break; + default: + bbcr->move_to (txtOffsetX , txtOffsetY); + layout[0][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol0 + textPadding, txtOffsetY); + layout[0][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + textPadding); + layout[1][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol0 + textPadding, txtOffsetY + maxHRow0 + textPadding); + layout[1][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol0 + textPadding, txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + } + + anchorOffset.set (center, center); + + } else { + newH = newW = (int)size + 2 * circlePadding; + + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, newW, newH, true); + + Cairo::RefPtr bbcr = BackBuffer::getContext(); + + float center = (float)size/2.f + circlePadding; + bbcr->arc (center, center, center - circlePadding/2.f, 0.f, 2.f * (float)M_PI); + bbcr->set_source_rgb (0., 0., 0.); + bbcr->set_line_width(circlePadding); + bbcr->stroke_preserve(); + bbcr->set_source_rgb (1., 1., 1.); + bbcr->set_line_width(circlePadding-2.f); + bbcr->stroke (); + + anchorOffset.set (center, center); + + } + + setDirty (false); +} + +void LockableColorPicker::draw (Cairo::RefPtr &cr) +{ + if (isDirty()) { + updateBackBuffer(); + } + int px, py; + cropWindow->imageCoordToScreen(position.x, position.y, px, py); + setDestPosition(px - anchorOffset.x, py - anchorOffset.y); + + copySurface(cr); +} + +void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const float R, const float G, const float B) +{ + // we're not checking bounds here, this will be done at rendering time + position = newPos; + + r = R; + g = G; + b = B; + + float h_, s_, v_; + rtengine::Color::rgb2hsv((float)r*65535.f, (float)g*65535.f, (float)b*65535.f, h_, s_, v_); + h = (float)h_; + s = (float)s_; + v = (float)v_; + + if (isValid) { + setDirty(true); + } +} + +void LockableColorPicker::setRGB (const float R, const float G, const float B) +{ + if (r==R && g==G && b==B) { + return; + } + + r = R; + g = G; + b = B; + + float h_, s_, v_; + rtengine::Color::rgb2hsv((float)r*65535.f, (float)g*65535.f, (float)b*65535.f, h_, s_, v_); + h = (float)h_; + s = (float)s_; + v = (float)v_; + + if (isValid) { + setDirty(true); + } +} + +void LockableColorPicker::getImagePosition (rtengine::Coord &imgPos) +{ + imgPos = position; +} + +void LockableColorPicker::getScreenPosition (rtengine::Coord &screenPos) +{ + if (cropWindow) { + cropWindow->imageCoordToScreen(position.x, position.y, screenPos.x, screenPos.y); + } +} + +bool LockableColorPicker::isOver (int x, int y) +{ + if (!cropWindow) { + return false; + } + rtengine::Coord pickerScreenPos; + cropWindow->imageCoordToScreen(position.x, position.y, pickerScreenPos.x, pickerScreenPos.y); + + rtengine::Coord mousePos(x, y); + rtengine::Coord wh(getWidth(), getHeight()); + rtengine::Coord tl(pickerScreenPos - anchorOffset); + rtengine::Coord br(tl + wh); + return mousePos >= tl && mousePos <= br; +} + +void LockableColorPicker::setValidity (bool isValid) +{ + if (this->isValid != isValid) { + setDirty(true); + } + this->isValid = isValid; +} + +void LockableColorPicker::setSize (PickerSize newSize) +{ + if (size != newSize) + { + size = newSize; + setDirty(true); + } +} + +LockableColorPicker::PickerSize LockableColorPicker::getSize () +{ + return size; +} + +void LockableColorPicker::incSize () +{ + if (size < PickerSize::S30) { + size = (PickerSize)((int)size + 5); + setDirty(true); + } +} + +void LockableColorPicker::decSize () +{ + if (size > PickerSize::S5) { + size = (PickerSize)((int)size - 5); + setDirty(true); + } +} diff --git a/rtgui/lockablecolorpicker.h b/rtgui/lockablecolorpicker.h new file mode 100644 index 000000000..2f79649fe --- /dev/null +++ b/rtgui/lockablecolorpicker.h @@ -0,0 +1,85 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#ifndef __COLORPICKER__ +#define __COLORPICKER__ + + +#include "../rtengine/coord.h" +#include "guiutils.h" +#include "edit.h" + +class CropWindow; + +class LockablePickerToolListener { +public: + virtual ~LockablePickerToolListener () {} + + /// Callback on Color Picker's visibility switch + virtual void switchPickerVisibility (bool isVisible) {} +}; + +class LockableColorPicker : BackBuffer +{ +public: + enum class PickerSize { + S5=5, + S10=10, + S15=15, + S20=20, + S25=25, + S30=30 + }; +private: + enum class ColorPickerType { + RGB, + HSV + }; + CropWindow* cropWindow; // the color picker is displayed in a single cropWindow, the one that the user has clicked in + ColorPickerType displayedValues; + rtengine::Coord position; // Coordinate in image space + rtengine::Coord anchorOffset; + PickerSize size; + bool isValid; + float r, g, b; // red green blue in [0;1] range + float h, s, v; // hue saturation value in [0;1] range + + void updateBackBuffer (); + +public: + + LockableColorPicker (CropWindow* cropWindow); + LockableColorPicker (int x, int y, PickerSize size, const float R, const float G, const float B, CropWindow* cropWindow); + + void draw (Cairo::RefPtr &cr); + + // Used to update the RGB color, the HSV values will be updated accordingly + void setPosition (const rtengine::Coord &newPos, const float R, const float G, const float B); + void setRGB (const float R, const float G, const float B); + void getImagePosition (rtengine::Coord &imgPos); + void getScreenPosition (rtengine::Coord &screenPos); + PickerSize getSize (); + bool isOver (int x, int y); + void setValidity (bool isValid); + void setSize (PickerSize newSize); + void incSize (); + void decSize (); +}; + +#endif diff --git a/rtgui/options.cc b/rtgui/options.cc index d6a327dc8..a95275035 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -292,6 +292,7 @@ void Options::setDefaults () { font = "sans, 8"; + colorPickerFont = "sans, 8"; windowWidth = 1200; windowHeight = 680; windowX = 0; @@ -1246,6 +1247,10 @@ int Options::readFromFile (Glib::ustring fname) font = keyFile.get_string ("GUI", "Font"); } + if (keyFile.has_key ("GUI", "ColorPickerFont")) { + colorPickerFont = keyFile.get_string ("GUI", "ColorPickerFont"); + } + if (keyFile.has_key ("GUI", "WindowWidth")) { windowWidth = keyFile.get_integer ("GUI", "WindowWidth"); } @@ -1973,6 +1978,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); keyFile.set_string ("GUI", "Font", font); + keyFile.set_string ("GUI", "ColorPickerFont", colorPickerFont); keyFile.set_integer ("GUI", "WindowWidth", windowWidth); keyFile.set_integer ("GUI", "WindowHeight", windowHeight); keyFile.set_integer ("GUI", "WindowX", windowX); diff --git a/rtgui/options.h b/rtgui/options.h index c25708674..b0cb7b987 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -120,6 +120,7 @@ public: bool editorFilmStripOpened; int historyPanelWidth; Glib::ustring font; + Glib::ustring colorPickerFont; int windowWidth; int windowHeight; int windowX; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 14c9cb0eb..e43f3f678 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -931,14 +931,21 @@ Gtk::Widget* Preferences::getGeneralPanel () hbtheme->pack_start (*fontbutton); vbftheme->pack_start(*hbtheme, Gtk::PACK_SHRINK, 0); + Gtk::Label* cpfontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT_COLPICKER") + ":") ); + colorPickerFontButton = Gtk::manage( new Gtk::FontButton ()); + colorPickerFontButton->set_use_size(true); + colorPickerFontButton->set_font_name(options.colorPickerFont); + Gtk::HBox* hbcolorchooser = Gtk::manage( new Gtk::HBox () ); hbcolorchooser->set_spacing(4); hbcolorchooser->pack_start (*cutOverlayLabel, Gtk::PACK_SHRINK, 0); hbcolorchooser->pack_start (*butCropCol, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_end (*butNavGuideCol, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_end (*navGuideLabel, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*butNavGuideCol, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*navGuideLabel, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*cpfontlab, Gtk::PACK_EXPAND_WIDGET, 0); + hbcolorchooser->pack_start (*colorPickerFontButton, Gtk::PACK_SHRINK, 0); vbftheme->pack_start(*hbcolorchooser, Gtk::PACK_SHRINK, 0); @@ -1414,6 +1421,7 @@ void Preferences::storePreferences () moptions.navGuideBrush[3] = butNavGuideCol->get_alpha() / 65535.0; moptions.font = fontbutton->get_font_name(); + moptions.colorPickerFont = colorPickerFontButton->get_font_name(); #ifdef WIN32 moptions.gimpDir = gimpDir->get_filename (); moptions.psDir = psDir->get_filename (); @@ -1629,6 +1637,7 @@ void Preferences::fillPreferences () butNavGuideCol->set_alpha ( (unsigned short)(moptions.navGuideBrush[3] * 65535.0)); fontbutton->set_font_name(moptions.font); + colorPickerFontButton->set_font_name(moptions.colorPickerFont); showDateTime->set_active (moptions.fbShowDateTime); showBasicExif->set_active (moptions.fbShowBasicExif); showExpComp->set_active (moptions.fbShowExpComp); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 1cfb435cf..84e4ef609 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -131,6 +131,7 @@ protected: Gtk::HBox* hbtheme; Gtk::CheckButton* chUseSystemTheme; Gtk::FontButton* fontbutton; + Gtk::FontButton* colorPickerFontButton; Gtk::ColorButton* butCropCol; Gtk::ColorButton* butNavGuideCol; diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index 7a7222299..dd425a279 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -20,7 +20,7 @@ #include "multilangmgr.h" #include "guiutils.h" -ToolBar::ToolBar () : listener (NULL) +ToolBar::ToolBar () : showColPickers(true), listener (NULL) { editingMode = false; @@ -47,6 +47,19 @@ ToolBar::ToolBar () : listener (NULL) pack_start (*wbTool); + showcolpickersimg = Gtk::manage (new RTImage ("colorPickers-show.png")); + showcolpickersimg->reference(); + hidecolpickersimg = Gtk::manage (new RTImage ("colorPickers-hide.png")); + hidecolpickersimg->reference(); + + colPickerTool = Gtk::manage (new Gtk::ToggleButton ()); + colPickerTool->add (*showcolpickersimg); + showcolpickersimg->show (); + colPickerTool->set_relief(Gtk::RELIEF_NONE); + colPickerTool->show (); + + pack_start (*colPickerTool); + cropTool = Gtk::manage (new Gtk::ToggleButton ()); Gtk::Image* cropimg = Gtk::manage (new RTImage ("crop.png")); cropTool->add (*cropimg); @@ -71,11 +84,13 @@ ToolBar::ToolBar () : listener (NULL) handConn = handTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::hand_pressed)); wbConn = wbTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::wb_pressed)); + cpConn = colPickerTool->signal_button_press_event().connect_notify( sigc::mem_fun(*this, &ToolBar::colPicker_pressed)); cropConn = cropTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::crop_pressed)); straConn = straTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::stra_pressed)); handTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_HAND")); wbTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_WB")); + colPickerTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_COLORPICKER")); cropTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_CROP")); straTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_STRAIGHTEN")); } @@ -84,6 +99,8 @@ ToolBar::~ToolBar () { handimg->unreference(); editinghandimg->unreference(); + showcolpickersimg->unreference(); + hidecolpickersimg->unreference(); } // @@ -98,6 +115,9 @@ void ToolBar::setTool (ToolMode tool) if (wbTool) { wbConn.block (true); } + if (colPickerTool) { + cpConn.block (true); + } straConn.block (true); @@ -111,6 +131,9 @@ void ToolBar::setTool (ToolMode tool) cropTool->set_active (false); straTool->set_active (false); + if (colPickerTool) { + colPickerTool->set_active (false); + } if (tool == TMHand) { handTool->set_active (true); @@ -123,6 +146,10 @@ void ToolBar::setTool (ToolMode tool) cropTool->set_active (true); } else if (tool == TMStraighten) { straTool->set_active (true); + } else if (tool == TMColorPicker) { + if (colPickerTool) { + colPickerTool->set_active (true); + } } current = tool; @@ -133,6 +160,9 @@ void ToolBar::setTool (ToolMode tool) if (wbTool) { wbConn.block (false); } + if (colPickerTool) { + cpConn.block (false); + } straConn.block (false); @@ -181,6 +211,9 @@ void ToolBar::hand_pressed () handConn.block (true); cropConn.block (true); + if (colPickerTool) { + cpConn.block (true); + } if (wbTool) { wbConn.block (true); @@ -189,6 +222,9 @@ void ToolBar::hand_pressed () straConn.block (true); if (current != TMHand) { + if (colPickerTool) { + colPickerTool->set_active(false); + } if (wbTool) { wbTool->set_active (false); } @@ -209,7 +245,9 @@ void ToolBar::hand_pressed () handTool->set_active (true); handConn.block (false); cropConn.block (false); - + if (colPickerTool) { + cpConn.block (false); + } if (wbTool) { wbConn.block (false); } @@ -226,7 +264,9 @@ void ToolBar::wb_pressed () handConn.block (true); cropConn.block (true); - + if (colPickerTool) { + cpConn.block (true); + } if (wbTool) { wbConn.block (true); } @@ -237,6 +277,9 @@ void ToolBar::wb_pressed () handTool->set_active (false); cropTool->set_active (false); straTool->set_active (false); + if (colPickerTool) { + colPickerTool->set_active(false); + } current = TMSpotWB; } @@ -246,7 +289,9 @@ void ToolBar::wb_pressed () handConn.block (false); cropConn.block (false); - + if (colPickerTool) { + cpConn.block (false); + } if (wbTool) { wbConn.block (false); } @@ -258,11 +303,92 @@ void ToolBar::wb_pressed () } } +void ToolBar::colPicker_pressed (GdkEventButton* event) +{ + + if (event->button == 1) { + handConn.block (true); + cropConn.block (true); + cpConn.block (true); + if (wbTool) { + wbConn.block (true); + } + + straConn.block (true); + + cropTool->set_active (false); + if (wbTool) { + wbTool->set_active (false); + } + straTool->set_active (false); + + if (current != TMColorPicker) { + // Disabling all other tools, enabling the Picker tool and entering the "visible pickers" mode + handTool->set_active (false); + showColorPickers(true); + current = TMColorPicker; + } else { + // Disabling the picker tool, enabling the Hand tool and keeping the "visible pickers" mode + handTool->set_active (true); + colPickerTool->set_active (false); + current = TMHand; + } + + handConn.block (false); + cropConn.block (false); + cpConn.block (false); + wbConn.block (false); + straConn.block (false); + + if (listener) { + listener->toolSelected (current); + } + } else if (event->button == 3) { + if (current == TMColorPicker) { + // Disabling the Picker tool and entering into the "invisible pickers" mode + cpConn.block (true); + handConn.block (true); + handTool->set_active (true); + colPickerTool->set_active (false); + current = TMHand; + showColorPickers(false); + cpConn.block (false); + handConn.block (false); + } else { + // The Picker tool is already disabled, entering into the "invisible pickers" mode + switchColorPickersVisibility(); + } + if (pickerListener) { + pickerListener->switchPickerVisibility (showColPickers); + } + } +} + +bool ToolBar::showColorPickers(bool showCP) +{ + if (showColPickers != showCP) { + // Inverting the state + colPickerTool->set_image(showCP ? *showcolpickersimg : *hidecolpickersimg); + showColPickers = showCP; + return true; + } + + return false; +} + +void ToolBar::switchColorPickersVisibility() +{ + // Inverting the state + showColPickers = !showColPickers; + colPickerTool->set_image(showColPickers ? *showcolpickersimg : *hidecolpickersimg); +} + void ToolBar::crop_pressed () { handConn.block (true); cropConn.block (true); + cpConn.block(true); if (wbTool) { wbConn.block (true); @@ -272,7 +398,9 @@ void ToolBar::crop_pressed () if (current != TMCropSelect) { handTool->set_active (false); - + if (colPickerTool) { + colPickerTool->set_active(false); + } if (wbTool) { wbTool->set_active (false); } @@ -284,6 +412,7 @@ void ToolBar::crop_pressed () cropTool->set_active (true); handConn.block (false); cropConn.block (false); + cpConn.block(false); wbConn.block (false); straConn.block (false); @@ -297,6 +426,9 @@ void ToolBar::stra_pressed () handConn.block (true); cropConn.block (true); + if (colPickerTool) { + cpConn.block (true); + } if (wbTool) { wbConn.block (true); @@ -306,7 +438,9 @@ void ToolBar::stra_pressed () if (current != TMStraighten) { handTool->set_active (false); - + if (colPickerTool) { + colPickerTool->set_active(false); + } if (wbTool) { wbTool->set_active (false); } @@ -318,6 +452,7 @@ void ToolBar::stra_pressed () straTool->set_active (true); handConn.block (false); cropConn.block (false); + cpConn.block (false); if (wbTool) { wbConn.block (false); @@ -371,12 +506,17 @@ bool ToolBar::handleShortcutKey (GdkEventKey* event) return false; } -void ToolBar::removeWbTool() +void ToolBar::setBatchMode() { if (wbTool) { wbConn.disconnect(); removeIfThere(this, wbTool, false); - wbTool = NULL; + wbTool = nullptr; + } + if (colPickerTool) { + cpConn.disconnect(); + removeIfThere(this, colPickerTool, false); + colPickerTool = nullptr; } } diff --git a/rtgui/toolbar.h b/rtgui/toolbar.h index e00520721..c5bc68696 100644 --- a/rtgui/toolbar.h +++ b/rtgui/toolbar.h @@ -22,6 +22,7 @@ #include #include "toolenum.h" #include "rtimage.h" +#include "lockablecolorpicker.h" class ToolBarListener { @@ -40,17 +41,31 @@ class ToolBar : public Gtk::HBox private: RTImage* handimg; RTImage* editinghandimg; + RTImage* showcolpickersimg; + RTImage* hidecolpickersimg; + bool showColPickers; + + void hand_pressed (); + void wb_pressed (); + void colPicker_pressed (GdkEventButton* event); + void crop_pressed (); + void stra_pressed (); + bool showColorPickers(bool showCP); + void switchColorPickersVisibility(); protected: Gtk::ToggleButton* handTool; Gtk::ToggleButton* wbTool; + Gtk::ToggleButton* colPickerTool; Gtk::ToggleButton* cropTool; Gtk::ToggleButton* straTool; ToolBarListener* listener; + LockablePickerToolListener* pickerListener; ToolMode current; bool editingMode; // true if the cursor is being used to remotely edit tool's values sigc::connection handConn; sigc::connection wbConn; + sigc::connection cpConn; sigc::connection cropConn; sigc::connection straConn; @@ -64,21 +79,25 @@ public: return current; } + bool showColorPickers() { + return showColPickers; + } + void setToolBarListener (ToolBarListener* tpl) { listener = tpl; } + void setLockablePickerToolListener (LockablePickerToolListener* lptl) + { + pickerListener = lptl; + } + void startEditMode(); void stopEditMode(); - void hand_pressed (); - void wb_pressed (); - void crop_pressed (); - void stra_pressed (); - bool handleShortcutKey (GdkEventKey* event); - void removeWbTool(); + void setBatchMode(); }; #endif diff --git a/rtgui/toolenum.h b/rtgui/toolenum.h index f06fda376..06212682a 100644 --- a/rtgui/toolenum.h +++ b/rtgui/toolenum.h @@ -19,6 +19,6 @@ #ifndef _TOOLENUM_ #define _TOOLENUM_ -enum ToolMode {TMHand = 0, TMSpotWB = 1, TMCropSelect = 2, TMStraighten = 3}; +enum ToolMode {TMHand = 0, TMSpotWB = 1, TMCropSelect = 2, TMStraighten = 3, TMColorPicker = 4}; #endif diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index 46285ce3e..14774df48 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -294,12 +294,6 @@ public: { return toolBar; } - void removeWbTool() - { - if (toolBar) { - toolBar->removeWbTool(); - } - } int getSpotWBRectSize (); CropGUIListener* startCropEditing (Thumbnail* thm = NULL) { diff --git a/tools/source_icons/scalable/colorPickers-hide.file b/tools/source_icons/scalable/colorPickers-hide.file new file mode 100644 index 000000000..728529716 --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-hide.file @@ -0,0 +1 @@ +colorPickers-hide.png,w22,actions diff --git a/tools/source_icons/scalable/colorPickers-hide.svg b/tools/source_icons/scalable/colorPickers-hide.svg new file mode 100644 index 000000000..fe0c7bf14 --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-hide.svg @@ -0,0 +1,4301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/colorPickers-show.file b/tools/source_icons/scalable/colorPickers-show.file new file mode 100644 index 000000000..96db803fc --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-show.file @@ -0,0 +1 @@ +colorPickers-show.png,w22,actions diff --git a/tools/source_icons/scalable/colorPickers-show.svg b/tools/source_icons/scalable/colorPickers-show.svg new file mode 100644 index 000000000..d03472020 --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-show.svg @@ -0,0 +1,4372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/gtk-color-picker-add.file b/tools/source_icons/scalable/gtk-color-picker-add.file new file mode 100644 index 000000000..f51e051bd --- /dev/null +++ b/tools/source_icons/scalable/gtk-color-picker-add.file @@ -0,0 +1 @@ +gtk-color-picker-add.png,w22,actions diff --git a/tools/source_icons/scalable/gtk-color-picker-add.svg b/tools/source_icons/scalable/gtk-color-picker-add.svg new file mode 100644 index 000000000..a12197ffe --- /dev/null +++ b/tools/source_icons/scalable/gtk-color-picker-add.svg @@ -0,0 +1,4839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From f9f593d343f2b9626a356c76ea2b135e3254ab29 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 2 Oct 2016 15:09:26 +0200 Subject: [PATCH 013/115] Cppcheck: Fix issues related to rtengine/FTblockDN.cc --- rtengine/FTblockDN.cc | 18 +++++++----------- rtengine/dcrop.cc | 8 ++++---- rtengine/improcfun.h | 2 +- rtengine/simpleprocess.cc | 8 ++++---- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index ba7ae693e..e0d22d639 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -108,7 +108,7 @@ void ImProcFunctions::Median_Denoise(float **src, float **dst, const int width, medBuffer[0] = src; // we need a buffer if src == dst or if (src != dst && iterations > 1) - if (src == dst || (src != dst && iterations > 1)) { + if (src == dst || iterations > 1) { if (buffer == nullptr) { // we didn't get a buufer => create one allocBuffer = new float*[height]; @@ -853,7 +853,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef const float noisevarab_b = SQR(realblue); //input L channel - array2D *Lin; + array2D *Lin = nullptr; //wavelet denoised image LabImage * labdn = new LabImage(width, height); @@ -1678,7 +1678,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef delete labdn; - if (denoiseLuminance) { + if (Lin) { delete Lin; } @@ -2250,7 +2250,6 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposit float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl); if (lvl == maxlvl - 1) { - float vari[4]; int edge = 0; ShrinkAllL(WaveletCoeffs_L, buffer, lvl, dir, noisevarlum, madL[lvl], nullptr, edge); } else { @@ -2613,7 +2612,7 @@ SSEFUNCTION void ImProcFunctions::ShrinkAllL(wavelet_decomposition &WaveletCoeff // printf("OK lev=%d\n",level); float mad_L = madL[dir - 1] ; - if (edge == 1) { + if (edge == 1 && vari) { noisevarlum = blurBuffer; // we need one buffer, but fortunately we don't have to allocate a new one because we can use blurBuffer for (int i = 0; i < W_L * H_L; ++i) { @@ -3044,7 +3043,7 @@ void ImProcFunctions::calcautodn_info (float &chaut, float &delta, int Nb, int l delta *= 0.15f; } else if (chaut < 650.f) { delta *= 0.1f; - } else if (chaut >= 650.f) { + } else /*if (chaut >= 650.f)*/ { delta *= 0.07f; } @@ -3082,7 +3081,7 @@ void ImProcFunctions::calcautodn_info (float &chaut, float &delta, int Nb, int l delta *= 0.3f; } else if (chaut < 650.f) { delta *= 0.2f; - } else if (chaut >= 650.f) { + } else /*if (chaut >= 650.f)*/ { delta *= 0.15f; } @@ -3107,7 +3106,7 @@ void ImProcFunctions::calcautodn_info (float &chaut, float &delta, int Nb, int l } -SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, const bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, float &nresi, float &highresi, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread) +SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, const bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread) { if ((settings->leveldnautsimpl == 1 && dnparams.Cmethod == "MAN") || (settings->leveldnautsimpl == 0 && dnparams.C2method == "MANU")) { //nothing to do @@ -3546,9 +3545,6 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat } comptlevel += 1; - float chresid, chmaxredresid, chmaxblueresid; - nresi = chresid; - highresi = chresid + 0.66f * (max(chmaxredresid, chmaxblueresid) - chresid); //evaluate sigma delete adecomp; delete bdecomp; delete labdn; diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 1e5aba77c..b2c2f03f1 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -321,7 +321,7 @@ void Crop::update (int todo) float maxr = 0.f; float maxb = 0.f; - float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; + float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; int Nb; chaut = 0.f; @@ -334,7 +334,7 @@ void Crop::update (int todo) LUTf gamcurve(65536, 0); float gam, gamthresh, gamslope; parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); - parent->ipf.RGB_denoise_info(origCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); + parent->ipf.RGB_denoise_info(origCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); // printf("redy=%f skin=%f pcskin=%f\n",redyel, skinc,nsknc); // printf("DCROP skip=%d cha=%4.0f Nb=%d red=%4.0f bl=%4.0f redM=%4.0f bluM=%4.0f L=%4.0f sigL=%4.0f Ch=%4.0f Si=%4.0f\n",skip, chaut,Nb, redaut,blueaut, maxredaut, maxblueaut, lumema, sigma_L, chromina, sigma); float multip = 1.f; @@ -453,9 +453,9 @@ void Crop::update (int todo) parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve float pondcorrec = 1.0f; - float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, nresi = 0.f, highresi = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; + float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; int nb = 0; - parent->ipf.RGB_denoise_info(origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + parent->ipf.RGB_denoise_info(origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); //printf("DCROP skip=%d cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f\n",skip, chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema); Nb[hcr * 3 + wcr] = nb; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 3523ee183..ce65bc2f8 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -321,7 +321,7 @@ public: void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = NULL); void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); - void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &nresi, float &highresi, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); + void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); void RGBtile_denoise (float * fLblox, int hblproc, float noisevar_Ldetail, float * nbrwt, float * blurbuffer ); //for DCT void RGBoutput_tile_row (float *bloxrow_L, float ** Ldetail, float ** tilemask_out, int height, int width, int top ); bool WaveletDenoiseAllL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 63a207beb..e12121d07 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -273,7 +273,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p float maxr = 0.f; float maxb = 0.f; float pondcorrec = 1.0f; - float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; + float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; int Nb; chaut = 0.f; redaut = 0.f; @@ -282,7 +282,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p maxblueaut = 0.f; chromina = 0.f; sigma = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); float multip = 1.f; float adjustr = 1.f; @@ -490,8 +490,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve int nb = 0; - float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, nresi = 0.f, highresi = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; + ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); Nb[hcr * 3 + wcr] = nb; ch_M[hcr * 3 + wcr] = chaut; max_r[hcr * 3 + wcr] = maxredaut; From 8de758f7b6338de2fa07a100f134427bc034351e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 2 Oct 2016 15:22:42 +0200 Subject: [PATCH 014/115] Removed rtengine/hlmultipliers.cc --- rtengine/hlmultipliers.cc | 441 ------------------------------------- rtengine/rawimagesource.cc | 2 - rtengine/rawimagesource.h | 2 - 3 files changed, 445 deletions(-) delete mode 100644 rtengine/hlmultipliers.cc diff --git a/rtengine/hlmultipliers.cc b/rtengine/hlmultipliers.cc deleted file mode 100644 index 35e1d3e87..000000000 --- a/rtengine/hlmultipliers.cc +++ /dev/null @@ -1,441 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include -#include -#include "rawimagesource.h" -#include "rawimagesource_i.h" -#include "jaggedarray.h" -#include "../rtgui/options.h" - -namespace rtengine -{ - -// computes highlight recovery multipliers. Needs a possibly downscaled image where -// the highlights are indicated by INT_MAX -void hlmultipliers (int** rec[3], int max_3[3], int dh, int dw) -{ - - // STEP I. recover color with two-color information - int phase = -1; - int k = 0; - - for (k = 0; k < 1000; k++) { - int changed = 0; - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) { - int co, c1, c2; - -// if (phase==2) -// phase++; -// if (phase>0)// && phase!=4) -// continue; - if (phase == -1 || phase == 0 || phase == 2) { - if (rec[0][i][j] == INT_MAX && rec[1][i][j] != INT_MAX && rec[1][i][j] >= 0 && rec[2][i][j] != INT_MAX && rec[2][i][j] >= 0) { - co = 0; - c1 = 1; - c2 = 2; - } else if (rec[1][i][j] == INT_MAX && rec[0][i][j] != INT_MAX && rec[0][i][j] >= 0 && rec[2][i][j] != INT_MAX && rec[2][i][j] >= 0) { - co = 1; - c1 = 0; - c2 = 2; - } else if (rec[2][i][j] == INT_MAX && rec[1][i][j] != INT_MAX && rec[1][i][j] >= 0 && rec[0][i][j] != INT_MAX && rec[0][i][j] >= 0) { - co = 2; - c1 = 1; - c2 = 0; - } else { - continue; - } - - double ratio[2] = {0.0, 0.0}; - int count = 0; - double rato = (double)rec[c1][i][j] / rec[c2][i][j]; - double arato = 0.0; - - if (phase == 2) { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] >= 0 && rec[c1][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - double ratt = (double)rec[c1][i + x][j + y] / rec[c2][i + x][j + y]; - - if (ratt > rato * 1.2 || ratt < rato / 1.2 || rec[co][i + x][j + y] < max_3[co] * 1 / 2) { - continue; - } - - ratio[0] += (double)rec[c1][i + x][j + y] / rec[co][i + x][j + y]; - ratio[1] += (double)rec[c2][i + x][j + y] / rec[co][i + x][j + y]; - count++; - } - } - } else if (phase == -1) { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] >= 0 && rec[c1][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - double ratt = (double)rec[c1][i + x][j + y] / rec[c2][i + x][j + y]; - - if (ratt > rato * 1.05 || ratt < rato / 1.05 || rec[co][i + x][j + y] < max_3[co] * 4 / 5) { - continue; - } - - arato += ratt; - ratio[0] += (double)rec[c1][i + x][j + y] / rec[co][i + x][j + y]; - ratio[1] += (double)rec[c2][i + x][j + y] / rec[co][i + x][j + y]; - - count++; - } - } - } else { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] >= 0 && rec[c1][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - double ratt = (double)rec[c1][i + x][j + y] / rec[c2][i + x][j + y]; - - if (ratt > rato * 1.1 || ratt < rato / 1.1 || rec[co][i + x][j + y] < max_3[co] * 3 / 4) { - continue; - } - - arato += ratt; - ratio[0] += (double)rec[c1][i + x][j + y] / rec[co][i + x][j + y]; - ratio[1] += (double)rec[c2][i + x][j + y] / rec[co][i + x][j + y]; - - count++; - } - } - } - - // compute new pixel values from the surrounding color ratios - if (count > 1) { //(phase==0 && count>1) || (phase==2 && count>1)) { - rec[co][i][j] = -(int)((rec[c1][i][j] / ratio[0] * count + rec[c2][i][j] / ratio[1] * count) / 2); - changed++; - } - } else if (phase == 1 || phase == 3) { - if (rec[0][i][j] == INT_MAX && rec[1][i][j] == INT_MAX && rec[2][i][j] != INT_MAX && rec[2][i][j] >= 0) { - co = 2; - c1 = 0; - c2 = 1; - } else if (rec[0][i][j] == INT_MAX && rec[2][i][j] == INT_MAX && rec[1][i][j] != INT_MAX && rec[1][i][j] >= 0) { - co = 1; - c1 = 0; - c2 = 2; - } else if (rec[1][i][j] == INT_MAX && rec[2][i][j] == INT_MAX && rec[0][i][j] != INT_MAX && rec[0][i][j] >= 0) { - co = 0; - c1 = 1; - c2 = 2; - } else { - continue; - } - - double ratio[2] = {0.0, 0.0}; - int count[2] = {0, 0}; - - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] > 0 && rec[c1][i + x][j + y] != INT_MAX) { - if ((phase == 1 && rec[c1][i + x][j + y] < max_3[c1] * 3 / 4) || (phase == 3 && rec[c1][i + x][j + y] < max_3[c1] * 1 / 2)) { - continue; - } - - ratio[0] += (double)rec[co][i + x][j + y] / rec[c1][i + x][j + y]; - count[0] ++; - } - - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - if ((phase == 1 && rec[c2][i + x][j + y] < max_3[c2] * 3 / 4) || (phase == 3 && rec[c2][i + x][j + y] < max_3[c2] * 1 / 2)) -// if (/*phase!=3 && */rec[c2][i+x][j+y] 2) || (phase == 3 && count[0] > 1)) { - rec[c1][i][j] = - (int) ((double)rec[co][i][j] / ratio[0] * count[0]); - changed++; - } - - if ((phase == 1 && count[1] > 2) || (phase == 3 && count[1] > 1)) { - rec[c2][i][j] = - (int) ((double)rec[co][i][j] / ratio[1] * count[1]); - changed++; - } - } else { - int val = 0; - int num = 0; - - for (int c = 0; c < 3; c++) - if (rec[c][i][j] != INT_MAX) { - val += rec[c][i][j]; - num++; - } - - if (num < 3 && num > 0) { - for (int c = 0; c < 3; c++) { - rec[c][i][j] = val / num; - } - } - } - } - - - bool change = false; - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) - for (int c = 0; c < 3; c++) { - if (rec[c][i][j] < 0) { - rec[c][i][j] = -rec[c][i][j]; - change = true; - } - } - - if (!change && phase < 4) { - phase++; - - if( options.rtSettings.verbose ) { - printf ("phc %d: %d\n", phase, k); - } - } else if (!change) { - break; - } - - if (k % 20 == 0 && options.rtSettings.verbose ) { - printf ("changed %d\n", changed); - } - } - - if( options.rtSettings.verbose ) { - printf ("Highlight recovery ends in %d iterations\n", k); - } - - int maxval = max(max_3[0], max_3[1], max_3[2]); - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - if (rec[0][i][j] == INT_MAX || rec[1][i][j] == INT_MAX || rec[2][i][j] == INT_MAX) { - rec[0][i][j] = maxval; - rec[1][i][j] = maxval; - rec[2][i][j] = maxval; - - } -} - -void RawImageSource::HLRecovery_ColorPropagation (float* red, float* green, float* blue, int i, int sx1, int width, int skip) -{ - - int blr = (i + HR_SCALE / 2) / HR_SCALE - 1; - - if (blr < 0 || blr >= H / HR_SCALE - 2) { - return; - } - - double mr1 = 1.0 - ((double)((i + HR_SCALE / 2) % HR_SCALE) / HR_SCALE + 0.5 / HR_SCALE); - int maxcol = W / HR_SCALE - 2; - - for (int j = sx1, jx = 0; jx < width; j += skip, jx++) { - if (needhr[i][j]) { - int blc = (j + HR_SCALE / 2) / HR_SCALE - 1; - - if (blc < 0 || blc >= maxcol) { - continue; - } - - double mc1 = 1.0 - ((double)((j + HR_SCALE / 2) % HR_SCALE) / HR_SCALE + 0.5 / HR_SCALE); - double mulr = mr1 * mc1 * hrmap[0][blr][blc] + mr1 * (1.0 - mc1) * hrmap[0][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[0][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[0][blr + 1][blc + 1]; - double mulg = mr1 * mc1 * hrmap[1][blr][blc] + mr1 * (1.0 - mc1) * hrmap[1][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[1][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[1][blr + 1][blc + 1]; - double mulb = mr1 * mc1 * hrmap[2][blr][blc] + mr1 * (1.0 - mc1) * hrmap[2][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[2][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[2][blr + 1][blc + 1]; - red[jx] = (red[jx] * mulr); - green[jx] = (green[jx] * mulg); - blue[jx] = (blue[jx] * mulb); - } else { - red[jx] = (red[jx]); - green[jx] = (green[jx]); - blue[jx] = (blue[jx]); - } - } -} - -void RawImageSource::updateHLRecoveryMap_ColorPropagation () -{ - - // detect maximal pixel values - float* red = new float[W]; - float* blue = new float[W]; - int maxr = 0, maxg = 0, maxb = 0; - - for (int i = 32; i < H - 32; i++) { - interpolate_row_rb (red, blue, green[i - 1], green[i], green[i + 1], i); - - for (int j = 32; j < W - 32; j++) { - if ((ri->ISRED(i, j) || ri->getSensorType() != ST_BAYER) && red[j] > maxr) { - maxr = red[j]; - } - - if ((ri->ISGREEN(i, j) || ri->getSensorType() != ST_BAYER) && green[i][j] > maxg) { - maxg = green[i][j]; - } - - if ((ri->ISBLUE(i, j) || ri->getSensorType() != ST_BAYER) && blue[j] > maxb) { - maxb = blue[j]; - } - } - } - - delete [] red; - delete [] blue; - - maxr = maxr * 19 / 20; - maxg = maxg * 19 / 20; - maxb = maxb * 19 / 20; - max_3[0] = maxr; - max_3[1] = maxg; - max_3[2] = maxb; - - // downscale image - int dw = W / HR_SCALE; - int dh = H / HR_SCALE; - Image16* ds = new Image16 (dw, dh); - - // overburnt areas - int** rec[3]; - - for (int i = 0; i < 3; i++) { - rec[i] = allocJaggedArray (dw, dh); - } - - float* reds[HR_SCALE]; - float* blues[HR_SCALE]; - - for (int i = 0; i < HR_SCALE; i++) { - reds[i] = new float[W]; - blues[i] = new float[W]; - } - - if (needhr) { - freeJaggedArray(needhr); - } - - needhr = allocJaggedArray (W, H); - - for (int i = 0; i < dh; i++) { - for (int j = 0; j < HR_SCALE; j++) { - interpolate_row_rb (reds[j], blues[j], green[HR_SCALE * i + j - 1], green[HR_SCALE * i + j], green[HR_SCALE * i + j + 1], HR_SCALE * i + j); - - for (int k = 0; k < W; k++) - if (reds[j][k] >= max_3[0] || green[HR_SCALE * i + j][k] >= max_3[1] || blues[j][k] >= max_3[2]) { - needhr[HR_SCALE * i + j][k] = 1; - } else { - needhr[HR_SCALE * i + j][k] = 0; - } - } - - for (int j = 0; j < dw; j++) { - int sumr = 0; - int cr = 0; - int sumg = 0; - int cg = 0; - int sumb = 0; - int cb = 0; - - for (int x = 0; x < HR_SCALE; x++) - for (int y = 0; y < HR_SCALE; y++) { - int ix = HR_SCALE * i + x; - int jy = HR_SCALE * j + y; - sumr += reds[x][jy]; - - if (reds[x][jy] < maxr) { - cr++; - } - - sumg += green[ix][jy]; - - if (green[ix][jy] < maxg) { - cg++; - } - - sumb += blues[x][jy]; - - if (blues[x][jy] < maxb) { - cb++; - } - } - - if (cr < HR_SCALE * HR_SCALE) { - rec[0][i][j] = INT_MAX; - } else { - rec[0][i][j] = sumr / HR_SCALE / HR_SCALE; - } - - if (cg < HR_SCALE * HR_SCALE) { - rec[1][i][j] = INT_MAX; - } else { - rec[1][i][j] = sumg / HR_SCALE / HR_SCALE; - } - - if (cb < HR_SCALE * HR_SCALE) { - rec[2][i][j] = INT_MAX; - } else { - rec[2][i][j] = sumb / HR_SCALE / HR_SCALE; - } - - ds->r(i, j) = sumr / HR_SCALE / HR_SCALE; - ds->g(i, j) = sumg / HR_SCALE / HR_SCALE; - ds->b(i, j) = sumb / HR_SCALE / HR_SCALE; - } - } - - for (int i = 0; i < HR_SCALE; i++) { - delete [] reds[i]; - delete [] blues[i]; - } - - hlmultipliers (rec, max_3, dh, dw); - - if (hrmap[0] != NULL) { - freeJaggedArray (hrmap[0]); - freeJaggedArray (hrmap[1]); - freeJaggedArray (hrmap[2]); - } - - hrmap[0] = allocJaggedArray (dw, dh); - hrmap[1] = allocJaggedArray (dw, dh); - hrmap[2] = allocJaggedArray (dw, dh); - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) { - hrmap[0][i][j] = ds->r(i, j) > 0 ? (double)rec[0][i][j] / ds->r(i, j) : 1.0; - hrmap[1][i][j] = ds->g(i, j) > 0 ? (double)rec[1][i][j] / ds->g(i, j) : 1.0; - hrmap[2][i][j] = ds->b(i, j) > 0 ? (double)rec[2][i][j] / ds->b(i, j) : 1.0; - } - - delete ds; - - freeJaggedArray (rec[0]); - freeJaggedArray (rec[1]); - freeJaggedArray (rec[2]); -} - -} - diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index d2bdf9763..dcf7c1207 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -4403,8 +4403,6 @@ void RawImageSource::hlRecovery (std::string method, float* red, float* green, f } else if (method == "CIELab blending") { HLRecovery_CIELab (red, green, blue, red, green, blue, width, 65535.0, imatrices.xyz_cam, imatrices.cam_xyz); } - /*else if (method=="Color") - HLRecovery_ColorPropagation (red, green, blue, i, sx1, width, skip);*/ else if (method == "Blend") { // derived from Dcraw HLRecovery_blend(red, green, blue, width, 65535.0, hlmax); } diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index e682f0e79..8f6552a74 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -101,8 +101,6 @@ protected: void transformRect (PreviewProps pp, int tran, int &sx1, int &sy1, int &width, int &height, int &fw); void transformPosition (int x, int y, int tran, int& tx, int& ty); - void updateHLRecoveryMap_ColorPropagation (); - void HLRecovery_ColorPropagation (float* red, float* green, float* blue, int i, int sx1, int width, int skip); unsigned FC(int row, int col) { return ri->FC(row, col); From aca00389d9c0f5d2edf4f000844e980d95c66bcc Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 2 Oct 2016 17:23:09 +0200 Subject: [PATCH 015/115] Solving most if not all bugs left Still some features to add, but this commit should make this tool fully usable. --- rtengine/color.cc | 147 +++++++++++++++++++++++ rtengine/color.h | 16 +++ rtgui/crophandler.cc | 8 +- rtgui/crophandler.h | 2 +- rtgui/cropwindow.cc | 57 ++++++--- rtgui/cropwindow.h | 3 +- rtgui/imagearea.cc | 1 + rtgui/lockablecolorpicker.cc | 111 ++++++++++------- rtgui/lockablecolorpicker.h | 27 +++-- rtgui/navigator.cc | 149 +---------------------- rtgui/navigator.h | 2 - rtgui/toolbar.cc | 227 ++++++++++++++++++++++------------- 12 files changed, 444 insertions(+), 306 deletions(-) diff --git a/rtengine/color.cc b/rtengine/color.cc index 58dc60320..a23a261b7 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -361,6 +361,153 @@ void Color::cleanup () } } +void Color::rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b, bool workingSpace) +{ + double xyz_rgb[3][3]; + const double ep = 216.0 / 24389.0; + const double ka = 24389.0 / 27.0; + + double var_R = r / 65535.0; + double var_G = g / 65535.0; + double var_B = b / 65535.0; + + Glib::ustring profileCalc; + profileCalc = "sRGB"; //default + + if (workingSpace) { + profileCalc = profileW; //display working + } + + else {// if you want display = output space + if (profile == "RT_sRGB" || profile == "RT_sRGB_gBT709" || profile == "RT_sRGB_g10") { + profileCalc = "sRGB"; + } + + if (profile == "ProPhoto" || profile == "RT_Large_gBT709" || profile == "RT_Large_g10" || profile == "RT_Large_gsRGB") { + profileCalc = "ProPhoto"; + } + + if (profile == "AdobeRGB1998" || profile == "RT_Medium_gsRGB") { + profileCalc = "Adobe RGB"; + } + + if (profile == "WideGamutRGB") { + profileCalc = "WideGamut"; + } + } + + if (workingSpace) {//display working + if (profileW == "sRGB") { //apply sRGB inverse gamma + + if ( var_R > 0.04045 ) { + var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_R = var_R / 12.92; + } + + if ( var_G > 0.04045 ) { + var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_G = var_G / 12.92; + } + + if ( var_B > 0.04045 ) { + var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_B = var_B / 12.92; + } + } else if (profileW == "ProPhoto") { // apply inverse gamma 1.8 + var_R = pow ( var_R, 1.8); + var_G = pow ( var_G, 1.8); + var_B = pow ( var_B, 1.8); + } else { // apply inverse gamma 2.2 + var_R = pow ( var_R, 2.2); + var_G = pow ( var_G, 2.2); + var_B = pow ( var_B, 2.2); + } + } else { //display outout profile + + if (profile == "RT_sRGB" || profile == "RT_Large_gsRGB" || profile == "RT_Medium_gsRGB") { //apply sRGB inverse gamma + if ( var_R > 0.04045 ) { + var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_R = var_R / 12.92; + } + + if ( var_G > 0.04045 ) { + var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_G = var_G / 12.92; + } + + if ( var_B > 0.04045 ) { + var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_B = var_B / 12.92; + } + } + + else if (profile == "RT_sRGB_gBT709" || profile == "RT_Large_gBT709") { // + if ( var_R > 0.0795 ) { + var_R = pow ( ( ( var_R + 0.0954 ) / 1.0954 ), 2.2); + } else { + var_R = var_R / 4.5; + } + + if ( var_G > 0.0795 ) { + var_G = pow ( ( ( var_G + 0.0954 ) / 1.0954 ), 2.2); + } else { + var_G = var_G / 4.5; + } + + if ( var_B > 0.0795 ) { + var_B = pow ( ( ( var_B + 0.0954 ) / 1.0954 ), 2.2); + } else { + var_B = var_B / 4.5; + } + + } else if (profile == "ProPhoto") { // apply inverse gamma 1.8 + + var_R = pow ( var_R, 1.8); + var_G = pow ( var_G, 1.8); + var_B = pow ( var_B, 1.8); + } else if (profile == "RT_sRGB_g10" || profile == "RT_Large_g10") { // apply inverse gamma 1.8 + + var_R = pow ( var_R, 1.); + var_G = pow ( var_G, 1.); + var_B = pow ( var_B, 1.); + } + + else {// apply inverse gamma 2.2 + var_R = pow ( var_R, 2.2); + var_G = pow ( var_G, 2.2); + var_B = pow ( var_B, 2.2); + } + } + + // TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileW); + + TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileCalc); + + for (int m = 0; m < 3; m++) + for (int n = 0; n < 3; n++) { + xyz_rgb[m][n] = wprof[m][n]; + } + + double varxx, varyy, varzz; + double var_X = ( xyz_rgb[0][0] * var_R + xyz_rgb[0][1] * var_G + xyz_rgb[0][2] * var_B ) / Color::D50x; + double var_Y = ( xyz_rgb[1][0] * var_R + xyz_rgb[1][1] * var_G + xyz_rgb[1][2] * var_B ) ; + double var_Z = ( xyz_rgb[2][0] * var_R + xyz_rgb[2][1] * var_G + xyz_rgb[2][2] * var_B ) / Color::D50z; + + varxx = var_X > ep ? cbrt(var_X) : ( ka * var_X + 16.0) / 116.0 ; + varyy = var_Y > ep ? cbrt(var_Y) : ( ka * var_Y + 16.0) / 116.0 ; + varzz = var_Z > ep ? cbrt(var_Z) : ( ka * var_Z + 16.0) / 116.0 ; + LAB_l = ( 116 * varyy ) - 16; + LAB_a = 500 * ( varxx - varyy ); + LAB_b = 200 * ( varyy - varzz ); + +} + void Color::rgb2hsl(float r, float g, float b, float &h, float &s, float &l) { diff --git a/rtengine/color.h b/rtengine/color.h index 350cd3b2a..508efeb31 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -175,6 +175,22 @@ public: } + /** + * @brief Convert red/green/blue to L*a*b + * @brief Convert red/green/blue to hue/saturation/luminance + * @param profile output profile name + * @param profileW working profile name + * @param r red channel [0 ; 65535] + * @param g green channel [0 ; 65535] + * @param b blue channel [0 ; 65535] + * @param L Lab L channel [0 ; 1] (return value) + * @param a Lab a channel [0 ; 1] (return value) + * @param b Lab b channel [0; 1] (return value) + * @param workingSpace true: compute the Lab value using the Working color space ; false: use the Output color space + */ + static void rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b, bool workingSpace); + + /** * @brief Convert red/green/blue to hue/saturation/luminance * @param r red channel [0 ; 65535] diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index d47ec91ff..522b34c41 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -475,12 +475,12 @@ bool CropHandler::getEnabled () return enabled; } -void CropHandler::colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::PickerSize size) +void CropHandler::colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::Size size) { int xSize = (int)size; int ySize = (int)size; - int pixbufW = cropPixbuf->get_width(); + int pixbufW = cropPixbuftrue->get_width(); rtengine::Coord topLeftPos(pickerPos.x - xSize/2, pickerPos.y - ySize/2); if (topLeftPos.x > pixbufW || topLeftPos.y > pixbufW || topLeftPos.x + xSize < 0 || topLeftPos.y + ySize < 0) { @@ -510,9 +510,9 @@ void CropHandler::colorPick (rtengine::Coord pickerPos, float &r, float &g, floa // Accumulating the data std::uint32_t r2=0, g2=0, b2=0; std::uint32_t count = 0; - const guint8* data = cropPixbuf->get_pixels(); + const guint8* data = cropPixbuftrue->get_pixels(); for (int j = topLeftPos.y ; j < topLeftPos.y + ySize ; ++j) { - const guint8* data2 = data + cropPixbuf->get_rowstride()*j; + const guint8* data2 = data + cropPixbuftrue->get_rowstride()*j; for (int i = topLeftPos.x ; i < topLeftPos.x + xSize ; ++i) { const guint8* data3 = data2 + i*3; rtengine::Coord currPos(i, j); diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index 2f7395216..150b256f4 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -113,7 +113,7 @@ public: void setEnabled (bool e); bool getEnabled (); - void colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::PickerSize size); + void colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::Size size); rtengine::DetailedCrop* getCrop() { diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 0a97b3158..f5d8ede4a 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -322,11 +322,19 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) state = SDragPicker; } else { // Add a new Color Picker - int x2, y2; - screenCoordToImage(x, y, x2, y2); - LockableColorPicker *newPicker = new LockableColorPicker(x2, y2, LockableColorPicker::PickerSize::S15, 0., 0., 0., this); + rtengine::Coord imgPos, cropPos; + screenCoordToImage(x, y, imgPos.x, imgPos.y); + LockableColorPicker *newPicker = new LockableColorPicker(imgPos.x, imgPos.y, LockableColorPicker::Size::S15, 0., 0., 0., this, &cropHandler.colorParams.output, &cropHandler.colorParams.working); colorPickers.push_back(newPicker); hoveredPicker = newPicker; + imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); + float r=0.f, g=0.f, b=0.f; + LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); + hoveredPicker->setValidity (validity); + if (validity == LockableColorPicker::Validity::INSIDE) { + cropHandler.colorPick(cropPos, r, g, b, hoveredPicker->getSize()); + hoveredPicker->setRGB (r, g, b); + } state = SDragPicker; press_x = x; press_y = y; @@ -854,9 +862,9 @@ void CropWindow::pointerMoved (int bstate, int x, int y) } imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); float r=0.f, g=0.f, b=0.f; - bool isValid = isHoveredPickerFullyInside (cropPos); - hoveredPicker->setValidity (isValid); - if (isValid) { + LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); + hoveredPicker->setValidity (validity); + if (validity == LockableColorPicker::Validity::INSIDE) { cropHandler.colorPick(cropPos, r, g, b, hoveredPicker->getSize()); } hoveredPicker->setPosition (imgPos, r, g, b); @@ -2032,23 +2040,41 @@ void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) iarea->redraw (); } -bool CropWindow::isHoveredPickerFullyInside (const rtengine::Coord &pos) +LockableColorPicker::Validity CropWindow::checkValidity (LockableColorPicker* picker, const rtengine::Coord &pos) { - return true; - if (!cropHandler.cropPixbuf) { - return false; + if (!cropHandler.cropPixbuftrue) { + return LockableColorPicker::Validity::OUTSIDE; } - rtengine::Coord cropPos; + rtengine::Coord cropTopLeft, cropBottomRight, cropSize; + int skip; + cropHandler.getWindow(cropTopLeft.x, cropTopLeft.y, cropSize.x, cropSize.y, skip); + cropBottomRight = cropTopLeft + cropSize; rtengine::Coord pickerPos, cropPickerPos; - hoveredPicker->getImagePosition(pickerPos); + picker->getImagePosition(pickerPos); rtengine::Coord minPos(0, 0); - rtengine::Coord maxPos(cropHandler.cropPixbuf->get_width(), cropHandler.cropPixbuf->get_height()); - rtengine::Coord halfPickerSize((int)hoveredPicker->getSize()/2, (int)hoveredPicker->getSize()/2); + rtengine::Coord maxPos(cropHandler.cropPixbuftrue->get_width(), cropHandler.cropPixbuftrue->get_height()); + rtengine::Coord halfPickerSize((int)picker->getSize()/2, (int)picker->getSize()/2); imageCoordToCropImage (pickerPos.x, pickerPos.y, cropPickerPos.x, cropPickerPos.y); + imageCoordToCropImage (cropTopLeft.x, cropTopLeft.y, minPos.x, minPos.y); + imageCoordToCropImage (cropBottomRight.x, cropBottomRight.y, maxPos.x, maxPos.y); rtengine::Coord pickerMinPos = cropPickerPos - halfPickerSize; rtengine::Coord pickerMaxPos = cropPickerPos + halfPickerSize; - return pickerMinPos >= minPos && pickerMaxPos <= maxPos; + if (pickerMaxPos.x < minPos.x || pickerMaxPos.y < minPos.y || pickerMinPos.x > maxPos.x || pickerMinPos.y > maxPos.y) { + return LockableColorPicker::Validity::OUTSIDE; + } else if (pickerMinPos >= minPos && pickerMaxPos < maxPos) { + return LockableColorPicker::Validity::INSIDE; + } else { + return LockableColorPicker::Validity::CROSSING; + } +} + +void CropWindow::deleteColorPickers () +{ + for (auto colorPicker : colorPickers) { + delete colorPicker; + } + colorPickers.clear(); } void CropWindow::screenCoordToCropBuffer (int phyx, int phyy, int& cropx, int& cropy) @@ -2360,6 +2386,7 @@ void CropWindow::cropImageUpdated () colorPicker->getImagePosition(imgPos); imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); float r=0.f, g=0.f, b=0.f; + colorPicker->setValidity (checkValidity (colorPicker, cropPos)); cropHandler.colorPick(cropPos, r, g, b, colorPicker->getSize()); colorPicker->setRGB (r, g, b); } diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index d58291776..74cc318c4 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -105,7 +105,7 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed void drawObservedFrame (Cairo::RefPtr cr, int rw = 0, int rh = 0); void changeZoom (int zoom, bool notify = true, int centerx = -1, int centery = -1); - bool isHoveredPickerFullyInside(const rtengine::Coord &pos); + LockableColorPicker::Validity checkValidity (LockableColorPicker* picker, const rtengine::Coord &pos); // Used by the mainCropWindow only void getObservedFrameArea (int& x, int& y, int& w, int& h, int rw = 0, int rh = 0); @@ -127,6 +127,7 @@ public: { observedCropWin = cw; } + void deleteColorPickers (); void screenCoordToCropBuffer (int phyx, int phyy, int& cropx, int& cropy); void screenCoordToImage (int phyx, int phyy, int& imgx, int& imgy); diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 8827d96e5..f21cd1b94 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -117,6 +117,7 @@ void ImageArea::setImProcCoordinator (rtengine::StagedImageProcessor* ipc_) cropWins.clear(); + mainCropWindow->deleteColorPickers (); mainCropWindow->setObservedCropWin (NULL); } diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index 22383c294..351787121 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -26,21 +26,24 @@ extern Options options; -LockableColorPicker::LockableColorPicker (CropWindow* cropWindow) -: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(PickerSize::S20), - isValid(false), r(0.f), g(0.f), b(0.f), h(0.f), s(0.f), v(0.f) -{ -} +LockableColorPicker::LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) +: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(Size::S20), + outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), + r(0.f), g(0.f), b(0.f), h(0.f), s(0.f), v(0.f), L(0.f), a(0.f), bb(0.f) +{} -LockableColorPicker::LockableColorPicker (int x, int y, PickerSize size, const float R, const float G, const float B, CropWindow* cropWindow) +LockableColorPicker::LockableColorPicker (int x, int y, Size size, const float R, const float G, const float B, CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) : cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(x, y), size(size), - isValid(false), r(R), g(G), b(B) + outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), + r(R), g(G), b(B), L(0.f), a(0.f), bb(0.f) { float h_, s_, v_; rtengine::Color::rgb2hsv((float)r*65535.f, (float)g*65535.f, (float)b*65535.f, h_, s_, v_); h = (int)(h_*255.f); s = (int)(s_*255.f); v = (int)(v_*255.f); + + rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? } void LockableColorPicker::updateBackBuffer () @@ -48,20 +51,17 @@ void LockableColorPicker::updateBackBuffer () int newW, newH; // -------------------- setting some key constants --------------------- - const float circlePadding = 3.f; + const float circlePadding = 3.f; // keep this value odd // --------------------------------------------------------------------- - if (isValid) { + if (validity == Validity::INSIDE) { Gtk::DrawingArea *iArea = cropWindow->getImageArea(); - Cairo::RefPtr bbcr = BackBuffer::getContext(); Glib::RefPtr pangoContext = iArea->get_pango_context (); Pango::FontDescription fontd(options.colorPickerFont); + fontd.set_weight(Pango::WEIGHT_NORMAL); pangoContext->set_font_description (fontd); - // for drawing text - bbcr->set_line_width (0.); - Glib::RefPtr layout[3][2]; switch (displayedValues) { @@ -97,10 +97,10 @@ void LockableColorPicker::updateBackBuffer () int maxHRow2 = rtengine::max(h20, h21); // -------------------- setting some key constants --------------------- - const int textPadding = 2; + const int textPadding = 3; const int textWidth = maxWCol0 + maxWCol1 + textPadding; const int textHeight = maxHRow0 + maxHRow1 + maxHRow2 + 2*textPadding; - const double opacity = 0.75; + const double opacity = 0.62; // --------------------------------------------------------------------- newW = rtengine::max((int)size + 2 * circlePadding, textWidth + 2 * textPadding); @@ -108,29 +108,44 @@ void LockableColorPicker::updateBackBuffer () setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, newW, newH, true); - float center = (float)size/2.f + circlePadding; + Cairo::RefPtr bbcr = BackBuffer::getContext(); + + // cleaning the back buffer + bbcr->set_source_rgba (0., 0., 0., 0.); + bbcr->set_operator (Cairo::OPERATOR_CLEAR); + bbcr->paint (); + bbcr->set_operator (Cairo::OPERATOR_OVER); + + // for drawing text + bbcr->set_antialias (Cairo::ANTIALIAS_SUBPIXEL); + bbcr->set_line_width (0.); + + float center = (float)size / 2.f + circlePadding; // black background of the whole color picker bbcr->set_line_width (0.); - bbcr->arc_negative (center, center, center, 0.f, (float)M_PI); - bbcr->line_to (0, 2.f * center + textHeight + 2*textPadding); - bbcr->line_to (textWidth + 2*textPadding, 2.f * center + textHeight + 2*textPadding); - bbcr->line_to (textWidth + 2*textPadding, 2.f * center); - bbcr->line_to (2.f * center, 2.f * center); - bbcr->close_path(); bbcr->set_source_rgba (0., 0., 0., opacity); + bbcr->arc_negative (center, center, center, 0., (double)M_PI); + bbcr->line_to (0, 2. * center + textHeight); + bbcr->arc_negative (2. * textPadding, 2. * center + textHeight, 2. * textPadding, (double)M_PI, (double)M_PI / 2.); + bbcr->line_to (textWidth, 2. * center + textHeight + 2. * textPadding); + bbcr->arc_negative (textWidth, 2. * center + textHeight, 2. * textPadding, (double)M_PI / 2., 0.); + bbcr->line_to (textWidth + 2. * textPadding, 2. * center + 2. * textPadding); + bbcr->arc_negative (textWidth, 2. * center + 2. * textPadding, 2. * textPadding, 0., (double)M_PI * 1.5); + bbcr->line_to (2. * center, 2. * center); + bbcr->close_path(); bbcr->set_line_join (Cairo::LINE_JOIN_BEVEL); bbcr->set_line_cap (Cairo::LINE_CAP_SQUARE); bbcr->fill (); // light grey circle around the color mark - bbcr->arc (center, center, center - circlePadding / 2.f - 0.5f, 0.f, 2.f * (float)M_PI); - bbcr->set_source_rgb (0.7, 0.7, 0.7); - bbcr->set_line_width (circlePadding-2.f); + bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)M_PI); + bbcr->set_source_rgb (0.75, 0.75, 0.75); + bbcr->set_line_width (circlePadding - 2.); bbcr->stroke (); // spot disc with picked color - bbcr->arc (center, center, center - circlePadding - 0.5f, 0.f, 2.f * (float)M_PI); + bbcr->arc (center, center, center - circlePadding, 0., 2. * (double)M_PI); bbcr->set_source_rgb (r, g, b); // <- set the picker color here bbcr->set_line_width (0.); bbcr->fill(); @@ -141,7 +156,7 @@ void LockableColorPicker::updateBackBuffer () bbcr->set_line_cap (Cairo::LINE_CAP_ROUND); bbcr->set_source_rgb (1., 1., 1.); double txtOffsetX = textPadding; - double txtOffsetY = (double)size + 2.f * circlePadding + textPadding; + double txtOffsetY = (double)size + 2. * circlePadding + textPadding; switch (iArea->get_direction()) { case Gtk::TEXT_DIR_RTL: bbcr->move_to (txtOffsetX , txtOffsetY); @@ -190,31 +205,37 @@ void LockableColorPicker::updateBackBuffer () anchorOffset.set (center, center); - } else { + setDirty (false); + } else if (validity == Validity::CROSSING) { newH = newW = (int)size + 2 * circlePadding; setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, newW, newH, true); Cairo::RefPtr bbcr = BackBuffer::getContext(); + bbcr->set_antialias(Cairo::ANTIALIAS_SUBPIXEL); - float center = (float)size/2.f + circlePadding; - bbcr->arc (center, center, center - circlePadding/2.f, 0.f, 2.f * (float)M_PI); + float center = (float)size / 2.f + circlePadding; + bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)M_PI); bbcr->set_source_rgb (0., 0., 0.); bbcr->set_line_width(circlePadding); bbcr->stroke_preserve(); bbcr->set_source_rgb (1., 1., 1.); - bbcr->set_line_width(circlePadding-2.f); + bbcr->set_line_width(circlePadding - 2.); bbcr->stroke (); anchorOffset.set (center, center); + setDirty (false); } - setDirty (false); } void LockableColorPicker::draw (Cairo::RefPtr &cr) { + if (validity == Validity::OUTSIDE) { + return; + } + if (isDirty()) { updateBackBuffer(); } @@ -240,7 +261,9 @@ void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const floa s = (float)s_; v = (float)v_; - if (isValid) { + rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? + + if (validity != Validity::OUTSIDE) { setDirty(true); } } @@ -261,7 +284,9 @@ void LockableColorPicker::setRGB (const float R, const float G, const float B) s = (float)s_; v = (float)v_; - if (isValid) { + rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? + + if (validity != Validity::OUTSIDE) { setDirty(true); } } @@ -293,15 +318,15 @@ bool LockableColorPicker::isOver (int x, int y) return mousePos >= tl && mousePos <= br; } -void LockableColorPicker::setValidity (bool isValid) +void LockableColorPicker::setValidity (Validity validity) { - if (this->isValid != isValid) { + if (this->validity != validity) { setDirty(true); } - this->isValid = isValid; + this->validity = validity; } -void LockableColorPicker::setSize (PickerSize newSize) +void LockableColorPicker::setSize (Size newSize) { if (size != newSize) { @@ -310,23 +335,23 @@ void LockableColorPicker::setSize (PickerSize newSize) } } -LockableColorPicker::PickerSize LockableColorPicker::getSize () +LockableColorPicker::Size LockableColorPicker::getSize () { return size; } void LockableColorPicker::incSize () { - if (size < PickerSize::S30) { - size = (PickerSize)((int)size + 5); + if (size < Size::S30) { + size = (Size)((int)size + 5); setDirty(true); } } void LockableColorPicker::decSize () { - if (size > PickerSize::S5) { - size = (PickerSize)((int)size - 5); + if (size > Size::S5) { + size = (Size)((int)size - 5); setDirty(true); } } diff --git a/rtgui/lockablecolorpicker.h b/rtgui/lockablecolorpicker.h index 2f79649fe..8be803081 100644 --- a/rtgui/lockablecolorpicker.h +++ b/rtgui/lockablecolorpicker.h @@ -38,7 +38,7 @@ public: class LockableColorPicker : BackBuffer { public: - enum class PickerSize { + enum class Size { S5=5, S10=10, S15=15, @@ -46,26 +46,35 @@ public: S25=25, S30=30 }; + enum class Validity { + INSIDE, + CROSSING, + OUTSIDE + }; private: enum class ColorPickerType { RGB, - HSV + HSV, + LAB }; CropWindow* cropWindow; // the color picker is displayed in a single cropWindow, the one that the user has clicked in ColorPickerType displayedValues; rtengine::Coord position; // Coordinate in image space rtengine::Coord anchorOffset; - PickerSize size; - bool isValid; + Size size; + Glib::ustring *outputProfile; + Glib::ustring *workingProfile; + Validity validity; float r, g, b; // red green blue in [0;1] range float h, s, v; // hue saturation value in [0;1] range + float L, a, bb; // L*a*b value in [0;1] range void updateBackBuffer (); public: - LockableColorPicker (CropWindow* cropWindow); - LockableColorPicker (int x, int y, PickerSize size, const float R, const float G, const float B, CropWindow* cropWindow); + LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile); + LockableColorPicker (int x, int y, Size size, const float R, const float G, const float B, CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile); void draw (Cairo::RefPtr &cr); @@ -74,10 +83,10 @@ public: void setRGB (const float R, const float G, const float B); void getImagePosition (rtengine::Coord &imgPos); void getScreenPosition (rtengine::Coord &screenPos); - PickerSize getSize (); + Size getSize (); bool isOver (int x, int y); - void setValidity (bool isValid); - void setSize (PickerSize newSize); + void setValidity (Validity isValid); + void setSize (Size newSize); void incSize (); void decSize (); }; diff --git a/rtgui/navigator.cc b/rtgui/navigator.cc index 049b4ec7e..0142df49f 100644 --- a/rtgui/navigator.cc +++ b/rtgui/navigator.cc @@ -266,7 +266,7 @@ void Navigator::pointerMoved (bool validPos, Glib::ustring profile, Glib::ustrin float LAB_a, LAB_b, LAB_l; //rgb2lab (r, g, b, LAB_l, LAB_a, LAB_b); - rgb2lab (profile, profileW, r, g, b, LAB_l, LAB_a, LAB_b); // TODO: Really sure this function works? + Color::rgb2lab (profile, profileW, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, LAB_l, LAB_a, LAB_b, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? LAB_A->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_a)); LAB_B->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_b)); LAB_L->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_l)); @@ -328,150 +328,3 @@ void Navigator::cycleUnitsHSV (GdkEventButton *event) { break; } } - -void Navigator::rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b) -{ - double xyz_rgb[3][3]; - const double ep = 216.0 / 24389.0; - const double ka = 24389.0 / 27.0; - - double var_R = r / 255.0; - double var_G = g / 255.0; - double var_B = b / 255.0; - - Glib::ustring profileCalc; - profileCalc = "sRGB"; //default - - if(options.rtSettings.HistogramWorking) { - profileCalc = profileW; //display working - } - - else {// if you want display = output space - if (profile == "RT_sRGB" || profile == "RT_sRGB_gBT709" || profile == "RT_sRGB_g10") { - profileCalc = "sRGB"; - } - - if (profile == "ProPhoto" || profile == "RT_Large_gBT709" || profile == "RT_Large_g10" || profile == "RT_Large_gsRGB") { - profileCalc = "ProPhoto"; - } - - if (profile == "AdobeRGB1998" || profile == "RT_Medium_gsRGB") { - profileCalc = "Adobe RGB"; - } - - if (profile == "WideGamutRGB") { - profileCalc = "WideGamut"; - } - } - - if(options.rtSettings.HistogramWorking) {//display working - if (profileW == "sRGB") { //apply sRGB inverse gamma - - if ( var_R > 0.04045 ) { - var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_R = var_R / 12.92; - } - - if ( var_G > 0.04045 ) { - var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_G = var_G / 12.92; - } - - if ( var_B > 0.04045 ) { - var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_B = var_B / 12.92; - } - } else if (profileW == "ProPhoto") { // apply inverse gamma 1.8 - var_R = pow ( var_R, 1.8); - var_G = pow ( var_G, 1.8); - var_B = pow ( var_B, 1.8); - } else { // apply inverse gamma 2.2 - var_R = pow ( var_R, 2.2); - var_G = pow ( var_G, 2.2); - var_B = pow ( var_B, 2.2); - } - } else { //display outout profile - - if (profile == "RT_sRGB" || profile == "RT_Large_gsRGB" || profile == "RT_Medium_gsRGB") { //apply sRGB inverse gamma - if ( var_R > 0.04045 ) { - var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_R = var_R / 12.92; - } - - if ( var_G > 0.04045 ) { - var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_G = var_G / 12.92; - } - - if ( var_B > 0.04045 ) { - var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_B = var_B / 12.92; - } - } - - else if (profile == "RT_sRGB_gBT709" || profile == "RT_Large_gBT709") { // - if ( var_R > 0.0795 ) { - var_R = pow ( ( ( var_R + 0.0954 ) / 1.0954 ), 2.2); - } else { - var_R = var_R / 4.5; - } - - if ( var_G > 0.0795 ) { - var_G = pow ( ( ( var_G + 0.0954 ) / 1.0954 ), 2.2); - } else { - var_G = var_G / 4.5; - } - - if ( var_B > 0.0795 ) { - var_B = pow ( ( ( var_B + 0.0954 ) / 1.0954 ), 2.2); - } else { - var_B = var_B / 4.5; - } - - } else if (profile == "ProPhoto") { // apply inverse gamma 1.8 - - var_R = pow ( var_R, 1.8); - var_G = pow ( var_G, 1.8); - var_B = pow ( var_B, 1.8); - } else if (profile == "RT_sRGB_g10" || profile == "RT_Large_g10") { // apply inverse gamma 1.8 - - var_R = pow ( var_R, 1.); - var_G = pow ( var_G, 1.); - var_B = pow ( var_B, 1.); - } - - else {// apply inverse gamma 2.2 - var_R = pow ( var_R, 2.2); - var_G = pow ( var_G, 2.2); - var_B = pow ( var_B, 2.2); - } - } - - // TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileW); - - TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileCalc); - - for (int m = 0; m < 3; m++) - for (int n = 0; n < 3; n++) { - xyz_rgb[m][n] = wprof[m][n]; - } - - double varxx, varyy, varzz; - double var_X = ( xyz_rgb[0][0] * var_R + xyz_rgb[0][1] * var_G + xyz_rgb[0][2] * var_B ) / Color::D50x; - double var_Y = ( xyz_rgb[1][0] * var_R + xyz_rgb[1][1] * var_G + xyz_rgb[1][2] * var_B ) ; - double var_Z = ( xyz_rgb[2][0] * var_R + xyz_rgb[2][1] * var_G + xyz_rgb[2][2] * var_B ) / Color::D50z; - - varxx = var_X > ep ? cbrt(var_X) : ( ka * var_X + 16.0) / 116.0 ; - varyy = var_Y > ep ? cbrt(var_Y) : ( ka * var_Y + 16.0) / 116.0 ; - varzz = var_Z > ep ? cbrt(var_Z) : ( ka * var_Z + 16.0) / 116.0 ; - LAB_l = ( 116 * varyy ) - 16; - LAB_a = 500 * ( varxx - varyy ); - LAB_b = 200 * ( varyy - varzz ); - -} diff --git a/rtgui/navigator.h b/rtgui/navigator.h index e0b79d8dd..d7b9d2bae 100644 --- a/rtgui/navigator.h +++ b/rtgui/navigator.h @@ -46,8 +46,6 @@ protected: Gtk::Label *lH, *lS, *lV; Gtk::Label *lLAB_A, *lLAB_B, *lLAB_L; - void rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b); - void setInvalid (int fullWidth = -1, int fullHeight = -1); public: diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index dd425a279..10137c673 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -109,17 +109,18 @@ ToolBar::~ToolBar () void ToolBar::setTool (ToolMode tool) { - handConn.block (true); - cropConn.block (true); + bool handWasBlocked = handConn.block (true); + bool cropWasBlocked = cropConn.block (true); + bool wbWasBlocked = true, cpWasBlocked = true; if (wbTool) { - wbConn.block (true); + wbWasBlocked = wbConn.block (true); } if (colPickerTool) { - cpConn.block (true); + cpWasBlocked = cpConn.block (true); } - straConn.block (true); + bool straWasBlocked = straConn.block (true); bool stopEdit = tool == TMHand && handTool->get_active() && editingMode; @@ -154,17 +155,17 @@ void ToolBar::setTool (ToolMode tool) current = tool; - handConn.block (false); - cropConn.block (false); + if (!handWasBlocked) handConn.block (false); + if (!cropWasBlocked) cropConn.block (false); if (wbTool) { - wbConn.block (false); + if (!wbWasBlocked) wbConn.block (false); } if (colPickerTool) { - cpConn.block (false); + if (!cpWasBlocked) cpConn.block (false); } - straConn.block (false); + if (!straWasBlocked) straConn.block (false); if (stopEdit) { stopEditMode(); @@ -178,7 +179,44 @@ void ToolBar::setTool (ToolMode tool) void ToolBar::startEditMode() { if (!editingMode) { - handTool->set_active(true); // will call hand_pressed, with editingMode=false + bool handWasBlocked = handConn.block (true); + bool cropWasBlocked = cropConn.block (true); + bool wbWasBlocked = true, cpWasBlocked = true; + if (colPickerTool) { + cpWasBlocked = cpConn.block (true); + } + + if (wbTool) { + wbWasBlocked = wbConn.block (true); + } + + bool straWasBlocked = straConn.block (true); + + if (current != TMHand) { + if (colPickerTool) { + colPickerTool->set_active(false); + } + if (wbTool) { + wbTool->set_active (false); + } + + cropTool->set_active (false); + straTool->set_active (false); + current = TMHand; + } + handTool->set_active (true); + + if (!handWasBlocked) handConn.block (false); + if (!cropWasBlocked) cropConn.block (false); + if (colPickerTool) { + if (!cpWasBlocked) cpConn.block (false); + } + if (wbTool) { + if (!wbWasBlocked) wbConn.block (false); + } + + if (!straWasBlocked) straConn.block (false); + editingMode = true; handTool->set_image(*editinghandimg); } @@ -195,13 +233,6 @@ void ToolBar::stopEditMode() { if (editingMode) { editingMode = false; - /* WARNING: Should we toggle the Hand button on? - * This method can be called while another tool is active, e.g. if the user toggle off - * the Subscriber's Edit button. For now, we keep that other tool active. If one want to - * switch to the Hand tool, uncommenting the following line should suffice (not tested). - * - * handTool->set_active(true); - */ handTool->set_image(*handimg); } } @@ -209,18 +240,25 @@ void ToolBar::stopEditMode() void ToolBar::hand_pressed () { - handConn.block (true); - cropConn.block (true); + bool handWasBlocked = handConn.block (true); + bool cropWasBlocked = cropConn.block (true); + bool wbWasBlocked = true, cpWasBlocked = true; if (colPickerTool) { - cpConn.block (true); + cpWasBlocked = cpConn.block (true); } if (wbTool) { - wbConn.block (true); + wbWasBlocked = wbConn.block (true); } - straConn.block (true); + bool straWasBlocked = straConn.block (true); + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } if (current != TMHand) { if (colPickerTool) { colPickerTool->set_active(false); @@ -232,27 +270,19 @@ void ToolBar::hand_pressed () cropTool->set_active (false); straTool->set_active (false); current = TMHand; - } else { - if (editingMode) { - stopEditMode(); - } - - if (listener) { - listener->editModeSwitchedOff (); - } } handTool->set_active (true); - handConn.block (false); - cropConn.block (false); + if (!handWasBlocked) handConn.block (false); + if (!cropWasBlocked) cropConn.block (false); if (colPickerTool) { - cpConn.block (false); + if (!cpWasBlocked) cpConn.block (false); } if (wbTool) { - wbConn.block (false); + if (!wbWasBlocked) wbConn.block (false); } - straConn.block (false); + if (!straWasBlocked) straConn.block (false); if (listener) { listener->toolSelected (TMHand); @@ -262,18 +292,25 @@ void ToolBar::hand_pressed () void ToolBar::wb_pressed () { - handConn.block (true); - cropConn.block (true); + bool handWasBlocked = handConn.block (true); + bool cropWasBlocked = cropConn.block (true); + bool wbWasBlocked = true, cpWasBlocked = true; if (colPickerTool) { - cpConn.block (true); + cpWasBlocked = cpConn.block (true); } if (wbTool) { - wbConn.block (true); + wbWasBlocked = wbConn.block (true); } - straConn.block (true); + bool straWasBlocked = straConn.block (true); if (current != TMSpotWB) { + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } handTool->set_active (false); cropTool->set_active (false); straTool->set_active (false); @@ -287,16 +324,16 @@ void ToolBar::wb_pressed () wbTool->set_active (true); } - handConn.block (false); - cropConn.block (false); + if (!handWasBlocked) handConn.block (false); + if (!cropWasBlocked) cropConn.block (false); if (colPickerTool) { - cpConn.block (false); + if (!cpWasBlocked) cpConn.block (false); } if (wbTool) { - wbConn.block (false); + if (!wbWasBlocked) wbConn.block (false); } - straConn.block (false); + if (!straWasBlocked) straConn.block (false); if (listener) { listener->toolSelected (TMSpotWB); @@ -307,14 +344,15 @@ void ToolBar::colPicker_pressed (GdkEventButton* event) { if (event->button == 1) { - handConn.block (true); - cropConn.block (true); - cpConn.block (true); + bool handWasBlocked = handConn.block (true); + bool cropWasBlocked = cropConn.block (true); + bool wbWasBlocked = true; + bool cpWasBlocked = cpConn.block (true); if (wbTool) { - wbConn.block (true); + wbWasBlocked = wbConn.block (true); } - straConn.block (true); + bool straWasBlocked = straConn.block (true); cropTool->set_active (false); if (wbTool) { @@ -324,21 +362,27 @@ void ToolBar::colPicker_pressed (GdkEventButton* event) if (current != TMColorPicker) { // Disabling all other tools, enabling the Picker tool and entering the "visible pickers" mode + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } handTool->set_active (false); showColorPickers(true); current = TMColorPicker; } else { // Disabling the picker tool, enabling the Hand tool and keeping the "visible pickers" mode handTool->set_active (true); - colPickerTool->set_active (false); + //colPickerTool->set_active (false); Done by the standard event handler current = TMHand; } - handConn.block (false); - cropConn.block (false); - cpConn.block (false); - wbConn.block (false); - straConn.block (false); + if (!handWasBlocked) handConn.block (false); + if (!cropWasBlocked) cropConn.block (false); + if (!cpWasBlocked) cpConn.block (false); + if (!wbWasBlocked) wbConn.block (false); + if (!straWasBlocked) straConn.block (false); if (listener) { listener->toolSelected (current); @@ -346,14 +390,14 @@ void ToolBar::colPicker_pressed (GdkEventButton* event) } else if (event->button == 3) { if (current == TMColorPicker) { // Disabling the Picker tool and entering into the "invisible pickers" mode - cpConn.block (true); - handConn.block (true); + bool cpWasBlocked = cpConn.block (true); + bool handWasBlocked = handConn.block (true); handTool->set_active (true); colPickerTool->set_active (false); current = TMHand; showColorPickers(false); - cpConn.block (false); - handConn.block (false); + if (!cpWasBlocked) cpConn.block (false); + if (!handWasBlocked) handConn.block (false); } else { // The Picker tool is already disabled, entering into the "invisible pickers" mode switchColorPickersVisibility(); @@ -386,17 +430,26 @@ void ToolBar::switchColorPickersVisibility() void ToolBar::crop_pressed () { - handConn.block (true); - cropConn.block (true); - cpConn.block(true); - - if (wbTool) { - wbConn.block (true); + bool handWasBlocked = handConn.block (true); + bool cropWasBlocked = cropConn.block (true); + bool wbWasBlocked = true, cpWasBlocked = true; + if (colPickerTool) { + cpConn.block(true); } - straConn.block (true); + if (wbTool) { + wbWasBlocked = wbConn.block (true); + } + + bool straWasBlocked = straConn.block (true); if (current != TMCropSelect) { + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } handTool->set_active (false); if (colPickerTool) { colPickerTool->set_active(false); @@ -410,11 +463,12 @@ void ToolBar::crop_pressed () } cropTool->set_active (true); - handConn.block (false); - cropConn.block (false); - cpConn.block(false); - wbConn.block (false); - straConn.block (false); + cropTool->grab_focus (); + if (!handWasBlocked) handConn.block (false); + if (!cropWasBlocked) cropConn.block (false); + if (!cpWasBlocked) cpConn.block(false); + if (!wbWasBlocked) wbConn.block (false); + if (!straWasBlocked) straConn.block (false); if (listener) { listener->toolSelected (TMCropSelect); @@ -424,19 +478,26 @@ void ToolBar::crop_pressed () void ToolBar::stra_pressed () { - handConn.block (true); - cropConn.block (true); + bool handWasBlocked = handConn.block (true); + bool cropWasBlocked = cropConn.block (true); + bool wbWasBlocked = true, cpWasBlocked = true; if (colPickerTool) { - cpConn.block (true); + cpWasBlocked = cpConn.block (true); } if (wbTool) { - wbConn.block (true); + wbWasBlocked = wbConn.block (true); } - straConn.block (true); + bool straWasBlocked = straConn.block (true); if (current != TMStraighten) { + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } handTool->set_active (false); if (colPickerTool) { colPickerTool->set_active(false); @@ -450,15 +511,15 @@ void ToolBar::stra_pressed () } straTool->set_active (true); - handConn.block (false); - cropConn.block (false); - cpConn.block (false); + if (!handWasBlocked) handConn.block (false); + if (!cropWasBlocked) cropConn.block (false); + if (!cpWasBlocked) cpConn.block (false); if (wbTool) { - wbConn.block (false); + if (!wbWasBlocked) wbConn.block (false); } - straConn.block (false); + if (!straWasBlocked) straConn.block (false); if (listener) { listener->toolSelected (TMStraighten); From ccd9002c3abc504e3a25b7bbf0489b90b4cf808e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 2 Oct 2016 23:33:00 +0200 Subject: [PATCH 016/115] Cppcheck: Solve issues related to copy constructor --- rtengine/EdgePreserveLab.cc | 264 ------------------------- rtengine/EdgePreserveLab.h | 77 -------- rtengine/EdgePreservingDecomposition.h | 2 + rtengine/LUT.h | 2 + rtengine/array2D.h | 2 + rtengine/cieimage.h | 2 + rtengine/cplx_wavelet_dec.h | 2 + rtengine/improcfun.cc | 4 +- rtengine/iplab2rgb.cc | 5 +- rtengine/ipwavelet.cc | 2 +- rtengine/rawimage.h | 3 + rtengine/shmap.h | 2 + rtexif/rtexif.h | 2 + rtgui/previewloader.cc | 2 + rtgui/previewloader.h | 2 + rtgui/profilestore.h | 2 + rtgui/thumbimageupdater.cc | 2 + rtgui/thumbimageupdater.h | 2 + 18 files changed, 33 insertions(+), 346 deletions(-) delete mode 100644 rtengine/EdgePreserveLab.cc delete mode 100644 rtengine/EdgePreserveLab.h diff --git a/rtengine/EdgePreserveLab.cc b/rtengine/EdgePreserveLab.cc deleted file mode 100644 index 1f063ec0c..000000000 --- a/rtengine/EdgePreserveLab.cc +++ /dev/null @@ -1,264 +0,0 @@ -#include "EdgePreserveLab.h" -#include "boxblur.h" -#include - -#ifdef _OPENMP -#include -#endif - -//#define MAX(a,b) ((a)<(b)?(b):(a)) -//#define MIN(a,b) ((a)>(b)?(b):(a)) - -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -EdgePreserveLab::EdgePreserveLab(unsigned int width, unsigned int height) -{ - w = width; - h = height; - n = w * h; - - //Initialize the matrix just once at construction. - A = new MultiDiagonalSymmetricMatrix(n, 5); - - if(!( - A->CreateDiagonal(0, 0) && - A->CreateDiagonal(1, 1) && - A->CreateDiagonal(2, w - 1) && - A->CreateDiagonal(3, w) && - A->CreateDiagonal(4, w + 1))) { - delete A; - A = NULL; - printf("Error in EdgePreserveLab construction: out of memory.\n"); - } else { - a0 = A->Diagonals[0]; - a_1 = A->Diagonals[1]; - a_w1 = A->Diagonals[2]; - a_w = A->Diagonals[3]; - a_w_1 = A->Diagonals[4]; - } -} - -EdgePreserveLab::~EdgePreserveLab() -{ - delete A; -} - -float *EdgePreserveLab::CreateBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, float *Blur, bool UseBlurForEdgeStop) -{ - if(Blur == NULL) - UseBlurForEdgeStop = false, //Use source if there's no supplied Blur. - Blur = new float[3 * n]; - - if(LScale == 0.0f) { - memcpy(Blur, Source, 3 * n * sizeof(float)); - return Blur; - } - - //Create the edge stopping function a, rotationally symmetric and just one instead of (ax, ay). Maybe don't need Blur yet, so use its memory. - float *a, *b, *g; - - if(UseBlurForEdgeStop) { - a = new float[n], g = Blur; - } else { - a = Blur, g = Source; - } - - //b = new float[n]; - - unsigned int x, y, i; - unsigned int w1 = w - 1, h1 = h - 1; - float eps = 0.0001f; - float scL = powf(100.0f, LScale); - float scab = powf(200.0f, abScale); - - float * var = new float[w * h]; - rtengine::boxvar(g, var, 1, 1, w, h); - -#ifdef _OPENMP - #pragma omp parallel for -#endif - - for(y = 0; y < h1; y++) { - float *rg = &g[w * y]; - - for(x = 0; x < w1; x++) { - //Estimate the central difference gradient in the center of a four pixel square. (gx, gy) is actually 2*gradient. - /*float gx = (fabs((rg[x + 1] - rg[x]) + (rg[x + w + 1] - rg[x + w]))); - float gy = (fabs((rg[x + w] - rg[x]) + (rg[x + w + 1] - rg[x + 1]))); - - //TODO: combine this with gx, gy if not needing separate quantities - float hx = (fabs((rg[x + 1 + n] - rg[x + n]) + (rg[x + w + 1 + n] - rg[x + w + n])) + \ - fabs((rg[x + 1 + 2*n] - rg[x + 2*n]) + (rg[x + w + 1 + 2*n] - rg[x + w + 2*n]))); - float hy = (fabs((rg[x + w + n] - rg[x + n]) + (rg[x + w + 1 + n] - rg[x + 1 + n])) + \ - fabs((rg[x + w + 2*n] - rg[x + 2*n]) + (rg[x + w + 1 + 2*n] - rg[x + 1 + 2*n]))); - */ - //float gradtot = (gx+gy+hx+hy); - //gradhisto[MAX(0,MIN(32767,(int)gradtot))] ++; - - //Apply power to the magnitude of the gradient to get the edge stopping function. - //a[x + w*y] = scL*expf(-100.0f*(gx + gy + hx + hy)/(EdgeStoppingLuma)); - //a[x + w*y] = scL*expf(-var[y*w+x]/SQR(0.02*EdgeStoppingLuma));///(0.1+rg[x]); - a[x + w * y] = scL * expf(-50.0f * sqrt(var[y * w + x]) / (EdgeStoppingLuma + eps)); ///(0.1+rg[x]); - - //b[x + w*y] = (scab)*expf(-20.0f*(gx + gy + Lave*(hx + hy))/(EdgeStoppingChroma)); - //b[x + w*y] = (scab)*expf(-400.0f*SQR(gx + gy + Lave*(hx + hy))/SQR(EdgeStoppingChroma));; - - } - } - - /* Now setup the linear problem. I use the Maxima CAS, here's code for making an FEM formulation for the smoothness term: - p(x, y) := (1 - x)*(1 - y); - P(m, n) := A[m][n]*p(x, y) + A[m + 1][n]*p(1 - x, y) + A[m + 1][n + 1]*p(1 - x, 1 - y) + A[m][n + 1]*p(x, 1 - y); - Integrate(f) := integrate(integrate(f, x, 0, 1), y, 0, 1); - - Integrate(diff(P(u, v), x)*diff(p(x, y), x) + diff(P(u, v), y)*diff(p(x, y), y)); - Integrate(diff(P(u - 1, v), x)*diff(p(1 - x, y), x) + diff(P(u - 1, v), y)*diff(p(1 - x, y), y)); - Integrate(diff(P(u - 1, v - 1), x)*diff(p(1 - x, 1 - y), x) + diff(P(u - 1, v - 1), y)*diff(p(1 - x, 1 - y), y)); - Integrate(diff(P(u, v - 1), x)*diff(p(x, 1 - y), x) + diff(P(u, v - 1), y)*diff(p(x, 1 - y), y)); - So yeah. Use the numeric results of that to fill the matrix A.*/ - memset(a_1, 0, A->DiagonalLength(1)*sizeof(float)); - memset(a_w1, 0, A->DiagonalLength(w - 1)*sizeof(float)); - memset(a_w, 0, A->DiagonalLength(w)*sizeof(float)); - memset(a_w_1, 0, A->DiagonalLength(w + 1)*sizeof(float)); - -//TODO: OMP here? - for(i = y = 0; y != h; y++) { - for(x = 0; x != w; x++, i++) { - float ac; - a0[i] = 1.0; - - //Remember, only fill the lower triangle. Memory for upper is never made. It's symmetric. Trust. - if(x > 0 && y > 0) - ac = a[i - w - 1] / 6.0f, - a_w_1[i - w - 1] -= 2.0f * ac, a_w[i - w] -= ac, - a_1[i - 1] -= ac, a0[i] += 4.0f * ac; - - if(x < w1 && y > 0) - ac = a[i - w] / 6.0f, - a_w[i - w] -= ac, a_w1[i - w + 1] -= 2.0f * ac, - a0[i] += 4.0f * ac; - - if(x > 0 && y < h1) - ac = a[i - 1] / 6.0f, - a_1[i - 1] -= ac, a0[i] += 4.0f * ac; - - if(x < w1 && y < h1) { - a0[i] += 4.0f * a[i] / 6.0f; - } - } - } - - if(UseBlurForEdgeStop) { - delete[] a; - } - - - //Solve & return. - A->CreateIncompleteCholeskyFactorization(1); //Fill-in of 1 seems to work really good. More doesn't really help and less hurts (slightly). - - if(!UseBlurForEdgeStop) { - memcpy(Blur, Source, 3 * n * sizeof(float)); - } - - // blur L channel - SparseConjugateGradient(A->PassThroughVectorProduct, Source, n, false, Blur, 0.0f, (void *)A, Iterates, A->PassThroughCholeskyBackSolve); - - //reset A for ab channels - /*memset(a_1, 0, A->DiagonalLength(1)*sizeof(float)); - memset(a_w1, 0, A->DiagonalLength(w - 1)*sizeof(float)); - memset(a_w, 0, A->DiagonalLength(w)*sizeof(float)); - memset(a_w_1, 0, A->DiagonalLength(w + 1)*sizeof(float)); - for(i = y = 0; y != h; y++){ - for(x = 0; x != w; x++, i++){ - float ac; - a0[i] = 1.0; - - //Remember, only fill the lower triangle. Memory for upper is never made. It's symmetric. Trust. - if(x > 0 && y > 0) - ac = b[i - w - 1]/6.0f, - a_w_1[i - w - 1] -= 2.0f*ac, a_w[i - w] -= ac, - a_1[i - 1] -= ac, a0[i] += 4.0f*ac; - - if(x < w1 && y > 0) - ac = b[i - w]/6.0f, - a_w[i - w] -= ac, a_w1[i - w + 1] -= 2.0f*ac, - a0[i] += 4.0f*ac; - - if(x > 0 && y < h1) - ac = b[i - 1]/6.0f, - a_1[i - 1] -= ac, a0[i] += 4.0f*ac; - - if(x < w1 && y < h1) - a0[i] += 4.0f*b[i]/6.0f; - } - }*/ - /*if(UseBlurForEdgeStop)*/ //delete[] b; - - // blur ab channels - //A->CreateIncompleteCholeskyFactorization(1); //Fill-in of 1 seems to work really good. More doesn't really help and less hurts (slightly). - //SparseConjugateGradient(A->PassThroughVectorProduct, Source+n, n, false, Blur+n, 0.0f, (void *)A, Iterates, A->PassThroughCholeskyBackSolve); - //SparseConjugateGradient(A->PassThroughVectorProduct, Source+2*n, n, false, Blur+2*n, 0.0f, (void *)A, Iterates, A->PassThroughCholeskyBackSolve); - - A->KillIncompleteCholeskyFactorization(); - return Blur; -} - -float *EdgePreserveLab::CreateIteratedBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, unsigned int Reweightings, float *Blur) -{ - //Simpler outcome? - if(Reweightings == 0) { - return CreateBlur(Source, LScale, abScale, EdgeStoppingLuma, EdgeStoppingChroma, Iterates, Blur); - } - - //Create a blur here, initialize. - if(Blur == NULL) { - Blur = new float[3 * n]; - } - - memcpy(Blur, Source, 3 * n * sizeof(float)); - - //Iteratively improve the blur. - Reweightings++; - - for(unsigned int i = 0; i != Reweightings; i++) { - CreateBlur(Source, LScale, abScale, EdgeStoppingLuma, EdgeStoppingChroma, Iterates, Blur, true); - } - - return Blur; -} - -float *EdgePreserveLab::CompressDynamicRange(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, float CompressionExponent, float DetailBoost, unsigned int Iterates, unsigned int Reweightings, float *Compressed) -{ - //We're working with luminance, which does better logarithmic. - unsigned int i; - //for(i = 0; i != n; i++) - // Source[i] = logf(Source[i] + 0.0001f); - - //Blur. Also setup memory for Compressed (we can just use u since each element of u is used in one calculation). - float *u = CreateIteratedBlur(Source, LScale, abScale, EdgeStoppingLuma, EdgeStoppingChroma, Iterates, Reweightings); - - if(Compressed == NULL) { - Compressed = u; - } - - //Apply compression, detail boost, unlogging. Compression is done on the logged data and detail boost on unlogged. - for(i = 0; i != n; i++) { - //float ce = expf(Source[i] + u[i]*(CompressionExponent - 1.0f)) - 0.0001f; - //float ue = expf(u[i]) - 0.0001f; - //Source[i] = expf(Source[i]) - 0.0001f; - //Compressed[i] = ce + DetailBoost*(Source[i] - ue); - Compressed[i] = u[i];//ue;//for testing, to display blur - } - - if(Compressed != u) { - delete[] u; - } - - return Compressed; -} - - - - diff --git a/rtengine/EdgePreserveLab.h b/rtengine/EdgePreserveLab.h deleted file mode 100644 index e365956c5..000000000 --- a/rtengine/EdgePreserveLab.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once -/* -The EdgePreserveLab files contain standard C++ (standard except the first line) code for creating and, to a -limited extent (create your own uses!), messing with multi scale edge preserving decompositions of a 32 bit single channel -image. As a byproduct it contains a lot of linear algebra which can be useful for optimization problems that -you want to solve in rectangles on rectangular grids. - -Anyway. Basically, this is an implementation of what's presented in the following papers: - Edge-Preserving Decompositions for Multi-Scale Tone and Detail Manipulation - An Iterative Solution Method for Linear Systems of Which the Coefficient Matrix is a Symetric M-Matrix - Color correction for tone mapping - Wikipedia, the free encyclopedia - -First one is most of what matters, next two are details, last everything else. I did a few things differently, especially: - Reformulated the minimization with finite elements instead of finite differences. This results in better conditioning, - slightly better accuracy (less artifacts), the possibility of a better picked edge stopping function, but more memory consumption. - - A single rotationally invariant edge stopping function is used instead of two non-invariant ones. - - Incomplete Cholseky factorization instead of Szeliski's LAHBF. Slower, but not subject to any patents. - - For tone mapping, original images are decomposed instead of their logarithms, and just one decomposition is made; - I find that this way works plenty good (theirs isn't better or worse... just different) and is simpler. - -Written by ben_pcc in Portland, Oregon, USA; code modified by Emil Martinec. - - // EdgePreserveLab.h and EdgePreserveLab.cpp are free software: - // you can redistribute it and/or modify it - // under the terms of the GNU General Public License as published by - // the Free Software Foundation, either version 3 of the License, or - // (at your option) any later version. - // - // This program is distributed in the hope that it will be useful, - // but WITHOUT ANY WARRANTY; without even the implied warranty of - // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - // GNU General Public License for more details. - // - // You should have received a copy of the GNU General Public License - // along with this program. If not, see . - -*/ - - - -#include -#include -#include -#include "EdgePreservingDecomposition.h" - -class EdgePreserveLab -{ -public: - EdgePreserveLab(unsigned int width, unsigned int height); - ~EdgePreserveLab(); - - //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. - //If UseBlurForEdgeStop is true, supplied not NULL Blur is used to calculate the edge stopping function instead of Source. - float *CreateBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, float *Blur = NULL, bool UseBlurForEdgeStop = false); - - //Iterates CreateBlur such that the smoothness term approaches a specific norm via iteratively reweighted least squares. In place not ok. - float *CreateIteratedBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, unsigned int Reweightings, float *Blur = NULL); - - /*Lowers global contrast while preserving or boosting local contrast. Can fill into Compressed. The smaller Compression - the more compression is applied, with Compression = 1 giving no effect and above 1 the opposite effect. You can totally - use Compression = 1 and play with DetailBoost for some really sweet unsharp masking. If working on luma/grey, consider giving it a logarithm. - In place calculation to save memory (Source == Compressed) is totally ok. Reweightings > 0 invokes CreateIteratedBlur instead of CreateBlur. */ - float *CompressDynamicRange(float *Source, float LScale = 1.0f, float abScale = 5.0f, float EdgeStoppingLuma = 1.0f, float EdgeStoppingChroma = 1.0f, - float CompressionExponent = 0.8f, float DetailBoost = 0.1f, unsigned int Iterates = 20, - unsigned int Reweightings = 0, float *Compressed = NULL); - -private: - MultiDiagonalSymmetricMatrix *A; //The equations are simple enough to not mandate a matrix class, but fast solution NEEDS a complicated preconditioner. - unsigned int w, h, n; - - //Convenient access to the data in A. - float *a0, *a_1, *a_w, *a_w_1, *a_w1; -}; diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index 558caa5db..a369bdf4d 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -60,6 +60,7 @@ class MultiDiagonalSymmetricMatrix { public: MultiDiagonalSymmetricMatrix(int Dimension, int NumberOfDiagonalsInLowerTriangle); + MultiDiagonalSymmetricMatrix(const MultiDiagonalSymmetricMatrix&) = delete; ~MultiDiagonalSymmetricMatrix(); /* Storage of matrix data, and a function to create memory for Diagonals[index]. @@ -118,6 +119,7 @@ class EdgePreservingDecomposition { public: EdgePreservingDecomposition(int width, int height); + EdgePreservingDecomposition(const EdgePreservingDecomposition&) = delete; ~EdgePreservingDecomposition(); //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. diff --git a/rtengine/LUT.h b/rtengine/LUT.h index 24f883766..c570fe671 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -167,6 +167,8 @@ public: reset(); } + LUT(const LUT&) = delete; + ~LUT() { if (owner) { diff --git a/rtengine/array2D.h b/rtengine/array2D.h index f9d92ac36..75d784cbc 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -167,6 +167,8 @@ public: } } + array2D(const array2D&) = delete; + // destructor ~array2D() { diff --git a/rtengine/cieimage.h b/rtengine/cieimage.h index a97622325..d8cf45cf8 100644 --- a/rtengine/cieimage.h +++ b/rtengine/cieimage.h @@ -41,6 +41,8 @@ public: float** h_p; CieImage (int w, int h); + CieImage (const CieImage&) = delete; + ~CieImage (); //Copies image data in Img into this instance. diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index 0ab01be57..c5267897c 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -58,6 +58,8 @@ public: template wavelet_decomposition(E * src, int width, int height, int maxlvl, int subsampling, int skipcrop = 1, int numThreads = 1, int Daub4Len = 6); + wavelet_decomposition(const wavelet_decomposition&) = delete; + ~wavelet_decomposition(); internal_type ** level_coeffs(int level) const diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b832951c3..1f41dd6b4 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -6375,7 +6375,7 @@ void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w Qpro = maxQ; } - EdgePreservingDecomposition epd = EdgePreservingDecomposition(Wid, Hei); + EdgePreservingDecomposition epd(Wid, Hei); #pragma omp parallel for @@ -6479,7 +6479,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip) float *a = lab->a[0]; float *b = lab->b[0]; unsigned int i, N = lab->W * lab->H; - EdgePreservingDecomposition epd = EdgePreservingDecomposition(lab->W, lab->H); + EdgePreservingDecomposition epd(lab->W, lab->H); //Due to the taking of logarithms, L must be nonnegative. Further, scale to 0 to 1 using nominal range of L, 0 to 15 bit. float minL = FLT_MAX; diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 4c2da72a4..9e81f4f90 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -338,13 +338,11 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int Image16* image = new Image16 (cw, ch); float p1, p2, p3, p4, p5, p6; //primaries - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; //gamma parameters double pwr; double ts; ga6 = 0.0; pwr = 1.0 / gampos; ts = slpos; - int mode = 0, imax = 0; int t50; int select_temp = 1; //5003K @@ -475,6 +473,9 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int slpos = eps; } + double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; //gamma parameters + int mode = 0, imax = 0; + Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 ga4 = g_a3 * ts; ga0 = gampos; diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index d5aa54890..fd682d1d5 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -1647,7 +1647,7 @@ void ImProcFunctions::EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterat float sca = params->epd.scale; float gamm = params->wavelet.gamma; float rew = params->epd.reweightingIterates; - EdgePreservingDecomposition epd2 = EdgePreservingDecomposition(W_L, H_L); + EdgePreservingDecomposition epd2(W_L, H_L); cp.TMmeth = 2; //default after testing if(cp.TMmeth == 1) { diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 86965a612..efb2dacc4 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -48,6 +48,9 @@ public: pm = new base_t [h * w ]; memset(pm, 0, h * w * base_t_size ); } + + PixelsMap(const PixelsMap&) = delete; + ~PixelsMap() { delete [] pm; diff --git a/rtengine/shmap.h b/rtengine/shmap.h index 97a394927..990193378 100644 --- a/rtengine/shmap.h +++ b/rtengine/shmap.h @@ -33,6 +33,8 @@ public: float max_f, min_f, avg; SHMap (int w, int h, bool multiThread); + SHMap(const SHMap&) = delete; + ~SHMap (); void update (Imagefloat* img, double radius, double lumi[3], bool hq, int skip); diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 7777331e9..fcccd1161 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -202,6 +202,8 @@ public: Tag (TagDirectory* parent, const TagAttrib* attr, unsigned char *data, TagType t); Tag (TagDirectory* parent, const TagAttrib* attr, int data, TagType t); // create a new tag from array (used Tag (TagDirectory* parent, const TagAttrib* attr, const char* data); // create a new tag from array (used + Tag(const Tag&) = delete; + ~Tag (); void initType (unsigned char *data, TagType type); void initInt (int data, TagType t, int count = 1); diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index 02082f7a7..e7c3d4fac 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -80,6 +80,8 @@ public: threadPool_ = new Glib::ThreadPool(threadCount, 0); } + Impl(const Impl&) = delete; + Glib::ThreadPool* threadPool_; MyMutex mutex_; JobSet jobs_; diff --git a/rtgui/previewloader.h b/rtgui/previewloader.h index 762776ae7..05669d399 100644 --- a/rtgui/previewloader.h +++ b/rtgui/previewloader.h @@ -45,6 +45,8 @@ class PreviewLoader { public: + PreviewLoader(const PreviewLoader&) = delete; + /** * @brief Singleton entry point. * diff --git a/rtgui/profilestore.h b/rtgui/profilestore.h index 2928a01ef..d7b85b5f5 100644 --- a/rtgui/profilestore.h +++ b/rtgui/profilestore.h @@ -176,6 +176,8 @@ private: public: ProfileStore(); + ProfileStore (const ProfileStore&) = delete; + ~ProfileStore(); bool init (); void parseProfiles (); diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index 29160236e..a247af5f8 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -78,6 +78,8 @@ public: threadPool_ = new Glib::ThreadPool(threadCount, 0); } + Impl(const Impl&) = delete; + Glib::ThreadPool* threadPool_; // Need to be a Glib::Threads::Mutex because used in a Glib::Threads::Cond object... diff --git a/rtgui/thumbimageupdater.h b/rtgui/thumbimageupdater.h index ea9cff6d7..8d1fc2cc5 100644 --- a/rtgui/thumbimageupdater.h +++ b/rtgui/thumbimageupdater.h @@ -46,6 +46,8 @@ class ThumbImageUpdater public: + ThumbImageUpdater(const ThumbImageUpdater&) = delete; + /** * @brief Singleton entry point. * From 3552fd4161a3de144914a4b6696eef4c98bd8ff8 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 3 Oct 2016 00:54:02 +0200 Subject: [PATCH 017/115] Cppcheck: Fix issues related to explicit constructors --- rtengine/StopWatch.h | 2 +- rtengine/alignedbuffer.h | 2 +- rtengine/colortemp.h | 2 +- rtengine/coord.h | 4 ++-- rtengine/dcp.h | 2 +- rtengine/iccstore.h | 4 ++-- rtengine/lcp.h | 2 +- rtengine/pipettebuffer.h | 2 +- rtengine/rawimage.h | 2 +- rtgui/batchqueue.h | 2 +- rtgui/batchqueuebuttonset.h | 2 +- rtgui/batchqueuepanel.h | 2 +- rtgui/batchtoolpanelcoord.h | 2 +- rtgui/coloredbar.h | 2 +- rtgui/curveeditorgroup.h | 2 +- rtgui/edit.h | 2 +- rtgui/editorpanel.h | 2 +- rtgui/editwindow.cc | 2 +- rtgui/editwindow.h | 2 +- rtgui/filecatalog.h | 2 +- rtgui/filethumbnailbuttonset.h | 2 +- rtgui/guiutils.h | 4 ++-- rtgui/histogrampanel.h | 2 +- rtgui/history.h | 2 +- rtgui/ilabel.h | 2 +- rtgui/imagearea.h | 2 +- rtgui/indclippedpanel.h | 2 +- rtgui/inspector.h | 2 +- rtgui/paramsedited.h | 2 +- rtgui/partialpastedlg.h | 2 +- rtgui/popuptogglebutton.h | 2 +- rtgui/preferences.h | 2 +- rtgui/previewmodepanel.h | 2 +- rtgui/profilepanel.h | 2 +- rtgui/profilestore.h | 2 +- rtgui/progressconnector.h | 2 +- rtgui/renamedlg.h | 4 ++-- rtgui/saveasdlg.h | 2 +- rtgui/splash.h | 2 +- rtgui/thumbbrowserentrybase.h | 2 +- rtgui/zoompanel.h | 2 +- 41 files changed, 45 insertions(+), 45 deletions(-) diff --git a/rtengine/StopWatch.h b/rtengine/StopWatch.h index 2b3ff1baf..ac4a4d16c 100644 --- a/rtengine/StopWatch.h +++ b/rtengine/StopWatch.h @@ -37,7 +37,7 @@ public: { stopped = false; } - StopWatch( const char* msg) + explicit StopWatch( const char* msg ) { message = msg; start(); diff --git a/rtengine/alignedbuffer.h b/rtengine/alignedbuffer.h index ac8471b7e..fbbf83523 100644 --- a/rtengine/alignedbuffer.h +++ b/rtengine/alignedbuffer.h @@ -143,7 +143,7 @@ private: size_t size; public: - AlignedBufferMP(size_t sizeP) + explicit AlignedBufferMP(size_t sizeP) { size = sizeP; } diff --git a/rtengine/colortemp.h b/rtengine/colortemp.h index a1a805092..cd3e422e9 100644 --- a/rtengine/colortemp.h +++ b/rtengine/colortemp.h @@ -53,7 +53,7 @@ private: public: ColorTemp () : temp(-1.), green(-1.), equal (1.), method("Custom") {} - ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {} + explicit ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {} ColorTemp (double t, double g, double e, const Glib::ustring &m); ColorTemp (double mulr, double mulg, double mulb, double e); diff --git a/rtengine/coord.h b/rtengine/coord.h index 2242cec1e..8b6c0cf6a 100644 --- a/rtengine/coord.h +++ b/rtengine/coord.h @@ -35,7 +35,7 @@ struct Coord Coord () = default; Coord (const int x, const int y); Coord (const Coord& other) = default; - Coord (const PolarCoord& other); + explicit Coord (const PolarCoord& other); Coord& operator= (const Coord& other) = default; Coord& operator= (const PolarCoord& other); @@ -66,7 +66,7 @@ struct PolarCoord PolarCoord () = default; PolarCoord (const double radius, const double angle); PolarCoord (const PolarCoord& other) = default; - PolarCoord (const Coord& other); + explicit PolarCoord (const Coord& other); PolarCoord& operator= (const PolarCoord& other) = default; PolarCoord& operator= (const Coord& other); diff --git a/rtengine/dcp.h b/rtengine/dcp.h index 11e368b80..ffc1e33ce 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -63,7 +63,7 @@ public: using Triple = std::array; using Matrix = std::array; - DCPProfile(const Glib::ustring& filename); + explicit DCPProfile(const Glib::ustring& filename); ~DCPProfile(); explicit operator bool() const; diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 8b6e6465c..05281f9df 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -43,8 +43,8 @@ public: ProfileContent (const ProfileContent& other); ProfileContent& operator= (const rtengine::ProfileContent& other); - ProfileContent (const Glib::ustring& fileName); - ProfileContent (cmsHPROFILE hProfile); + explicit ProfileContent (const Glib::ustring& fileName); + explicit ProfileContent (cmsHPROFILE hProfile); cmsHPROFILE toProfile () const; }; diff --git a/rtengine/lcp.h b/rtengine/lcp.h index fa60a6013..15d51d556 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -89,7 +89,7 @@ public: static const int MaxPersModelCount = 3000; LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC! - LCPProfile(Glib::ustring fname); + explicit LCPProfile(Glib::ustring fname); void calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames diff --git a/rtengine/pipettebuffer.h b/rtengine/pipettebuffer.h index e6db8eb68..139438e1d 100644 --- a/rtengine/pipettebuffer.h +++ b/rtengine/pipettebuffer.h @@ -50,7 +50,7 @@ protected: void flush(); public: - PipetteBuffer(::EditDataProvider *dataProvider); + explicit PipetteBuffer(::EditDataProvider *dataProvider); ~PipetteBuffer(); /** @brief Getter to know if the pipette buffer is correctly filled */ diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index efb2dacc4..26ddbfd1b 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -102,7 +102,7 @@ class RawImage: public DCraw { public: - RawImage( const Glib::ustring &name ); + explicit RawImage( const Glib::ustring &name ); ~RawImage(); int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = 0, double progressRange = 1.0); diff --git a/rtgui/batchqueue.h b/rtgui/batchqueue.h index 3bf3cb228..fad2b6a25 100644 --- a/rtgui/batchqueue.h +++ b/rtgui/batchqueue.h @@ -68,7 +68,7 @@ protected: void notifyListener (bool queueEmptied); public: - BatchQueue (FileCatalog* aFileCatalog); + explicit BatchQueue (FileCatalog* aFileCatalog); ~BatchQueue (); void addEntries (const std::vector& entries, bool head = false, bool save = true); diff --git a/rtgui/batchqueuebuttonset.h b/rtgui/batchqueuebuttonset.h index cb6ccda56..bef125bb6 100644 --- a/rtgui/batchqueuebuttonset.h +++ b/rtgui/batchqueuebuttonset.h @@ -33,7 +33,7 @@ public: static Cairo::RefPtr headIcon; static Cairo::RefPtr tailIcon; - BatchQueueButtonSet (BatchQueueEntry* myEntry); + explicit BatchQueueButtonSet (BatchQueueEntry* myEntry); }; #endif diff --git a/rtgui/batchqueuepanel.h b/rtgui/batchqueuepanel.h index 997514bef..675745b8a 100644 --- a/rtgui/batchqueuepanel.h +++ b/rtgui/batchqueuepanel.h @@ -55,7 +55,7 @@ class BatchQueuePanel : public Gtk::VBox, public: - BatchQueuePanel (FileCatalog* aFileCatalog); + explicit BatchQueuePanel (FileCatalog* aFileCatalog); void setParent (RTWindow* p) { diff --git a/rtgui/batchtoolpanelcoord.h b/rtgui/batchtoolpanelcoord.h index e064452b2..0c12aa311 100644 --- a/rtgui/batchtoolpanelcoord.h +++ b/rtgui/batchtoolpanelcoord.h @@ -48,7 +48,7 @@ protected: public: - BatchToolPanelCoordinator (FilePanel* parent); + explicit BatchToolPanelCoordinator (FilePanel* parent); // FileSelectionChangeListener interface void selectionChanged (const std::vector& selected); diff --git a/rtgui/coloredbar.h b/rtgui/coloredbar.h index 917085e3c..237cd8595 100644 --- a/rtgui/coloredbar.h +++ b/rtgui/coloredbar.h @@ -37,7 +37,7 @@ protected: std::vector bgGradient; public: - ColoredBar (eRTOrientation orient); + explicit ColoredBar (eRTOrientation orient); void expose(Glib::RefPtr destWindow); void expose(Cairo::RefPtr destSurface); diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index 09cbb8167..f4ca3e8ed 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -154,7 +154,7 @@ protected: * This variable will be updated with actions in the * dialogs. */ - CurveEditorSubGroup(Glib::ustring& curveDir); + explicit CurveEditorSubGroup(Glib::ustring& curveDir); Glib::ustring outputFile (); Glib::ustring inputFile (); diff --git a/rtgui/edit.h b/rtgui/edit.h index c49c45408..1ca3894b8 100644 --- a/rtgui/edit.h +++ b/rtgui/edit.h @@ -463,7 +463,7 @@ protected: } action; /// object mode only, ignored in Pipette mode public: - EditSubscriber (EditType editType); + explicit EditSubscriber (EditType editType); virtual ~EditSubscriber () {} void setEditProvider(EditDataProvider *provider); diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index e506e1583..09faca7d3 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -138,7 +138,7 @@ protected: public: - EditorPanel (FilePanel* filePanel = NULL); + explicit EditorPanel (FilePanel* filePanel = NULL); virtual ~EditorPanel (); void open (Thumbnail* tmb, rtengine::InitialImage* isrc); diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc index 605e915af..3115d9c1f 100644 --- a/rtgui/editwindow.cc +++ b/rtgui/editwindow.cc @@ -37,7 +37,7 @@ EditWindow* EditWindow::getInstance(RTWindow* p) { EditWindow editWnd; - EditWindowInstance(RTWindow* p) : editWnd(p) + explicit EditWindowInstance(RTWindow* p) : editWnd(p) { // Determine the other display and maximize the window on that const Glib::RefPtr< Gdk::Window >& wnd = p->get_window(); diff --git a/rtgui/editwindow.h b/rtgui/editwindow.h index fa47de489..9315b0eb9 100644 --- a/rtgui/editwindow.h +++ b/rtgui/editwindow.h @@ -42,7 +42,7 @@ public: // Should only be created once, auto-creates window on correct display static EditWindow* getInstance(RTWindow* p); - EditWindow (RTWindow* p); + explicit EditWindow (RTWindow* p); void addEditorPanel (EditorPanel* ep, const std::string &name); void remEditorPanel (EditorPanel* ep); diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index b7ea1802f..eb23e65a6 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -43,7 +43,7 @@ class DirEntry public: Glib::ustring fullName; - DirEntry (const Glib::ustring& n) : fullName (n) {} + explicit DirEntry (const Glib::ustring& n) : fullName (n) {} bool operator< (DirEntry& other) { diff --git a/rtgui/filethumbnailbuttonset.h b/rtgui/filethumbnailbuttonset.h index b152c3853..a83bacf7b 100644 --- a/rtgui/filethumbnailbuttonset.h +++ b/rtgui/filethumbnailbuttonset.h @@ -44,7 +44,7 @@ public: static Cairo::RefPtr colorLabelIcon_4; static Cairo::RefPtr colorLabelIcon_5; - FileThumbnailButtonSet (FileBrowserEntry* myEntry); + explicit FileThumbnailButtonSet (FileBrowserEntry* myEntry); void setRank (int stars); void setColorLabel (int colorlabel); void setInTrash (bool inTrash); diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index f91bb0245..3e5f0dd0a 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -79,7 +79,7 @@ public: class ConnectionBlocker { public: - ConnectionBlocker (sigc::connection& connection) : connection (connection) + explicit ConnectionBlocker (sigc::connection& connection) : connection (connection) { wasBlocked = connection.block(); } @@ -101,7 +101,7 @@ private: Gtk::Container *pC; public: - ExpanderBox( Gtk::Container *p); + explicit ExpanderBox( Gtk::Container *p); ~ExpanderBox( ) { delete pC; diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 16a0747e3..60cb1a444 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -144,7 +144,7 @@ protected: public: - HistogramArea(FullModeListener *fml = NULL); + explicit HistogramArea(FullModeListener *fml = NULL); ~HistogramArea(); void renderHistogram (); diff --git a/rtgui/history.h b/rtgui/history.h index 760444b5f..23a7c30ae 100644 --- a/rtgui/history.h +++ b/rtgui/history.h @@ -95,7 +95,7 @@ protected: public: - History (bool bookmarkSupport = true); + explicit History (bool bookmarkSupport = true); void setProfileChangeListener (ProfileChangeListener* tpc_) { diff --git a/rtgui/ilabel.h b/rtgui/ilabel.h index aef5eb2ed..ab8f656cc 100644 --- a/rtgui/ilabel.h +++ b/rtgui/ilabel.h @@ -27,7 +27,7 @@ class ILabel : public Gtk::DrawingArea Glib::ustring label; public: - ILabel (Glib::ustring lab); + explicit ILabel (Glib::ustring lab); bool on_expose_event(GdkEventExpose* event); void on_realize(); void on_style_changed (const Glib::RefPtr& style); diff --git a/rtgui/imagearea.h b/rtgui/imagearea.h index bd2c19093..707729a6a 100644 --- a/rtgui/imagearea.h +++ b/rtgui/imagearea.h @@ -70,7 +70,7 @@ public: PreviewModePanel* previewModePanel; ImageArea* iLinkedImageArea; // used to set a reference to the Before image area, which is set when before/after view is enabled - ImageArea (ImageAreaPanel* p); + explicit ImageArea (ImageAreaPanel* p); ~ImageArea (); void setImProcCoordinator (rtengine::StagedImageProcessor* ipc_); diff --git a/rtgui/indclippedpanel.h b/rtgui/indclippedpanel.h index 199a9f620..3a6bc5296 100644 --- a/rtgui/indclippedpanel.h +++ b/rtgui/indclippedpanel.h @@ -30,7 +30,7 @@ protected: ImageArea* imageArea; public: - IndicateClippedPanel (ImageArea* ia); + explicit IndicateClippedPanel (ImageArea* ia); void buttonToggled (); diff --git a/rtgui/inspector.h b/rtgui/inspector.h index ce2da9aeb..4d275abd5 100644 --- a/rtgui/inspector.h +++ b/rtgui/inspector.h @@ -34,7 +34,7 @@ public: int currTransform; // coarse rotation from RT, not from shot orientation bool fromRaw; - InspectorBuffer(const Glib::ustring &imgagePath); + explicit InspectorBuffer(const Glib::ustring &imgagePath); //~InspectorBuffer(); }; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index f8d18ae57..503d6ee29 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -783,7 +783,7 @@ public: bool exif; bool iptc; - ParamsEdited (bool value = false); + explicit ParamsEdited (bool value = false); void set (bool v); void initFrom (const std::vector& src); diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index 7376e1481..57d77f532 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -132,7 +132,7 @@ public: sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; public: - PartialPasteDlg (Glib::ustring title); + explicit PartialPasteDlg (Glib::ustring title); void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL); diff --git a/rtgui/popuptogglebutton.h b/rtgui/popuptogglebutton.h index 930fae4f2..58a7ff82a 100644 --- a/rtgui/popuptogglebutton.h +++ b/rtgui/popuptogglebutton.h @@ -28,7 +28,7 @@ class PopUpToggleButton : public Gtk::ToggleButton, public PopUpCommon { public: - PopUpToggleButton (const Glib::ustring& label = ""); + explicit PopUpToggleButton (const Glib::ustring& label = ""); void show (); void set_tooltip_text (const Glib::ustring &text); }; diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 1cfb435cf..c9c5ca08c 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -229,7 +229,7 @@ protected: Gtk::Widget* getSoundPanel (); public: - Preferences (RTWindow *rtwindow); + explicit Preferences (RTWindow *rtwindow); ~Preferences (); void savePressed (); diff --git a/rtgui/previewmodepanel.h b/rtgui/previewmodepanel.h index 10906c30f..d3bf3c8e4 100644 --- a/rtgui/previewmodepanel.h +++ b/rtgui/previewmodepanel.h @@ -47,7 +47,7 @@ protected: Gtk::Image* iBC2, *igBC2; public: - PreviewModePanel (ImageArea* ia); + explicit PreviewModePanel (ImageArea* ia); ~PreviewModePanel(); void toggleR (); diff --git a/rtgui/profilepanel.h b/rtgui/profilepanel.h index 9bcc79196..f80438aac 100644 --- a/rtgui/profilepanel.h +++ b/rtgui/profilepanel.h @@ -69,7 +69,7 @@ protected: public: - ProfilePanel (bool readOnly = false); + explicit ProfilePanel (bool readOnly = false); virtual ~ProfilePanel (); void setProfileChangeListener (ProfileChangeListener* ppl) diff --git a/rtgui/profilestore.h b/rtgui/profilestore.h index d7b85b5f5..0304db330 100644 --- a/rtgui/profilestore.h +++ b/rtgui/profilestore.h @@ -108,7 +108,7 @@ public: * * @param entry Pointer to the ProfileStoreEntry object, be it a directory or a file */ - ProfileStoreLabel(const ProfileStoreEntry *entry); + explicit ProfileStoreLabel(const ProfileStoreEntry *entry); ProfileStoreLabel (const ProfileStoreLabel &other); }; diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index ffa4bee67..2e235fa82 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -32,7 +32,7 @@ class PLDBridge : public rtengine::ProgressListener rtengine::ProgressListener* pl; public: - PLDBridge ( rtengine::ProgressListener* pb) + explicit PLDBridge ( rtengine::ProgressListener* pb) : pl(pb) {} // ProgressListener interface diff --git a/rtgui/renamedlg.h b/rtgui/renamedlg.h index a5dec4efa..8de7fe013 100644 --- a/rtgui/renamedlg.h +++ b/rtgui/renamedlg.h @@ -55,7 +55,7 @@ protected: void fillTemplateList (); public: - RenameDialog (Gtk::Window* parent); + explicit RenameDialog (Gtk::Window* parent); void initName (const Glib::ustring& iname, const CacheImageData* cid); Glib::ustring getNewName (); @@ -79,7 +79,7 @@ protected: void refreshTemplateList (); public: - RenameTemplateEditor (Gtk::Window* parent); + explicit RenameTemplateEditor (Gtk::Window* parent); Glib::ustring getSelectedTemplate (); diff --git a/rtgui/saveasdlg.h b/rtgui/saveasdlg.h index 4727b574c..188d915fb 100644 --- a/rtgui/saveasdlg.h +++ b/rtgui/saveasdlg.h @@ -45,7 +45,7 @@ protected: void putToQueueClicked (); public: - SaveAsDialog (Glib::ustring initialDir); + explicit SaveAsDialog (Glib::ustring initialDir); Glib::ustring getFileName (); Glib::ustring getDirectory (); diff --git a/rtgui/splash.h b/rtgui/splash.h index 5e3d5e1b4..9fe6d8220 100644 --- a/rtgui/splash.h +++ b/rtgui/splash.h @@ -46,7 +46,7 @@ private: public: Splash (Gtk::Window& parent, int maxtime); - Splash (Gtk::Window& parent); + explicit Splash (Gtk::Window& parent); bool hasReleaseNotes() { diff --git a/rtgui/thumbbrowserentrybase.h b/rtgui/thumbbrowserentrybase.h index 1b7f0691a..59b2c022f 100644 --- a/rtgui/thumbbrowserentrybase.h +++ b/rtgui/thumbbrowserentrybase.h @@ -107,7 +107,7 @@ public: bool updatepriority; eWithFilename withFilename; - ThumbBrowserEntryBase (const Glib::ustring& fname); + explicit ThumbBrowserEntryBase (const Glib::ustring& fname); virtual ~ThumbBrowserEntryBase (); void setParent (ThumbBrowserBase* l) diff --git a/rtgui/zoompanel.h b/rtgui/zoompanel.h index aa4d9177f..bcfbc2b34 100644 --- a/rtgui/zoompanel.h +++ b/rtgui/zoompanel.h @@ -38,7 +38,7 @@ protected: public: - ZoomPanel (ImageArea* iarea); + explicit ZoomPanel (ImageArea* iarea); void zoomInClicked (); void zoomOutClicked (); From 3bef6cb8de11b1898b5587d75c8bd3829c560725 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 3 Oct 2016 01:56:22 +0200 Subject: [PATCH 018/115] Cppcheck: Fixed almost all performance hints --- rtengine/colortemp.cc | 2 +- rtengine/colortemp.h | 2 +- rtengine/ex2simple.cc | 150 ------------------------------------- rtengine/klt/convolve.cc | 4 +- rtengine/rawimagesource.cc | 2 +- rtengine/rawimagesource.h | 4 +- 6 files changed, 7 insertions(+), 157 deletions(-) delete mode 100644 rtengine/ex2simple.cc diff --git a/rtengine/colortemp.cc b/rtengine/colortemp.cc index 8d3847e79..2612d3148 100644 --- a/rtengine/colortemp.cc +++ b/rtengine/colortemp.cc @@ -1025,7 +1025,7 @@ void ColorTemp::cieCAT02(double Xw, double Yw, double Zw, double &CAM02BB00, dou } -void ColorTemp::temp2mulxyz (double tem, double gree, std::string method , double &Xxyz, double &Zxyz) +void ColorTemp::temp2mulxyz (double tem, double gree, const std::string &method, double &Xxyz, double &Zxyz) { double xD, yD, x_D, y_D, interm; double x, y, z; diff --git a/rtengine/colortemp.h b/rtengine/colortemp.h index cd3e422e9..33a2b1b04 100644 --- a/rtengine/colortemp.h +++ b/rtengine/colortemp.h @@ -92,7 +92,7 @@ public: } void mul2temp (const double rmul, const double gmul, const double bmul, const double equal, double& temp, double& green) const; - static void temp2mulxyz (double tem, double gree, std::string method, double &Xxyz, double &Zxyz); + static void temp2mulxyz (double tem, double gree, const std::string &method, double &Xxyz, double &Zxyz); static void cieCAT02(double Xw, double Yw, double Zw, double &CAM02BB00, double &CAM02BB01, double &CAM02BB02, double &CAM02BB10, double &CAM02BB11, double &CAM02BB12, double &CAM02BB20, double &CAM02BB21, double &CAM02BB22, double adap ); //static void CAT02 (Imagefloat* baseImg, const ProcParams* params); diff --git a/rtengine/ex2simple.cc b/rtengine/ex2simple.cc deleted file mode 100644 index 1a83526e7..000000000 --- a/rtengine/ex2simple.cc +++ /dev/null @@ -1,150 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include "rtengine.h" -#include -//#include -#include - -class PListener : public rtengine::ProgressListener -{ - -public: - void setProgressStr (Glib::ustring str) - { - std::cout << str << std::endl; - } - void setProgress (double p) - { - std::cout << p << std::endl; - } -}; - -class MyPrevImgListener : public rtengine::PreviewImageListener -{ - - IImage8* i; - -public: - // this method is called when the staged image processor creates a new image to store the resulting preview image (this does not happen too often) - // usually you just have to store it - void setImage (IImage8* img, double scale, procparams::CropParams cp) - { - i = img; - } - // if the staged image processor wants to delete the image that stores the preview image, it calls this method. You have to destroy the image. - void delImage (IImage8* img) - { - if (img) { - // make sure we dont use this image in an other thread - IImage8* temp = i; - i->getMutex().lock (); - i = NULL; - temp->getMutex().unlock (); - // free it - img->free (); - } - } - // if the preview image changes, this method is called - void imageReady (procparams::CropParams cp) - { - // initiate a redraw in the background and return as fast as possible - } - // a possible redraw function: - //void redraw () { - // if (i) { - // i->lock (); - // int w = i->getWidth (); - // int h = i->getHeigt (); - // const char* data = i->getData (); - // ... draw it ... - // i->unlock (); - // } - // } -}; - -int main (int argc, char* argv[]) -{ - - if (argc < 4) { - std::cout << "Usage: rtcmd " << std::endl; - exit(1); - } - - Glib::thread_init (); - - // create and fill settings - rtengine::Settings* s = rtengine::Settings::create (); - s->demosaicMethod = "hphd"; - s->colorCorrectionSteps = 2; - s->iccDirectory = ""; - s->colorimetricIntent = 1; - s->monitorProfile = ""; - // init rtengine - rtengine::init (s); - // the settings can be modified later through the "s" pointer without calling any api function - - // Create a listener object. Any class is appropriate that inherits from rtengine::ProgressListener - PListener pl; - - // Load the image given in the first command line parameter - rtengine::InitialImage* ii; - int errorCode; - ii = rtengine::InitialImage::load (argv[1], true, errorCode, &pl); - - if (!ii) { - ii = rtengine::InitialImage::load (argv[1], false, errorCode, &pl); - } - - if (!ii) { - std::cout << "Input file not supported." << std::endl; - exit(2); - } - - /* Second scenario. Create a stagedimageprocessor with a preview scale of 1:5 and change few things */ - MyPrevImgListener myPrevImgListener; - - StagedImageProcessor* ipc = StagedImageProcessor::create (ii); - ipc->setProgressListener (&pl); - ipc->setPreviewImageListener (&myPrevImgListener); - ipc->setPreviewScale (5); // preview scale = 1:5 - // you can add a histogram listener, too, that is notified when the histogram changes - // ipc->setHistogramListener (...); - // you can add autoexplistener that is notified about the exposure settings when the auto exp algorithm finishes - // ipc->setAutoExpListener (curve); - // you can add sizelistener if you want to be notified when the size of the final image changes (due to rotation/resize/etc) - // ipc->setSizeListener (crop); - - // if you want to change the settings you have to ask for the procparams structure of the staged image processor - // you have to tell it what has changed. At the first time tell it EvPhotoLoaded so a full processing will be performed - rtengine::procparams::ProcParams* params = ipc->beginUpdateParams (); - // change this and that... - params->toneCurve.brightness = 1.0; - // you can load it, too, from a file: params->load (argv[2]); - // finally you have to call this non-blocking method, and the image processing starts in the background. When finished, the preview image listener will be notified - ipc->endUpdateParams (rtengine::EvPhotoLoaded); - // you can go on with changing of the settings, following the gui actions - // now we know that only the brightness has changed compared to the previous settings, to only a part of the processing has to be repeated - params = ipc->beginUpdateParams (); - params->toneCurve.brightness = 1.2; - ipc->endUpdateParams (rtengine::EvBrightness); - - // ... and so on. If you dont need it any more, you can destroy it (make sure that no processing is happening when you destroy it!) - StagedImageProcessor::destroy (ipc); -} - diff --git a/rtengine/klt/convolve.cc b/rtengine/klt/convolve.cc index b6041a7a6..7a2785cca 100644 --- a/rtengine/klt/convolve.cc +++ b/rtengine/klt/convolve.cc @@ -250,8 +250,8 @@ static void _convolveImageVert( static void _convolveSeparate( _KLT_FloatImage imgin, - ConvolutionKernel horiz_kernel, - ConvolutionKernel vert_kernel, + const ConvolutionKernel &horiz_kernel, + const ConvolutionKernel &vert_kernel, _KLT_FloatImage imgout) { /* Create temporary image */ diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index dcf7c1207..31deac244 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -4395,7 +4395,7 @@ void RawImageSource::HLRecovery_CIELab (float* rin, float* gin, float* bin, floa //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void RawImageSource::hlRecovery (std::string method, float* red, float* green, float* blue, int width, float* hlmax ) +void RawImageSource::hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax ) { if (method == "Luminance") { diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 8f6552a74..60887d9cd 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -97,7 +97,7 @@ protected: void hphd_horizontal (float** hpmap, int row_from, int row_to); void hphd_green (float** hpmap); void processFalseColorCorrectionThread (Imagefloat* im, array2D &rbconv_Y, array2D &rbconv_I, array2D &rbconv_Q, array2D &rbout_I, array2D &rbout_Q, const int row_from, const int row_to); - void hlRecovery (std::string method, float* red, float* green, float* blue, int width, float* hlmax); + void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax); void transformRect (PreviewProps pp, int tran, int &sx1, int &sy1, int &width, int &height, int &fw); void transformPosition (int x, int y, int tran, int& tx, int& ty); @@ -186,7 +186,7 @@ public: void convertColorSpace(Imagefloat* image, const ColorManagementParams &cmp, const ColorTemp &wb); static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in); - static void colorSpaceConversion (Imagefloat* im, ColorManagementParams cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], std::string camName) + static void colorSpaceConversion (Imagefloat* im, ColorManagementParams cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName) { colorSpaceConversion_ (im, cmp, wb, pre_mul, embedded, camprofile, cam, camName); } From 95027d2884d3613a023ce92f9a54addbb3934b5e Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 3 Oct 2016 17:56:31 +0200 Subject: [PATCH 019/115] Cppcheck: Fix most issues in rtengine/ipwavelet.cc --- rtengine/ipwavelet.cc | 137 ++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 92 deletions(-) diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index fd682d1d5..048f1b5d6 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -102,7 +102,6 @@ struct cont_params { int backm; float eddet; float eddetthr; - bool lips; float eddetthrHi; bool link; bool lip3; @@ -217,19 +216,12 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int cp.tmstrength = params->wavelet.tmrs; //cp.tonemap = params->wavelet.tmr; - cp.contena = true; cp.contena = params->wavelet.expcontrast; - cp.chromena = true; cp.chromena = params->wavelet.expchroma; - cp.edgeena = true; cp.edgeena = params->wavelet.expedge; - cp.resena = true; cp.resena = params->wavelet.expresid; - cp.finena = true; cp.finena = params->wavelet.expfinal; - cp.toningena = true; cp.toningena = params->wavelet.exptoning; - cp.noiseena = true; cp.noiseena = params->wavelet.expnoise; if(params->wavelet.Backmethod == "black") { @@ -490,7 +482,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int cp.lev3s = static_cast(params->wavelet.level3noise.value[0]); cp.lev3n = static_cast(params->wavelet.level3noise.value[1]); - cp.detectedge = false; cp.detectedge = params->wavelet.medianlev; //printf("low=%f mean=%f sd=%f max=%f\n",cp.edg_low,cp.edg_mean,cp.edg_sd,cp.edg_max); int minwin = min(imwidth, imheight); @@ -603,6 +594,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int //printf("levwav = %d\n",levwav); +#ifdef _OPENMP int numthreads = 1; int maxnumberofthreadsforwavelet = 0; @@ -640,7 +632,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int //printf("maxthre=%d\n",maxnumberofthreadsforwavelet); -#ifdef _OPENMP // Calculate number of tiles. If less than omp_get_max_threads(), then limit num_threads to number of tiles if( options.rgbDenoiseThreadLimit > 0) { @@ -674,10 +665,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int printf("Ip Wavelet uses %d main thread(s) and up to %d nested thread(s) for each main thread\n", numthreads, wavNestedLevels); } - -#endif - -#ifdef _OPENMP #pragma omp parallel num_threads(numthreads) #endif { @@ -880,7 +867,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int if(!Ldecomp->memoryAllocationFailed) { float madL[8][3]; - bool memoryAllocationFailed = false; #ifdef _RT_NESTED_OPENMP #pragma omp parallel for schedule(dynamic) collapse(2) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -922,18 +908,16 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int vari[1] = 8.f * SQR((cp.lev1n / 125.0) * (1.0 + cp.lev1n / 25.0)); vari[2] = 8.f * SQR((cp.lev2n / 125.0) * (1.0 + cp.lev2n / 25.0)); vari[3] = 8.f * SQR((cp.lev3n / 125.0) * (1.0 + cp.lev3n / 25.0)); - int edge = 1; if((cp.lev0n > 0.1f || cp.lev1n > 0.1f || cp.lev2n > 0.1f || cp.lev3n > 0.1f) && cp.noiseena) { + int edge = 1; vari[0] = max(0.0001f, vari[0]); vari[1] = max(0.0001f, vari[1]); vari[2] = max(0.0001f, vari[2]); vari[3] = max(0.0001f, vari[3]); float* noisevarlum = NULL; // we need a dummy to pass it to WaveletDenoiseAllL - if(!WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge)) { // - memoryAllocationFailed = true; - } + WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge); } ind = 1; @@ -987,7 +971,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int // printf("Levwava before: %d\n",levwava); if(cp.chrores == 0.f && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels - while(levwava > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwava - 1] == 0.f )) || (cp.CHmet != 2 && (levwava == 10 || (!cp.curv || (cp.curv && cp.mulC[levwava - 1] == 0.f)))))) && (!cp.opaRG || levwava == 10 || (cp.opaRG && cp.mulopaRG[levwava - 1] == 0.f)) && ((levwava == 10 || (cp.CHSLmet == 1 && cp.mulC[levwava - 1] == 0.f)))) { + while(levwava > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwava - 1] == 0.f )) || (cp.CHmet != 2 && (levwava == 10 || (!cp.curv || cp.mulC[levwava - 1] == 0.f))))) && (!cp.opaRG || levwava == 10 || (cp.opaRG && cp.mulopaRG[levwava - 1] == 0.f)) && ((levwava == 10 || (cp.CHSLmet == 1 && cp.mulC[levwava - 1] == 0.f)))) { levwava--; } } @@ -1008,7 +992,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int //printf("Levwavb before: %d\n",levwavb); if(cp.chrores == 0.f && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels - while(levwavb > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavb - 1] == 0.f )) || (cp.CHmet != 2 && (levwavb == 10 || (!cp.curv || (cp.curv && cp.mulC[levwavb - 1] == 0.f)))))) && (!cp.opaBY || levwavb == 10 || (cp.opaBY && cp.mulopaBY[levwavb - 1] == 0.f)) && ((levwavb == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavb - 1] == 0.f)))) { + while(levwavb > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavb - 1] == 0.f )) || (cp.CHmet != 2 && (levwavb == 10 || (!cp.curv || cp.mulC[levwavb - 1] == 0.f))))) && (!cp.opaBY || levwavb == 10 || (cp.opaBY && cp.mulopaBY[levwavb - 1] == 0.f)) && ((levwavb == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavb - 1] == 0.f)))) { levwavb--; } } @@ -1029,7 +1013,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int // printf("Levwavab before: %d\n",levwavab); if(cp.chrores == 0.f && !hhutili && params->wavelet.CLmethod == "all") { // no processing of residual ab => we probably can reduce the number of levels - while(levwavab > 0 && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavab - 1] == 0.f )) || (cp.CHmet != 2 && (levwavab == 10 || (!cp.curv || (cp.curv && cp.mulC[levwavab - 1] == 0.f)))))) && (!cp.opaRG || levwavab == 10 || (cp.opaRG && cp.mulopaRG[levwavab - 1] == 0.f)) && ((levwavab == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavab - 1] == 0.f)))) { + while(levwavab > 0 && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavab - 1] == 0.f )) || (cp.CHmet != 2 && (levwavab == 10 || (!cp.curv || cp.mulC[levwavab - 1] == 0.f))))) && (!cp.opaRG || levwavab == 10 || (cp.opaRG && cp.mulopaRG[levwavab - 1] == 0.f)) && ((levwavab == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavab - 1] == 0.f)))) { levwavab--; } } @@ -1405,14 +1389,11 @@ void ImProcFunctions::Evaluate2(wavelet_decomposition &WaveletCoeffs_L, void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont_params& cp, int W_L, int H_L, int skip_L, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float *madL) { - const float eps = 0.01f; - float ava[4], avb[4], avLP[4], avLN[4]; - float maxL[4], minL[4], maxa[4], maxb[4]; + float avLP[4], avLN[4]; + float maxL[4], minL[4]; float sigP[4], sigN[4]; - float AvL, AvN, SL, SN, maxLP, maxLN, MADL; - float madLlev[10]; - float thr = params->wavelet.thres; + float AvL, AvN, SL, SN, maxLP, maxLN; for (int dir = 1; dir < 4; dir++) { Aver(WavCoeffs_L[dir], W_L * H_L, avLP[dir], avLN[dir], maxL[dir], minL[dir]); @@ -1425,7 +1406,6 @@ void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont SN = 0.f; maxLP = 0.f; maxLN = 0.f; - MADL = 0.f; for (int dir = 1; dir < 4; dir++) { AvL += avLP[dir]; @@ -1434,7 +1414,6 @@ void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont SN += sigN[dir]; maxLP += maxL[dir]; maxLN += minL[dir]; - MADL += madL[dir]; } AvL /= 3; @@ -1443,13 +1422,6 @@ void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont SN /= 3; maxLP /= 3; maxLN /= 3; - MADL /= 3; - - if(level < 4) { - MADL = sqrt(MADL); - } else { - MADL = 0.f; - } mean[level] = AvL; meanN[level] = AvN; @@ -1800,25 +1772,22 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float maxkoeLi[12]; float *koeLibuffer = NULL; - bool lipschitz = true; - if(lipschitz == true) { - for(int y = 0; y < 12; y++) { - maxkoeLi[y] = 0.f; //9 - } - - koeLibuffer = new float[12 * H_L * W_L]; //12 - - for (int i = 0; i < 12; i++) { //9 - koeLi[i] = &koeLibuffer[i * W_L * H_L]; - } - - for(int j = 0; j < 12; j++) //9 - for (int i = 0; i < W_L * H_L; i++) { - koeLi[j][i] = 0.f; - } + for(int y = 0; y < 12; y++) { + maxkoeLi[y] = 0.f; //9 } + koeLibuffer = new float[12 * H_L * W_L]; //12 + + for (int i = 0; i < 12; i++) { //9 + koeLi[i] = &koeLibuffer[i * W_L * H_L]; + } + + for(int j = 0; j < 12; j++) //9 + for (int i = 0; i < W_L * H_L; i++) { + koeLi[j][i] = 0.f; + } + #ifdef _RT_NESTED_OPENMP #pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1922,7 +1891,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * // float eddlow=5.f + cp.edgampl/2.f;//settings->ed_low;//5 to 40 - if(cp.detectedge && lipschitz == true) { //enabled Lipschitz control...more memory..more time... + if(cp.detectedge) { //enabled Lipschitz control...more memory..more time... float *tmCBuffer = new float[H_L * W_L]; float *tmC[H_L]; @@ -2065,7 +2034,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl); - ContAllL (koeLi, maxkoeLi, lipschitz, maxlvl, labco, varhue, varchrom, WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, skip, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavCLVCcurve, waOpacityCurveW, ChCurve, Chutili); + ContAllL (koeLi, maxkoeLi, true, maxlvl, labco, varhue, varchrom, WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, skip, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavCLVCcurve, waOpacityCurveW, ChCurve, Chutili); } @@ -2280,9 +2249,6 @@ void ImProcFunctions::WaveletcontAllAB(LabImage * labco, float ** varhue, float int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl); int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl); - - int skip_ab = WaveletCoeffs_ab.level_stride(lvl); - //printf("lev=%d skipL=%d skipab=%d\n",lvl, skip_L,skip_ab); float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl); ContAllAB (labco, maxlvl, varhue, varchrom, WavCoeffs_ab, WavCoeffs_ab0, lvl, dir, waOpacityCurveW, cp, Wlvl_ab, Hlvl_ab, useChannelA); } @@ -2621,7 +2587,6 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit scaleskip[sc] = scales[sc] / skip; } - float atten01234 = 0.80f; float t_r = settings->top_right; float t_l = settings->top_left; float b_r = settings->bot_right; @@ -2718,6 +2683,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit float value = ((float)cp.val) / 8.f; //strength if (scaleskip[1] < 1.f) { + float atten01234 = 0.80f; value *= (atten01234 * scaleskip[1]); //for zoom < 100% reduce strength...I choose level 1...but!! } @@ -2869,9 +2835,9 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit kinterm = 1.f; float kc = kmul * (wavCLVCcurve[absciss * 500.f] - 0.5f); float kcd = kmuld * (wavCLVCcurve[absciss * 500.f] - 0.5f); - float reduceeffect = 0.6f; if(kc >= 0.f) { + float reduceeffect = 0.6f; kinterm = 1.f + reduceeffect * kmul * (wavCLVCcurve[absciss * 500.f] - 0.5f); //about 1 to 3 general and big amplification for max (under 0) } else { kinterm = 1.f - (SQR(kcd)) / 10.f; @@ -3064,10 +3030,10 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit mea[8] = mean[level] + 2.5f * sigma[level]; //99% bool useChromAndHue = (skinprot != 0.f || cp.HSmet); - float modchro, kLlev; + float modchro; for (int i = 0; i < W_L * H_L; i++) { - kLlev = 1.f; + float kLlev = 1.f; if(cpMul < 0.f) { beta = 1.f; // disabled for negatives values "less contrast" @@ -3217,15 +3183,13 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { //float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; @@ -3233,8 +3197,8 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int ii = i / W_L; int jj = i - ii * W_L; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; - k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 - k2 = k1 * 2.f; + float k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 + float k2 = k1 * 2.f; if(dir < 3) { kba = 1.f + k1; @@ -3260,23 +3224,21 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; for (int i = 0; i < W_L * H_L; i++) { int ii = i / W_L; int jj = i - ii * W_L; - k1 = 600.f; - k2 = 300.f; + float k1 = 600.f; + float k2 = 300.f; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; float aa = 4970.f; float bb = -397000.f; @@ -3362,7 +3324,6 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, // if( (cp.curv || cp.CHSLmet==1) && cp.CHmet!=2 && level < 9 && cpMulC != 0.f) { // cpMulC == 0.f means all will be multiplied by 1.f, so we can skip if( cp.CHmet != 2 && level < 9 && cpMulC != 0.f && cp.chromena) { // cpMulC == 0.f means all will be multiplied by 1.f, so we can skip - float modchro, modhue, kClev; const float skinprot = params->wavelet.skinprotect; const float skinprotneg = -skinprot; const float factorHard = (1.f - skinprotneg / 100.f); @@ -3372,15 +3333,13 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, int ii = i / W_ab; int jj = i - ii * W_ab; //WL and W_ab are identical - float LL = labco->L[ii * 2][jj * 2]; - float LL100 = LL / 327.68f; float scale = 1.f; - modchro = varchrom[ii * 2][jj * 2]; + float modchro = varchrom[ii * 2][jj * 2]; if(useSkinControl) { // hue chroma skin with initial lab datas - modhue = varhue[ii][jj]; - scale = 1.f; + float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; + float modhue = varhue[ii][jj]; if(skinprot > 0.f) { Color::SkinSatCbdl2 (LL100, modhue, modchro, skinprot, scale, true, cp.b_l, cp.t_l, cp.t_r, cp.b_r, 1); //1 for curve @@ -3396,7 +3355,7 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, beta = 0.02f; } - kClev = beta; + float kClev = beta; if(cp.CHmet == 1) { if(level < cp.chrom) { @@ -3478,15 +3437,13 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { //float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; @@ -3494,8 +3451,8 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, int ii = i / W_ab; int jj = i - ii * W_ab; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; - k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 - k2 = k1 * 2.f; + float k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 + float k2 = k1 * 2.f; if(dir < 3) { kba = 1.f + k1; @@ -3521,23 +3478,21 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; for (int i = 0; i < W_ab * H_ab; i++) { int ii = i / W_ab; int jj = i - ii * W_ab; - k1 = 600.f; - k2 = 300.f; + float k1 = 600.f; + float k2 = 300.f; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; float aa = 4970.f; float bb = -397000.f; @@ -3606,10 +3561,8 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, if(choiceClevel < 3) { // not all levels visible, paint residual if(level == 0) { if(cp.backm != 2) { // nothing to change when residual is used as background - float backGroundChroma = (cp.backm == 1) ? 0.f : 0.f; //we can change first to colorized... - for (int i = 0; i < W_ab * H_ab; i++) { - WavCoeffs_ab0[i] = backGroundChroma; + WavCoeffs_ab0[i] = 0.f; } } } From 260cd290fb1aa67c73a8d925b3ee8c19832ac936 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 3 Oct 2016 21:01:26 +0200 Subject: [PATCH 020/115] Cppcheck: Fix most issues in rtexif/* --- rtexif/canonattribs.cc | 5 +++-- rtexif/nikonattribs.cc | 22 +++++++++++----------- rtexif/pentaxattribs.cc | 2 +- rtexif/rtexif.cc | 14 ++++---------- rtexif/rtexif.h | 3 ++- rtexif/sonyminoltaattribs.cc | 16 ++++++++-------- 6 files changed, 29 insertions(+), 33 deletions(-) diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index bd14c6514..41ab468cb 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -101,7 +101,7 @@ public: } char buffer[32]; - sprintf (buffer, "%.1fs %s", sec / 10., sec & 0x4000 ? ",Custom" : ""); + sprintf (buffer, "%.1fs %s", sec / 10., (sec & 0x4000) ? ",Custom" : ""); return buffer; } }; @@ -965,7 +965,7 @@ public: std::ostringstream candidates; for (r = choices.lower_bound(lensID); r != choices.upper_bound(lensID); r++) { - double a1, a2, f1, f2, lensAperture, dif; + double a1, a2, f1, f2, dif; if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { continue; @@ -988,6 +988,7 @@ public: } if( maxApertureAtFocal > 0.1) { + double lensAperture; if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { continue; } diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index 38f4ce1f0..a827eb1fe 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -147,10 +147,10 @@ public: { int a = t->toInt(); std::ostringstream str; - str << "MF = " << (a & 1 ? "Yes" : "No") << std::endl; - str << "D = " << (a & 2 ? "Yes" : "No") << std::endl; - str << "G = " << (a & 4 ? "Yes" : "No") << std::endl; - str << "VR = " << (a & 8 ? "Yes" : "No"); + str << "MF = " << ((a & 1) ? "Yes" : "No") << std::endl; + str << "D = " << ((a & 2) ? "Yes" : "No") << std::endl; + str << "G = " << ((a & 4) ? "Yes" : "No") << std::endl; + str << "VR = " << ((a & 8) ? "Yes" : "No"); return str.str(); } }; @@ -196,13 +196,13 @@ public: { int a = t->toInt(); std::ostringstream str; - str << "Continuous = " << (a & 1 ? "Yes" : "No") << std::endl; - str << "Delay = " << (a & 2 ? "Yes" : "No") << std::endl; - str << "PC Control = " << (a & 4 ? "Yes" : "No") << std::endl; - str << "White-Balance Bracketing = " << (a & 8 ? "Yes" : "No") << std::endl; - str << "Exposure Bracketing = " << (a & 16 ? "Yes" : "No") << std::endl; - str << "Auto ISO = " << (a & 32 ? "Yes" : "No") << std::endl; - str << "IR Control = " << (a & 64 ? "Yes" : "No"); + str << "Continuous = " << ((a & 1) ? "Yes" : "No") << std::endl; + str << "Delay = " << ((a & 2) ? "Yes" : "No") << std::endl; + str << "PC Control = " << ((a & 4) ? "Yes" : "No") << std::endl; + str << "White-Balance Bracketing = " << ((a & 8) ? "Yes" : "No") << std::endl; + str << "Exposure Bracketing = " << ((a & 16) ? "Yes" : "No") << std::endl; + str << "Auto ISO = " << ((a & 32) ? "Yes" : "No") << std::endl; + str << "IR Control = " << ((a & 64) ? "Yes" : "No"); return str.str(); } }; diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index f88e650ec..4d3cef90d 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -1911,12 +1911,12 @@ public: PAAFPointSelectedInterpreter() {} virtual std::string toString (Tag* t) { - const char *ps[] = {"Upper-left", "Top", "Upper-right", "Left", "Mid-left", "Center", "Mid-right", "Right", "Lower-left", "Bottom", "Lower-right"}; int c = t->toInt(0, SHORT); if( !c ) { return "Auto"; } else { + const char *ps[] = {"Upper-left", "Top", "Upper-right", "Left", "Mid-left", "Center", "Mid-right", "Right", "Lower-left", "Bottom", "Lower-right"}; for( int iBit = 0; iBit < 11; iBit++) if( c & (1 << iBit) ) { return ps[iBit]; diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 91f52ce55..a13e9cae8 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -207,13 +207,11 @@ void TagDirectory::printAll (unsigned int level) const for (size_t i = 0; i < tags.size(); i++) { std::string name = tags[i]->nameToString (); - if (tags[i]->isDirectory()) + if (tags[i]->isDirectory()) { for (int j = 0; tags[i]->getDirectory(j); j++) { printf ("%s+-- DIRECTORY %s[%d]:\n", prefixStr, name.c_str(), j); tags[i]->getDirectory(j)->printAll (level + 1); } - else { - std::string value = tags[i]->valueToString (); } } } @@ -696,7 +694,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } TagDirectoryTable::TagDirectoryTable () - : zeroOffset(0), valuesSize(0) + : values(nullptr), zeroOffset(0), valuesSize(0), defaultType(INVALID) { } @@ -1269,9 +1267,8 @@ Tag::~Tag () } // if there are directories behind the tag, delete them - int i = 0; - if (directory) { + int i = 0; while (directory[i]) { delete directory[i++]; } @@ -1600,11 +1597,10 @@ std::string Tag::nameToString (int i) std::string Tag::valueToString () { - char buffer[1024]; - if (attrib && attrib->interpreter) { return attrib->interpreter->toString (this); } else { + char buffer[1024]; toString (buffer); return buffer; } @@ -2831,7 +2827,6 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro sset2 (42, buffer + offs, order); offs += 2; sset4 (8, buffer + offs, order); - offs += 4; TagDirectory* cl; @@ -2964,7 +2959,6 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro sset2 (42, buffer + offs, order); offs += 2; sset4 (8, buffer + offs, order); - offs += 4; int endOffs = cl->write (8, buffer); diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index fcccd1161..ea57ada73 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -535,7 +535,7 @@ protected: double deltaMin = 1000.; for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); ++r ) { - double lensAperture, dif; + double dif; if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { continue; @@ -550,6 +550,7 @@ protected: } if( maxApertureAtFocal > 0.1) { + double lensAperture; if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { continue; } diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 7f4e1bb53..80db5018f 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -1966,7 +1966,7 @@ public: { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT TagType astype = t->getType(); - int a; + int a = 0; if (astype == BYTE) { a = t->getValue()[ofs]; @@ -1975,7 +1975,7 @@ public: } // Decode the value - if(a > 0.) { + if(a > 0) { return pow(2., 6. - (double(a) / 8.)); } else { return 0.; @@ -1984,7 +1984,7 @@ public: virtual int toInt (Tag* t, int ofs, TagType astype) { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); @@ -2026,7 +2026,7 @@ public: { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT TagType astype = t->getType(); - int a; + int a = 0; if (astype == BYTE) { a = t->getValue()[ofs]; @@ -2035,7 +2035,7 @@ public: } // Decode the value - if(a > 0.) { + if(a > 0) { return pow(2., (double(a) / 8. - 1.) / 2.); } else { return 0.; @@ -2044,7 +2044,7 @@ public: virtual int toInt (Tag* t, int ofs, TagType astype) { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); @@ -2085,7 +2085,7 @@ public: virtual int toInt (Tag* t, int ofs, TagType astype) { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); @@ -2235,7 +2235,7 @@ public: } virtual int toInt (Tag* t, int ofs, TagType astype) { - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); From 01048ee513534082d71e219a92813250874130c8 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 3 Oct 2016 21:17:27 +0200 Subject: [PATCH 021/115] Cppcheck: Fixed all issues in rtengine/ alignedbuffer.h, colortemp.cc, dcrop.cc, simpleprocess.cc --- rtengine/alignedbuffer.h | 10 +++++- rtengine/colortemp.cc | 70 +++++++++++++++++---------------------- rtengine/dcrop.cc | 2 +- rtengine/simpleprocess.cc | 39 ++++++++++------------ 4 files changed, 58 insertions(+), 63 deletions(-) diff --git a/rtengine/alignedbuffer.h b/rtengine/alignedbuffer.h index fbbf83523..652bfe8cf 100644 --- a/rtengine/alignedbuffer.h +++ b/rtengine/alignedbuffer.h @@ -93,7 +93,15 @@ public: // we're freeing the memory and allocate it again if the new size is bigger. if (allocatedSize < oldAllocatedSize) { - real = realloc(real, allocatedSize + alignment); + void *temp = realloc(real, allocatedSize + alignment); + if (temp) { // realloc succeeded + real = temp; + } else { // realloc failed => free old buffer and allocate new one + if (real) { + free (real); + } + real = malloc(allocatedSize + alignment); + } } else { if (real) { free (real); diff --git a/rtengine/colortemp.cc b/rtengine/colortemp.cc index 2612d3148..b013d672d 100644 --- a/rtengine/colortemp.cc +++ b/rtengine/colortemp.cc @@ -1100,7 +1100,7 @@ void ColorTemp::temp2mulxyz (double tem, double gree, const std::string &method, x_D = -4.6070e9 / (tem * tem * tem) + 2.9678e6 / (tem * tem) + 0.09911e3 / tem + 0.244063; } else if (tem <= 25000) { x_D = -2.0064e9 / (tem * tem * tem) + 1.9018e6 / (tem * tem) + 0.24748e3 / tem + 0.237040; - } else if (tem > 25000) { + } else /*if (tem > 25000)*/ { x_D = -2.0064e9 / (tem * tem * tem) + 1.9018e6 / (tem * tem) + 0.24748e3 / tem + 0.237040 - ((tem - 25000) / 25000) * 0.025; //Jacques empirical adjustemnt for very high temp (underwater !) } @@ -1135,12 +1135,10 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, //printf("temp=%d green=%.3f equal=%.3f\n", (int)temp, (float) green, (float) equal); //variables for CRI and display Lab, and palette - bool CRI_type = false; double xD, yD, x_D, y_D, interm; double m1, m2; - double xp, yp; - double x, y, z, xx, yy, zz; + double x, y, z; double Xchk[50], Ychk[50], Zchk[50]; //50 : I think it's a good limit for number of color : for CRI and Palette double Xcam02[50], Ycam02[50], Zcam02[50]; double Xcam02pal[50], Ycam02pal[50], Zcam02pal[50]; @@ -1148,16 +1146,12 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, double XchkLamp[50], YchkLamp[50], ZchkLamp[50]; double Xcam02Lamp[50], Ycam02Lamp[50], Zcam02Lamp[50]; double Xpal[50], Ypal[50], Zpal[50]; - double tempw; const double epsilon = 0.008856; //Lab const double whiteD50[3] = {0.9646019585, 1.0, 0.8244507152}; //calculate with this tool : spect 5nm double CAM02BB00, CAM02BB01, CAM02BB02, CAM02BB10, CAM02BB11, CAM02BB12, CAM02BB20, CAM02BB21, CAM02BB22; //for CIECAT02 double xr[50], yr[50], zr[50]; double fx[50], fy[50], fz[50]; - double Llamp[50], alamp[50], blamp[50]; - double Lbb[50], abb[50], bbb[50]; - double Lpal[50], apal[50], bpal[50]; int palet = -1; bool palette = false; @@ -1263,7 +1257,7 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, x_D = -4.6070e9 / (temp * temp * temp) + 2.9678e6 / (temp * temp) + 0.09911e3 / temp + 0.244063; } else if (temp <= 25000) { x_D = -2.0064e9 / (temp * temp * temp) + 1.9018e6 / (temp * temp) + 0.24748e3 / temp + 0.237040; - } else if (temp > 25000) { // above 25000 it's unknown..then I have modified to adjust for underwater + } else /*if (temp > 25000)*/ { // above 25000 it's unknown..then I have modified to adjust for underwater x_D = -2.0064e9 / (temp * temp * temp) + 1.9018e6 / (temp * temp) + 0.24748e3 / temp + 0.237040 - ((temp - 25000) / 25000) * 0.025; //Jacques empirical adjustemnt for very high temp (underwater !) } @@ -1291,8 +1285,6 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, double Xwb = xD / yD; double Ywb = 1.0; double Zwb = (1.0 - xD - yD) / yD; - double correl_temp; - if (settings->verbose) { // double u=4*xD/(-2*xD+12*yD+3); @@ -1335,11 +1327,6 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, { double x_x, y_y, z_z; // illuminants - const double* spect_illummax[] = { - Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, - FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect, - Flash5500_spect, Flash6000_spect, Flash6500_spect - }; // color const double* spec_colorpalet[] = { ColabSkin98_m2_10_spect, ColabSkin95_0_4_spect, ColabSkin91_4_14_spect, ColabSkin90_m1_20_spect, @@ -1359,13 +1346,18 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, int N_col = sizeof(spec_colorpalet) / sizeof(spec_colorpalet[0]); //number of color if(palet < 28) { + const double* spect_illummax[] = { + Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, + FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect, + Flash5500_spect, Flash6000_spect, Flash6500_spect + }; for(int i = 0; i < N_col; i++) { spectrum_to_color_xyz_preset(spec_colorpalet[i], spect_illummax[palet], x_x, y_y, z_z); Xpal[i] = x_x; Ypal[i] = y_y; Zpal[i] = z_z; } - } else if(palet >= 28) { + } else /*if(palet >= 28)*/ { if(temp < INITIALBLACKBODY) { for(int i = 0; i < N_col; i++) { spectrum_to_color_xyz_blackbody(spec_colorpalet[i], temp, x_x, y_y, z_z); @@ -1387,8 +1379,8 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } } - xp = xD; - yp = yD; + double xp = xD; + double yp = yD; double Xwbpal = xp / yp; //white balance double Ywbpal = 1.0; double Zwbpal = (1.0 - xp - yp) / yp; @@ -1433,6 +1425,8 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, //Lab values in function of color and illuminant //these values can be compared to preview values when using white-balance (skin / sky / BW) + double Lpal[50], apal[50], bpal[50]; + for(int i = 0; i < N_col; i++) { Lpal[i] = 116.0 * fy[i] - 16.0; apal[i] = 500.0 * (fx[i] - fy[i]); @@ -1464,12 +1458,6 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, int numero_color = settings->CRI_color - 1; //spectral data illuminant (actually 21): only those necessary (lamp, fluorescent, LED) others CRI=100 (not Flash...) - const double* spect_illum[] = { - Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, - FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, - FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, - NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect - }; const double* spec_color[] = { ColorchechredC3_spect, ColorchechOraA2_spect, ColorchechYelD3_spect, ColorchechGreE2_spect, ColorchechGreB3_spect, ColorchechCyaF3_spect, ColorchechPurD2_spect, ColorchechMagE3_spect, ColorchechSkiA138_13_14_spect, ColorchechGraC4_67_spect, @@ -1480,6 +1468,9 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, int N_c = sizeof(spec_color) / sizeof(spec_color[0]); //number of color + bool CRI_type = false; + double tempw; + if (method == "Fluo F1") { CRI_type = true; tempw = 6430; @@ -1569,25 +1560,26 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } if (CRI_type) { + const double* spect_illum[] = { + Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, + FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, + FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, + NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect + }; + float DeltaE[50], DeltaEs[8]; float quadCRI = 0.0f, quadCRIs = 0.0f; float CRI_RT = 0.0, CRI[50]; float CRI_RTs = 0.0, CRIs[8]; for(int i = 0; i < N_c; i++) { - spectrum_to_color_xyz_preset(spec_color[i], spect_illum[illum + 3], xx, yy, zz); - XchkLamp[i] = xx; - YchkLamp[i] = yy; - ZchkLamp[i] = zz; + spectrum_to_color_xyz_preset(spec_color[i], spect_illum[illum + 3], XchkLamp[i], YchkLamp[i], ZchkLamp[i]); } //calculate XYZ for each color : for Blackbody and Daylight at tempw if(tempw <= INITIALBLACKBODY) { for(int i = 0; i < N_c; i++) { - spectrum_to_color_xyz_blackbody(spec_color[i], tempw, xx, yy, zz); - Xchk[i] = xx; - Ychk[i] = yy; - Zchk[i] = zz; + spectrum_to_color_xyz_blackbody(spec_color[i], tempw, Xchk[i], Ychk[i], Zchk[i]); } spectrum_to_xyz_blackbody(tempw, x, y, z);//for white point @@ -1608,18 +1600,15 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, m22 = (0.03 - 31.4424 * x_DD + 30.0717 * y_DD) / interm2; for(int i = 0; i < N_c; i++) { - spectrum_to_color_xyz_daylight(spec_color[i], m11, m22, xx, yy, zz); - Xchk[i] = xx; - Ychk[i] = yy; - Zchk[i] = zz; + spectrum_to_color_xyz_daylight(spec_color[i], m11, m22, Xchk[i], Ychk[i], Zchk[i]); } spectrum_to_xyz_daylight(m11, m22, x, y, z); } - XYZtoCorColorTemp(Xwb, Ywb, Zwb, correl_temp); - if (settings->verbose) { + double correl_temp; + XYZtoCorColorTemp(Xwb, Ywb, Zwb, correl_temp); printf("Correlated temperature (lamp)=%i\n", (int) correl_temp); //use only for lamp...otherwise It give an information!! } @@ -1680,6 +1669,7 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } } + double Llamp[50], alamp[50], blamp[50]; for(int i = 0; i < N_c; i++) { Llamp[i] = 116.0 * fy[i] - 16.0; alamp[i] = 500.0 * (fx[i] - fy[i]); @@ -1712,6 +1702,8 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } } + double Lbb[50], abb[50], bbb[50]; + for(int i = 0; i < N_c; i++) { Lbb[i] = 116.*fy[i] - 16.; abb[i] = 500.*(fx[i] - fy[i]); diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index b2c2f03f1..ac8b6fc0e 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -33,7 +33,7 @@ extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) : PipetteBuffer(editDataProvider), origCrop(NULL), laboCrop(NULL), labnCrop(NULL), cropImg(NULL), cbuf_real(NULL), cshmap(NULL), transCrop(NULL), cieCrop(NULL), cbuffer(NULL), - updating(false), newUpdatePending(false), skip(10), + updating(false), newUpdatePending(false), skip(10), padding(0), cropx(0), cropy(0), cropw(-1), croph(-1), trafx(0), trafy(0), trafw(-1), trafh(-1), rqcropx(0), rqcropy(0), rqcropw(-1), rqcroph(-1), diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index e12121d07..c16960041 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -996,13 +996,12 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } - int kall = 2; bool wavcontlutili = false; CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); - if((params.wavelet.enabled)) { - ipf.ip_wavelet(labView, labView, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); + if(params.wavelet.enabled) { + ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); } wavCLVCurve.Reset(); @@ -1053,25 +1052,19 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p float CAMMean = NAN; if (params.sharpening.enabled) { - float d; - double dd; - - int sk = 1; - if(settings->ciecamfloat) { - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, sk, 1); + float d; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1, 1); } else { + double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1, 1); } } else { - float d; - - double dd; - int sk = 1; - if(settings->ciecamfloat) { - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, sk, 1); + float d; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1, 1); } else { + double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1, 1); } } @@ -1160,10 +1153,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p bool useLCMS = false; if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - cmsMLU *DescriptionMLU, *CopyrightMLU, *DmndMLU, *DmddMLU;// for modification TAG - cmsToneCurve* GammaTRC[3] = { NULL, NULL, NULL }; - cmsFloat64Number Parameters[7]; double ga0, ga1, ga2, ga3, ga4, ga5, ga6; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; readyImg = ipf.lab2rgb16b (labView, cx, cy, cw, ch, params.icm.output, params.icm.outputIntent, params.icm.working, params.icm.gamma, params.icm.freegamma, params.icm.gampos, params.icm.slpos, ga0, ga1, ga2, ga3, ga4, ga5, ga6, params.blackwhite.enabled ); @@ -1266,6 +1256,10 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); } } else { + cmsToneCurve* GammaTRC[3] = { NULL, NULL, NULL }; + + cmsFloat64Number Parameters[7]; + Parameters[0] = ga0; Parameters[1] = ga1; Parameters[2] = ga2; @@ -1275,6 +1269,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p Parameters[6] = ga6; // 7 parameters for smoother curves //change desc Tag , to "free gamma", or "BT709", etc. + cmsMLU *DescriptionMLU, *CopyrightMLU, *DmndMLU, *DmddMLU;// for modification TAG + cmsContext ContextID = cmsGetProfileContextID(jprof);//modification TAG DescriptionMLU = cmsMLUalloc(ContextID, 1); CopyrightMLU = cmsMLUalloc(ContextID, 1);//for ICC @@ -1344,13 +1340,12 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // else if (params.icm.gamma== "sRGB_g2.4_s12.92") cmsSaveProfileToFile(jprof, "RT_Medium_gsRGB.icc"); // else if (params.icm.gamma== "linear_g1.0") cmsSaveProfileToFile(jprof, "RT_Large_g10.icc"); - + if (GammaTRC[0]) { + cmsFreeToneCurve(GammaTRC[0]); + } } } - if (GammaTRC[0]) { - cmsFreeToneCurve(GammaTRC[0]); - } } else { // if Default gamma mode: we use the profile selected in the "Output profile" combobox; // gamma come from the selected profile, otherwise it comes from "Free gamma" tool From 566d4c982224194b16e158235744c866106f22f5 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 4 Oct 2016 23:28:19 +0200 Subject: [PATCH 022/115] Cppcheck: Fixed most issued in rtgui/* --- rtgui/adjuster.cc | 3 +- rtgui/batchqueuepanel.cc | 4 - rtgui/browserfilter.cc | 3 +- rtgui/cacheimagedata.cc | 4 +- rtgui/clipboard.cc | 2 +- rtgui/coordinateadjuster.cc | 3 +- rtgui/crophandler.cc | 1 + rtgui/curveeditorgroup.cc | 5 +- rtgui/diagonalcurveeditorsubgroup.cc | 4 - rtgui/editorpanel.cc | 2 +- rtgui/extprog.cc | 5 +- rtgui/extprog.h | 3 +- rtgui/filebrowser.cc | 25 ++- rtgui/filecatalog.cc | 11 +- rtgui/histogrampanel.cc | 3 +- rtgui/lwbutton.cc | 2 +- rtgui/lwbuttonset.cc | 2 +- rtgui/mydiagonalcurve.cc | 5 +- rtgui/myflatcurve.cc | 5 +- rtgui/options.cc | 2 +- rtgui/preferences.cc | 5 +- rtgui/previewloader.cc | 5 +- rtgui/previewwindow.cc | 4 +- rtgui/profilestore.cc | 4 +- rtgui/progressconnector.h | 2 +- rtgui/renamedlg.cc | 294 +++++++++++++-------------- rtgui/renamedlg.h | 78 +++---- rtgui/retinex.cc | 2 +- rtgui/shcselector.cc | 2 +- rtgui/thumbbrowserbase.cc | 6 +- rtgui/thumbbrowserentrybase.cc | 3 +- rtgui/thumbnail.cc | 4 +- rtgui/thumbnail.h | 2 +- rtgui/whitebalance.cc | 3 +- 34 files changed, 247 insertions(+), 261 deletions(-) diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index f0e53fbbf..b481f4ebe 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -35,7 +35,6 @@ static double one2one(double val) Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1, Gtk::Image *imgIcon2, double2double_fun slider2value_, double2double_fun value2slider_) { - Gtk::HBox *hbox2 = NULL; label = NULL; adjusterListener = NULL; afterReset = false; @@ -107,6 +106,8 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep if (!imgIcon1 || !imgIcon2) { pack_start (*slider, true, true); } else { + Gtk::HBox *hbox2 = NULL; + // A second HBox is necessary hbox2 = Gtk::manage (new Gtk::HBox()); diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 2c7f81729..e1def62ec 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -24,10 +24,6 @@ #include "soundman.h" #include "rtimage.h" -struct BQProcessLoaded { - BatchQueue* bq; -}; - int processLoadedBatchQueueUIThread (void* data) { diff --git a/rtgui/browserfilter.cc b/rtgui/browserfilter.cc index 6fa663aa3..3d43400ba 100644 --- a/rtgui/browserfilter.cc +++ b/rtgui/browserfilter.cc @@ -21,7 +21,8 @@ BrowserFilter::BrowserFilter () : exifFilterEnabled (false), showTrash (true), showNotTrash (true), - showOriginal (false) + showOriginal (false), + multiselect (false) { for (int i = 0; i < 6; i++) { showRanked[i] = true; diff --git a/rtgui/cacheimagedata.cc b/rtgui/cacheimagedata.cc index 75a6ab75a..220dcb2e8 100644 --- a/rtgui/cacheimagedata.cc +++ b/rtgui/cacheimagedata.cc @@ -24,7 +24,9 @@ CacheImageData::CacheImageData () : md5(""), supported(false), format(FT_Invalid), rankOld(-1), inTrashOld(false), recentlySaved(false), - timeValid(false), exifValid(false), redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), thumbImgType(0) + timeValid(false), year(0), month(0), day(0), hour(0), min(0), sec(0), exifValid(false), + fnumber(0.0), shutter(0.0), focalLen(0.0), focalLen35mm(0.0), focusDist(0.f), iso(0), + redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), rotate(0), thumbImgType(0) { } diff --git a/rtgui/clipboard.cc b/rtgui/clipboard.cc index ad3ea6386..e7a5b7b2c 100644 --- a/rtgui/clipboard.cc +++ b/rtgui/clipboard.cc @@ -20,7 +20,7 @@ Clipboard clipboard; -Clipboard::Clipboard () : partProfile (false) {} +Clipboard::Clipboard () : partProfile (false), _hasIPTC(false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {} Clipboard::~Clipboard () { diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index 61b5ae8b8..469013800 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -124,9 +124,8 @@ void CoordinateAdjuster::createWidgets(const std::vector &axis) set_spacing(3); - AxisAdjuster *currAdjuster = NULL; - for (unsigned int i = 0; i < count; ++i) { + AxisAdjuster *currAdjuster = NULL; const Axis *currAxis = &(axis.at(i)); axisAdjusters.at(i) = new AxisAdjuster(this, currAxis, i); currAdjuster = axisAdjusters.at(i); diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index a76f23717..c6cb49650 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -32,6 +32,7 @@ CropHandler::CropHandler () : zoom(10), ww(0), wh(0), imx(-1), imy(-1), imw(0), imh(0), cax(-1), cay(-1), cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false), cropimg(NULL), cropimgtrue(NULL), cropimg_width(0), cropimg_height(0), + cix(0), ciy(0), ciw(0), cih(0), cis(1), initial(false), isLowUpdatePriority(false), ipc(NULL), crop(NULL), displayHandler(NULL) { diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index f703169ed..2638ac29e 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -113,10 +113,9 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe */ void CurveEditorGroup::newLine() { - Gtk::HBox* headerBox; if (curveEditors.size() > numberOfPackedCurve) { - headerBox = Gtk::manage (new Gtk::HBox ()); + Gtk::HBox* headerBox = Gtk::manage (new Gtk::HBox ()); if (!numberOfPackedCurve) { headerBox->pack_start(*curveGroupLabel, Gtk::PACK_SHRINK, 2); @@ -381,7 +380,7 @@ void CurveEditorGroup::setUnChanged (bool uc, CurveEditor* ce) } } -CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename("") +CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr), curveBBoxPos(0) { leftBar = NULL; bottomBar = NULL; diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index 657186a12..a806a710d 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -1117,12 +1117,10 @@ bool DiagonalCurveEditorSubGroup::curveReset(CurveEditor *ce) case (DCT_NURBS) : // = Control cage NURBSCurve->reset (dce->NURBSResetCurve, dce->getIdentityValue()); return true; - break; case (DCT_Spline) : // = Custom customCurve->reset (dce->customResetCurve, dce->getIdentityValue()); return true; - break; case (DCT_Parametric) : { DiagonalCurveEditor* dCurve = static_cast(parent->displayedCurve); @@ -1137,12 +1135,10 @@ bool DiagonalCurveEditorSubGroup::curveReset(CurveEditor *ce) shcSelector->reset(); paramCurve->reset (dce->paramResetCurve, dce->getIdentityValue()); return true; - break; } default: return false; - break; } return true; diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 93a20c294..ca3055045 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -156,7 +156,7 @@ private: } public: - MonitorProfileSelector (rtengine::StagedImageProcessor* const& ipc) : + explicit MonitorProfileSelector (rtengine::StagedImageProcessor* const& ipc) : intentBox (Glib::ustring (), true), processor (ipc) { diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc index 06f99826d..cf2b6ba9c 100644 --- a/rtgui/extprog.cc +++ b/rtgui/extprog.cc @@ -102,7 +102,7 @@ void ExtProgStore::init () #endif } - +#ifdef WIN32 bool ExtProgStore::searchProgram (const Glib::ustring& name, const Glib::ustring& exePath, const Glib::ustring& exePath86, @@ -111,7 +111,6 @@ bool ExtProgStore::searchProgram (const Glib::ustring& name, bool allowQueueProcess) { -#ifdef WIN32 // get_user_special_dir crashes on some Windows configurations. static Glib::ustring progFilesDir, progFilesDirx86; @@ -196,10 +195,10 @@ bool ExtProgStore::searchProgram (const Glib::ustring& name, return true; } -#endif return false; } +#endif bool ExtProgStore::spawnCommandAsync (const Glib::ustring& cmd) { diff --git a/rtgui/extprog.h b/rtgui/extprog.h index fe7375ce7..154a825e1 100644 --- a/rtgui/extprog.h +++ b/rtgui/extprog.h @@ -44,13 +44,14 @@ class ExtProgStore MyMutex mtx; // covers actions std::vector actions; +#ifdef WIN32 bool searchProgram (const Glib::ustring& name, const Glib::ustring& exePath, const Glib::ustring& exePath86, int maxVer, bool allowRaw, bool allowQueueProcess); - +#endif public: static ExtProgStore* getInstance(); diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 68825c696..e3066e4dc 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -487,13 +487,13 @@ void FileBrowser::rightClicked (ThumbBrowserEntryBase* entry) untrash->set_sensitive (false); for (size_t i = 0; i < selected.size(); i++) - if ((static_cast(selected[i]))->thumbnail->getStage() == 1) { + if ((static_cast(selected[i]))->thumbnail->getStage()) { untrash->set_sensitive (true); break; } for (size_t i = 0; i < selected.size(); i++) - if ((static_cast(selected[i]))->thumbnail->getStage() == 0) { + if (!(static_cast(selected[i]))->thumbnail->getStage()) { trash->set_sensitive (true); break; } @@ -512,7 +512,6 @@ void FileBrowser::rightClicked (ThumbBrowserEntryBase* entry) submenuDF->attach (*Gtk::manage(autoDF = new Gtk::MenuItem (M("FILEBROWSER_AUTODARKFRAME"))), 0, 1, p, p + 1); p++; submenuDF->attach (*Gtk::manage(thisIsDF = new Gtk::MenuItem (M("FILEBROWSER_MOVETODARKFDIR"))), 0, 1, p, p + 1); - p++; selectDF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), selectDF)); autoDF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), autoDF)); thisIsDF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), thisIsDF )); @@ -527,7 +526,6 @@ void FileBrowser::rightClicked (ThumbBrowserEntryBase* entry) submenuFF->attach (*Gtk::manage(autoFF = new Gtk::MenuItem (M("FILEBROWSER_AUTOFLATFIELD"))), 0, 1, p, p + 1); p++; submenuFF->attach (*Gtk::manage(thisIsFF = new Gtk::MenuItem (M("FILEBROWSER_MOVETOFLATFIELDDIR"))), 0, 1, p, p + 1); - p++; selectFF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), selectFF)); autoFF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), autoFF)); thisIsFF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), thisIsFF )); @@ -612,7 +610,7 @@ void FileBrowser::addEntry_ (FileBrowserEntry* entry) entry->addButtonSet (new FileThumbnailButtonSet (entry)); entry->getThumbButtonSet()->setRank (entry->thumbnail->getRank()); entry->getThumbButtonSet()->setColorLabel (entry->thumbnail->getColorLabel()); - entry->getThumbButtonSet()->setInTrash (entry->thumbnail->getStage() == 1); + entry->getThumbButtonSet()->setInTrash (entry->thumbnail->getStage()); entry->getThumbButtonSet()->setButtonListener (this); entry->resize (getThumbnailHeight()); @@ -1134,8 +1132,9 @@ bool FileBrowser::keyPressed (GdkEventKey* event) bool ctrl = event->state & GDK_CONTROL_MASK; bool shift = event->state & GDK_SHIFT_MASK; bool alt = event->state & GDK_MOD1_MASK; +#ifdef __WIN32__ bool altgr = event->state & GDK_MOD2_MASK; - +#endif if ((event->keyval == GDK_C || event->keyval == GDK_c || event->keyval == GDK_Insert) && ctrl) { copyProfile (); return true; @@ -1474,8 +1473,8 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry ((entry->thumbnail->isRecentlySaved() && filter.showRecentlySaved[0]) && !filter.showRecentlySaved[1]) || ((!entry->thumbnail->isRecentlySaved() && filter.showRecentlySaved[1]) && !filter.showRecentlySaved[0]) || - (entry->thumbnail->getStage() == 1 && !filter.showTrash) || - (entry->thumbnail->getStage() == 0 && !filter.showNotTrash)) { + (entry->thumbnail->getStage() && !filter.showTrash) || + (!entry->thumbnail->getStage() && !filter.showNotTrash)) { return false; } @@ -1568,11 +1567,11 @@ void FileBrowser::toTrashRequested (std::vector tbe) // no need to notify listeners as item goes to trash, likely to be deleted - if (tbe[i]->thumbnail->getStage() == 1) { + if (tbe[i]->thumbnail->getStage()) { continue; } - tbe[i]->thumbnail->setStage (1); + tbe[i]->thumbnail->setStage (true); if (tbe[i]->getThumbButtonSet()) { tbe[i]->getThumbButtonSet()->setRank (tbe[i]->thumbnail->getRank()); @@ -1592,11 +1591,11 @@ void FileBrowser::fromTrashRequested (std::vector tbe) for (size_t i = 0; i < tbe.size(); i++) { // if thumbnail was marked inTrash=true then param file must be there, no need to run customprofilebuilder - if (tbe[i]->thumbnail->getStage() == 0) { + if (!tbe[i]->thumbnail->getStage()) { continue; } - tbe[i]->thumbnail->setStage (0); + tbe[i]->thumbnail->setStage (false); if (tbe[i]->getThumbButtonSet()) { tbe[i]->getThumbButtonSet()->setRank (tbe[i]->thumbnail->getRank()); @@ -1715,7 +1714,7 @@ void FileBrowser::buttonPressed (LWButton* button, int actionCode, void* actionD FileBrowserEntry* entry = static_cast(actionData); tbe.push_back (entry); - if (entry->thumbnail->getStage() == 0) { + if (!entry->thumbnail->getStage()) { toTrashRequested (tbe); } else { fromTrashRequested (tbe); diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 3ed7608f1..440ca9039 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -989,9 +989,6 @@ void FileCatalog::copyMoveRequested (std::vector tbe, bool m fc.set_filename(tbe[0]->filename); //!!! TODO prevent dialog closing on "enter" key press - bool filecopymovecomplete; - int i_copyindex; - if( fc.run() == Gtk::RESPONSE_OK ) { Glib::ustring dest_Dir = fc.get_current_folder(); @@ -1020,8 +1017,8 @@ void FileCatalog::copyMoveRequested (std::vector tbe, bool m /* comparison of src_Dir and dest_Dir is done per image for compatibility with possible future use of Collections as source where each file's source path may be different.*/ - filecopymovecomplete = false; - i_copyindex = 1; + bool filecopymovecomplete = false; + int i_copyindex = 1; while(!filecopymovecomplete) { // check for filename conflicts at destination - prevent overwriting (actually RT will crash on overwriting attempt) @@ -1224,8 +1221,6 @@ void FileCatalog::setExportPanel (ExportPanel* expanel) void FileCatalog::renameRequested (std::vector tbe) { - bool success; - RenameDialog* renameDlg = new RenameDialog ((Gtk::Window*)get_toplevel()); for (size_t i = 0; i < tbe.size(); i++) { @@ -1235,7 +1230,7 @@ void FileCatalog::renameRequested (std::vector tbe) Glib::ustring dirName = Glib::path_get_dirname (tbe[i]->filename); Glib::ustring baseName = Glib::path_get_basename (tbe[i]->filename); - success = false; + bool success = false; do { if (renameDlg->run () == Gtk::RESPONSE_OK) { diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 9c8163c8e..65bbadf52 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -353,7 +353,8 @@ void HistogramPanel::toggle_button_full () // // HistogramRGBArea HistogramRGBArea::HistogramRGBArea () ://needChroma unactive by default - frozen(false), valid(false), needRed(true), needGreen(true), needBlue(true), needLuma(true), rawMode(false), showMode(options.histogramBar), barDisplayed(options.histogramBar), needChroma(false) + val(0), r(0), g(0), b(0), frozen(false), valid(false), needRed(true), needGreen(true), needBlue(true), needLuma(true), rawMode(false), + showMode(options.histogramBar), barDisplayed(options.histogramBar), needChroma(false), parent(nullptr) { harih = new HistogramRGBAreaIdleHelper; diff --git a/rtgui/lwbutton.cc b/rtgui/lwbutton.cc index 52b7fd7e8..f7914eedb 100644 --- a/rtgui/lwbutton.cc +++ b/rtgui/lwbutton.cc @@ -20,7 +20,7 @@ #include "guiutils.h" LWButton::LWButton (Cairo::RefPtr i, int aCode, void* aData, Alignment ha, Alignment va, Glib::ustring tooltip) - : halign(ha), valign(va), icon(i), state(Normal), listener(NULL), actionCode(aCode), actionData(aData), toolTip(tooltip) + : xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(NULL), actionCode(aCode), actionData(aData), toolTip(tooltip) { if (i) { diff --git a/rtgui/lwbuttonset.cc b/rtgui/lwbuttonset.cc index bfa4684af..c801cc33b 100644 --- a/rtgui/lwbuttonset.cc +++ b/rtgui/lwbuttonset.cc @@ -18,7 +18,7 @@ */ #include "lwbuttonset.h" -LWButtonSet::LWButtonSet () : aw(0), ah(0) +LWButtonSet::LWButtonSet () : aw(0), ah(0), ax(0), ay(0) { } diff --git a/rtgui/mydiagonalcurve.cc b/rtgui/mydiagonalcurve.cc index fd57633fb..969b197a2 100644 --- a/rtgui/mydiagonalcurve.cc +++ b/rtgui/mydiagonalcurve.cc @@ -165,11 +165,11 @@ void MyDiagonalCurve::get_LUT (LUTf &lut) // calculate remaining points std::vector curveDescr = getPoints (); rtengine::DiagonalCurve rtcurve(curveDescr, lut.getUpperBound() * 1.2); - double t; + double maxVal = double(lut.getUpperBound()); for (int i = 0; i < size; i++) { - t = double(i) / maxVal; + double t = double(i) / maxVal; lut[i] = rtcurve.getVal (t); } @@ -1167,7 +1167,6 @@ void MyDiagonalCurve::pipetteButton1Released(EditDataProvider *provider) snapToElmt = -100; if (curve.type != DCT_Parametric) { - std::vector::iterator itx, ity; buttonPressed = false; /* get the pointer position */ getCursorPosition(Gdk::EventType(Gdk::BUTTON_RELEASE), false, graphY, 0, Gdk::ModifierType(0)); diff --git a/rtgui/myflatcurve.cc b/rtgui/myflatcurve.cc index 4127d1ae8..4ccc8b5bb 100644 --- a/rtgui/myflatcurve.cc +++ b/rtgui/myflatcurve.cc @@ -86,11 +86,10 @@ void MyFlatCurve::get_LUT (LUTf &lut) std::vector curveDescr = getPoints (); rtengine::FlatCurve rtcurve(curveDescr, periodic, lut.getUpperBound() * 1.2 > 5000 ? 5000 : lut.getUpperBound() * 1.2); - double t; double maxVal = double(lut.getUpperBound()); for (int i = 0; i < size; i++) { - t = double(i) / maxVal; + double t = double(i) / maxVal; lut[i] = rtcurve.getVal (t); } @@ -815,13 +814,13 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) case Gdk::BUTTON_RELEASE: if (edited_point == -1) { //curve.type!=FCT_Parametric) { if (buttonPressed && event->button.button == 1) { - int src, dst; buttonPressed = false; remove_modal_grab (); // Removing any deleted point if we were previously modifying the point position if (editedHandle & (FCT_EditedHandle_CPoint | FCT_EditedHandle_CPointX | FCT_EditedHandle_CPointY)) { /* delete inactive points: */ + int src, dst; itx = curve.x.begin(); ity = curve.y.begin(); itlt = curve.leftTangent.begin(); diff --git a/rtgui/options.cc b/rtgui/options.cc index d6a327dc8..d1b6bda3d 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2168,9 +2168,9 @@ bool Options::load () } else { #ifdef WIN32 WCHAR pathW[MAX_PATH] = {0}; - char pathA[MAX_PATH]; if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_LOCAL_APPDATA, false)) { + char pathA[MAX_PATH]; WideCharToMultiByte(CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); rtdir = Glib::build_filename(Glib::ustring(pathA), Glib::ustring(CACHEFOLDERNAME)); } diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 14c9cb0eb..4ffb28856 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -609,9 +609,10 @@ Gtk::Widget* Preferences::getPerformancePanel () rgbDenoiseTreadLimitSB->set_digits (0); rgbDenoiseTreadLimitSB->set_increments (1, 5); rgbDenoiseTreadLimitSB->set_max_length(2); // Will this be sufficient? :) - int maxThreadNumber = 10; #ifdef _OPENMP - maxThreadNumber = omp_get_max_threads(); + int maxThreadNumber = omp_get_max_threads(); +#else + int maxThreadNumber = 10; #endif rgbDenoiseTreadLimitSB->set_range (0, maxThreadNumber); threadLimitHB->pack_start (*RGBDTLl, Gtk::PACK_SHRINK, 2); diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index e7c3d4fac..e7b37cac6 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -72,9 +72,10 @@ public: Impl(): nConcurrentThreads(0) { - int threadCount = 2; #ifdef _OPENMP - threadCount = omp_get_num_procs(); + int threadCount = omp_get_num_procs(); +#else + int threadCount = 2; #endif threadPool_ = new Glib::ThreadPool(threadCount, 0); diff --git a/rtgui/previewwindow.cc b/rtgui/previewwindow.cc index ea419427b..18c470e55 100644 --- a/rtgui/previewwindow.cc +++ b/rtgui/previewwindow.cc @@ -223,10 +223,10 @@ bool PreviewWindow::on_button_press_event (GdkEventButton* event) int x, y, w, h; getObservedFrameArea (x, y, w, h); if (x>imgX || y>imgY || w < imgW || h < imgH) { - bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6; - bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6; if (!isMoving) { + bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6; + bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6; isMoving = true; if (!inside || moreInside) { diff --git a/rtgui/profilestore.cc b/rtgui/profilestore.cc index acbbfba63..4f4f2c187 100644 --- a/rtgui/profilestore.cc +++ b/rtgui/profilestore.cc @@ -164,10 +164,10 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath { bool fileFound = false; - unsigned int folder = 0; // folder's own Id // reload the available profiles from the profile dir if (!realPath.empty() && Glib::file_test(realPath, Glib::FILE_TEST_EXISTS) && Glib::file_test (realPath, Glib::FILE_TEST_IS_DIR)) { + unsigned int folder = 0; // folder's own Id // add this entry to the folder list folders.push_back(virtualPath); @@ -488,7 +488,7 @@ void ProfileStore::dumpFolderList() printf("Folder list:\n------------\n"); for (unsigned int i = 0; i < folders.size(); i++) { - printf(" #%3d - %s\n", i, folders.at(i).c_str()); + printf(" #%3ud - %s\n", i, folders.at(i).c_str()); } printf("\n"); diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index 2e235fa82..fe824a6a1 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -90,7 +90,7 @@ class ProgressConnector public: - ProgressConnector (): workThread( 0 ) { } + ProgressConnector (): retval( 0 ), workThread( 0 ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) { diff --git a/rtgui/renamedlg.cc b/rtgui/renamedlg.cc index a33011f09..16bfaff00 100644 --- a/rtgui/renamedlg.cc +++ b/rtgui/renamedlg.cc @@ -88,159 +88,159 @@ Glib::ustring RenameDialog::getNewName () return newName->get_text (); } -void RenameDialog::fillTemplateList () -{ +//void RenameDialog::fillTemplateList () +//{ +// +// templateModel->clear (); +// +// for (size_t i = 0; i < options.renameTemplates.size(); i++) { +// Gtk::TreeModel::iterator iter = templateModel->append (); +// iter->set_value (templateColumns.tmplName, options.renameTemplates[i]); +// iter->set_value (templateColumns.rowSeparator, false); +// } +// +// // append separator and the manage... item +// Gtk::TreeModel::iterator iter = templateModel->append (); +// iter->set_value (templateColumns.tmplName, Glib::ustring("")); +// iter->set_value (templateColumns.rowSeparator, true); +// iter = templateModel->append (); +// iter->set_value (templateColumns.tmplName, Glib::ustring(M("FILEBROWSER_ADDDELTEMPLATE"))); +// iter->set_value (templateColumns.rowSeparator, false); +//} - templateModel->clear (); +//bool RenameDialog::rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter) +//{ +// +// return iter->get_value (templateColumns.rowSeparator); +//} - for (size_t i = 0; i < options.renameTemplates.size(); i++) { - Gtk::TreeModel::iterator iter = templateModel->append (); - iter->set_value (templateColumns.tmplName, options.renameTemplates[i]); - iter->set_value (templateColumns.rowSeparator, false); - } +//void RenameDialog::useTemplToggled () +//{ +// +// templates->set_sensitive (useTmpl->get_active ()); +// +// if (useTmpl->get_active () && isTemplSelected ()) { +// all->set_sensitive (true); +// newName->set_text (applyTemplate (oldName->get_text(), imageData, getActiveTemplate())); +// } else { +// all->set_sensitive (false); +// } +// +// newName->select_region (0, newName->get_text().size()); +//} - // append separator and the manage... item - Gtk::TreeModel::iterator iter = templateModel->append (); - iter->set_value (templateColumns.tmplName, Glib::ustring("")); - iter->set_value (templateColumns.rowSeparator, true); - iter = templateModel->append (); - iter->set_value (templateColumns.tmplName, Glib::ustring(M("FILEBROWSER_ADDDELTEMPLATE"))); - iter->set_value (templateColumns.rowSeparator, false); -} +//bool RenameDialog::isTemplSelected () +//{ +// +// Gtk::TreeModel::iterator iter = templates->get_active(); +// return iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE"); +//} -bool RenameDialog::rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter) -{ +//Glib::ustring RenameDialog::getActiveTemplate () +//{ +// +// Gtk::TreeModel::iterator iter = templates->get_active(); +// +// if (iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE")) { +// return iter->get_value (templateColumns.tmplName); +// } else { +// return ""; +// } +//} - return iter->get_value (templateColumns.rowSeparator); -} +//void RenameDialog::tmplSelectionChanged () +//{ +// +// Gtk::TreeModel::iterator iter = templates->get_active(); +// +// if (iter && iter->get_value (templateColumns.tmplName) == M("FILEBROWSER_ADDDELTEMPLATE")) { +// RenameTemplateEditor* rte = new RenameTemplateEditor (p); +// +// if (rte->run() == Gtk::RESPONSE_OK) { +// fillTemplateList (); +// } +// +// delete rte; +// // show add/del template dialog +// } else { +// useTemplToggled (); +// } +//} -void RenameDialog::useTemplToggled () -{ +//RenameTemplateEditor::RenameTemplateEditor (Gtk::Window* parent) +// : Gtk::Dialog ("Edit rename templates", *parent, true, true) +//{ +// +// list = Gtk::manage (new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); +// list->set_headers_visible (false); +// get_vbox ()->pack_start (*list); +// +// Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); +// templ = Gtk::manage (new Gtk::Entry ()); +// Gtk::Button* add = Gtk::manage (new Gtk::Button ()); +// Gtk::Button* del = Gtk::manage (new Gtk::Button ()); +// add->add (*Gtk::manage (new RTImage ("list-add-small.png"))); +// del->add (*Gtk::manage (new RTImage ("list-remove-red-small.png"))); +// hb->pack_start (*templ); +// hb->pack_start (*add, Gtk::PACK_SHRINK, 2); +// hb->pack_start (*del, Gtk::PACK_SHRINK, 2); +// +// get_vbox ()->pack_start (*hb, Gtk::PACK_SHRINK, 4); +// +// add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); +// +// refreshTemplateList (); +// +// add->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::addPressed) ); +// del->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::delPressed) ); +// +// show_all_children (); +// +// set_size_request (-1, 250); +//} +// +//void RenameTemplateEditor::refreshTemplateList () +//{ +// +// list->clear_items (); +// +// for (size_t i = 0; i < options.renameTemplates.size(); i++) { +// list->append_text (options.renameTemplates[i]); +// } +//} +// +//void RenameTemplateEditor::addPressed () +//{ +// +// if (templ->get_text() != "") { +// options.renameTemplates.push_back (templ->get_text ()); +// refreshTemplateList (); +// templ->set_text(""); +// } +//} +// +//void RenameTemplateEditor::delPressed () +//{ +// +// std::vector sel = list->get_selected (); +// +// for (size_t i = 0; i < sel.size(); i++) { +// Glib::ustring toDel = list->get_text (sel[i]); +// std::vector::iterator f = std::find (options.renameTemplates.begin(), options.renameTemplates.end(), toDel); +// +// if (f != options.renameTemplates.end()) { +// options.renameTemplates.erase (f); +// } +// } +// +// refreshTemplateList (); +//} - templates->set_sensitive (useTmpl->get_active ()); - - if (useTmpl->get_active () && isTemplSelected ()) { - all->set_sensitive (true); - newName->set_text (applyTemplate (oldName->get_text(), imageData, getActiveTemplate())); - } else { - all->set_sensitive (false); - } - - newName->select_region (0, newName->get_text().size()); -} - -bool RenameDialog::isTemplSelected () -{ - - Gtk::TreeModel::iterator iter = templates->get_active(); - return iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE"); -} - -Glib::ustring RenameDialog::getActiveTemplate () -{ - - Gtk::TreeModel::iterator iter = templates->get_active(); - - if (iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE")) { - return iter->get_value (templateColumns.tmplName); - } else { - return ""; - } -} - -void RenameDialog::tmplSelectionChanged () -{ - - Gtk::TreeModel::iterator iter = templates->get_active(); - - if (iter && iter->get_value (templateColumns.tmplName) == M("FILEBROWSER_ADDDELTEMPLATE")) { - RenameTemplateEditor* rte = new RenameTemplateEditor (p); - - if (rte->run() == Gtk::RESPONSE_OK) { - fillTemplateList (); - } - - delete rte; - // show add/del template dialog - } else { - useTemplToggled (); - } -} - -RenameTemplateEditor::RenameTemplateEditor (Gtk::Window* parent) - : Gtk::Dialog ("Edit rename templates", *parent, true, true) -{ - - list = Gtk::manage (new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); - list->set_headers_visible (false); - get_vbox ()->pack_start (*list); - - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); - templ = Gtk::manage (new Gtk::Entry ()); - Gtk::Button* add = Gtk::manage (new Gtk::Button ()); - Gtk::Button* del = Gtk::manage (new Gtk::Button ()); - add->add (*Gtk::manage (new RTImage ("list-add-small.png"))); - del->add (*Gtk::manage (new RTImage ("list-remove-red-small.png"))); - hb->pack_start (*templ); - hb->pack_start (*add, Gtk::PACK_SHRINK, 2); - hb->pack_start (*del, Gtk::PACK_SHRINK, 2); - - get_vbox ()->pack_start (*hb, Gtk::PACK_SHRINK, 4); - - add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); - - refreshTemplateList (); - - add->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::addPressed) ); - del->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::delPressed) ); - - show_all_children (); - - set_size_request (-1, 250); -} - -void RenameTemplateEditor::refreshTemplateList () -{ - - list->clear_items (); - - for (size_t i = 0; i < options.renameTemplates.size(); i++) { - list->append_text (options.renameTemplates[i]); - } -} - -void RenameTemplateEditor::addPressed () -{ - - if (templ->get_text() != "") { - options.renameTemplates.push_back (templ->get_text ()); - refreshTemplateList (); - templ->set_text(""); - } -} - -void RenameTemplateEditor::delPressed () -{ - - std::vector sel = list->get_selected (); - - for (size_t i = 0; i < sel.size(); i++) { - Glib::ustring toDel = list->get_text (sel[i]); - std::vector::iterator f = std::find (options.renameTemplates.begin(), options.renameTemplates.end(), toDel); - - if (f != options.renameTemplates.end()) { - options.renameTemplates.erase (f); - } - } - - refreshTemplateList (); -} - -Glib::ustring RenameDialog::applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ) -{ - - return Glib::ustring ("szeva"); - -} +//Glib::ustring RenameDialog::applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ) +//{ +// +// return Glib::ustring ("szeva"); +// +//} diff --git a/rtgui/renamedlg.h b/rtgui/renamedlg.h index 8de7fe013..94972d575 100644 --- a/rtgui/renamedlg.h +++ b/rtgui/renamedlg.h @@ -30,29 +30,29 @@ class RenameDialog : public Gtk::Dialog protected: - class TemplateColumns : public Gtk::TreeModel::ColumnRecord - { - public: - Gtk::TreeModelColumn tmplName; - Gtk::TreeModelColumn rowSeparator; - TemplateColumns() - { - add(tmplName); - add(rowSeparator); - } - }; - TemplateColumns templateColumns; - Glib::RefPtr templateModel; +// class TemplateColumns : public Gtk::TreeModel::ColumnRecord +// { +// public: +// Gtk::TreeModelColumn tmplName; +// Gtk::TreeModelColumn rowSeparator; +// TemplateColumns() +// { +// add(tmplName); +// add(rowSeparator); +// } +// }; +// TemplateColumns templateColumns; +// Glib::RefPtr templateModel; Gtk::Window* p; Gtk::Label* oldName; Gtk::Entry* newName; - Gtk::CheckButton* useTmpl; - MyComboBox* templates; - Gtk::Button* all; +// Gtk::CheckButton* useTmpl; +// MyComboBox* templates; +// Gtk::Button* all; const CacheImageData* imageData; - void fillTemplateList (); +// void fillTemplateList (); public: explicit RenameDialog (Gtk::Window* parent); @@ -60,32 +60,32 @@ public: void initName (const Glib::ustring& iname, const CacheImageData* cid); Glib::ustring getNewName (); - bool rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter); - void tmplSelectionChanged (); - void useTemplToggled (); +// bool rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter); +// void tmplSelectionChanged (); +// void useTemplToggled (); - bool isTemplSelected (); - Glib::ustring getActiveTemplate (); +// bool isTemplSelected (); +// Glib::ustring getActiveTemplate (); - static Glib::ustring applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ); +// static Glib::ustring applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ); }; -class RenameTemplateEditor : public Gtk::Dialog -{ - -protected: - Gtk::ListViewText* list; - Gtk::Entry* templ; - - void refreshTemplateList (); -public: - explicit RenameTemplateEditor (Gtk::Window* parent); - - Glib::ustring getSelectedTemplate (); - - void addPressed (); - void delPressed (); -}; +//class RenameTemplateEditor : public Gtk::Dialog +//{ +// +//protected: +// Gtk::ListViewText* list; +// Gtk::Entry* templ; +// +// void refreshTemplateList (); +//public: +// explicit RenameTemplateEditor (Gtk::Window* parent); +// +// Glib::ustring getSelectedTemplate (); +// +// void addPressed (); +// void delPressed (); +//}; #endif diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index fead40b88..d44cef912 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -1121,7 +1121,7 @@ void Retinex::gammaretinexChanged() if(gammaretinex->get_active_row_number() == 4) { gam->show(); slope->show(); - } else if(gammaretinex->get_active_row_number() != 4) { + } else /*if(gammaretinex->get_active_row_number() != 4)*/ { gam->hide(); slope->hide(); } diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index 461eb118f..9cb41e1a5 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -21,7 +21,7 @@ #include "multilangmgr.h" #include "mycurve.h" -SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), cl(NULL) +SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(NULL) { positions[0] = defaults[0] = 0.25; diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index ea2bb00dd..2d022f9f7 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -559,7 +559,6 @@ void ThumbBrowserBase::arrangeFiles () int ct = 0; int currx = 0; - int curry = 0; while (ct < N) { // find widest item in the column @@ -571,7 +570,7 @@ void ThumbBrowserBase::arrangeFiles () } // arrange items in the column - curry = 0; + int curry = 0; for (int i = 0; ct < N && i < numOfRows; i++, ct++) { while (ct < N && fd[ct]->filtered) { @@ -641,12 +640,11 @@ void ThumbBrowserBase::arrangeFiles () // arrange files int ct = 0; - int currx = 0; int curry = 0; while (ct < N) { // arrange items in the row - currx = 0; + int currx = 0; for (int i = 0; ct < N && i < numOfCols; i++, ct++) { while (ct < N && fd[ct]->filtered) { diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index b924655c5..3783c5164 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -119,7 +119,6 @@ void ThumbBrowserEntryBase::updateBackBuffer () getTextSizes (infow, infoh); int iofs_x = 4, iofs_y = 4; - int igap = 2; int istartx = prex; int istarty = prey; @@ -141,6 +140,7 @@ void ThumbBrowserEntryBase::updateBackBuffer () istarty += iofs_y; if (!bbIcons.empty()) { + int igap = 2; int iwidth = 0; int iheight = 0; @@ -251,7 +251,6 @@ void ThumbBrowserEntryBase::updateBackBuffer () fn->set_width (textw * Pango::SCALE); fn->set_ellipsize (Pango::ELLIPSIZE_MIDDLE); backBuffer->draw_layout (gc_, textposx_ex, textposy + tpos, fn); - tpos += exlabh; } } } diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index b9d23e46d..62d48b2ec 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -63,8 +63,8 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5) : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), pparamsValid(false), - needsReProcessing(true), imageLoading(false), lastImg(NULL), - initial_(true) + pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(NULL), + lastW(0), lastH(0), lastScale(0.0), initial_(true) { diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index ca2f898ec..97dd20b5a 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -187,7 +187,7 @@ public: { return pparams.inTrash; } - void setStage (int stage) + void setStage (bool stage) { if (pparams.inTrash != stage) { pparams.inTrash = stage; diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index f77ce74e7..3c4b61fe3 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -104,14 +104,13 @@ static double wbTemp2Slider(double temp) const double slope = (double)(CENTERTEMP - MINTEMP) / (MAXTEMP - CENTERTEMP); const double y = (temp - CENTERTEMP) / (MAXTEMP - CENTERTEMP); double x = pow(y, 0.25); // rough guess of x, will be a little lower - double y1; double k = 0.1; bool add = true; // the y=f(x) function is a mess to invert, therefore we have this trial-refinement loop instead. // from tests, worst case is about 20 iterations, ie no problem for (;;) { - y1 = x * slope + (1.0 - slope) * pow(x, 4.0); + double y1 = x * slope + (1.0 - slope) * pow(x, 4.0); if (5000 * fabs(y1 - y) < 0.1) { break; From e82b60cd03b2e65a3a1f9b0a755351367ea0e3db Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 4 Oct 2016 23:50:44 +0200 Subject: [PATCH 023/115] =?UTF-8?q?Cppcheck:=20Fixed=20some=20issues=20fou?= =?UTF-8?q?nd=20by=20Fl=C3=B6ssie=20during=20review=20of=20my=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtengine/FTblockDN.cc | 5 +---- rtengine/lcp.cc | 2 +- rtengine/lcp.h | 2 +- rtgui/ilabel.cc | 2 +- rtgui/ilabel.h | 2 +- rtgui/partialpastedlg.cc | 2 +- rtgui/partialpastedlg.h | 2 +- rtgui/saveasdlg.cc | 2 +- rtgui/saveasdlg.h | 2 +- 9 files changed, 9 insertions(+), 12 deletions(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index e0d22d639..c74e49218 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -1677,10 +1677,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef } delete labdn; - - if (Lin) { - delete Lin; - } + delete Lin; }//end of tile row }//end of tile loop diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index 1ed601301..0f45e1270 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -276,7 +276,7 @@ float LCPMapper::calcVignetteFac(int x, int y) const + 2.*aVig[0] * aVig[2] - 3.*param0Sqr * aVig[1]) * rsqr * rsqr)); } -LCPProfile::LCPProfile(Glib::ustring fname) +LCPProfile::LCPProfile(const Glib::ustring &fname) { const int BufferSize = 8192; char buf[BufferSize]; diff --git a/rtengine/lcp.h b/rtengine/lcp.h index 15d51d556..908bacf56 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -89,7 +89,7 @@ public: static const int MaxPersModelCount = 3000; LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC! - explicit LCPProfile(Glib::ustring fname); + explicit LCPProfile(const Glib::ustring &fname); void calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames diff --git a/rtgui/ilabel.cc b/rtgui/ilabel.cc index 591564305..2c7edfd80 100644 --- a/rtgui/ilabel.cc +++ b/rtgui/ilabel.cc @@ -18,7 +18,7 @@ */ #include "ilabel.h" -ILabel::ILabel (Glib::ustring lab) : label(lab) {} +ILabel::ILabel (const Glib::ustring &lab) : label(lab) {} void ILabel::on_realize() { diff --git a/rtgui/ilabel.h b/rtgui/ilabel.h index ab8f656cc..82064bd23 100644 --- a/rtgui/ilabel.h +++ b/rtgui/ilabel.h @@ -27,7 +27,7 @@ class ILabel : public Gtk::DrawingArea Glib::ustring label; public: - explicit ILabel (Glib::ustring lab); + explicit ILabel (const Glib::ustring &lab); bool on_expose_event(GdkEventExpose* event); void on_realize(); void on_style_changed (const Glib::RefPtr& style); diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc index d017b5409..78631b725 100644 --- a/rtgui/partialpastedlg.cc +++ b/rtgui/partialpastedlg.cc @@ -20,7 +20,7 @@ #include "multilangmgr.h" #include "paramsedited.h" -PartialPasteDlg::PartialPasteDlg (Glib::ustring title) +PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) { set_modal (true); diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index 57d77f532..a054b042e 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -132,7 +132,7 @@ public: sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; public: - explicit PartialPasteDlg (Glib::ustring title); + explicit PartialPasteDlg (const Glib::ustring &title); void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL); diff --git a/rtgui/saveasdlg.cc b/rtgui/saveasdlg.cc index c9490f585..2afd1eb58 100644 --- a/rtgui/saveasdlg.cc +++ b/rtgui/saveasdlg.cc @@ -22,7 +22,7 @@ #include "rtimage.h" extern Options options; -SaveAsDialog::SaveAsDialog (Glib::ustring initialDir) +SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir) { set_title(M("GENERAL_SAVE")); diff --git a/rtgui/saveasdlg.h b/rtgui/saveasdlg.h index 188d915fb..4810b46d9 100644 --- a/rtgui/saveasdlg.h +++ b/rtgui/saveasdlg.h @@ -45,7 +45,7 @@ protected: void putToQueueClicked (); public: - explicit SaveAsDialog (Glib::ustring initialDir); + explicit SaveAsDialog (const Glib::ustring &initialDir); Glib::ustring getFileName (); Glib::ustring getDirectory (); From 18ee91b8e4dcd5d1e6c51d79f7147c3285d8d4c4 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 5 Oct 2016 00:04:22 +0200 Subject: [PATCH 024/115] Removed rtgui/createicon.cc --- rtgui/createicon.cc | 223 -------------------------------------------- 1 file changed, 223 deletions(-) delete mode 100644 rtgui/createicon.cc diff --git a/rtgui/createicon.cc b/rtgui/createicon.cc deleted file mode 100644 index 32884c182..000000000 --- a/rtgui/createicon.cc +++ /dev/null @@ -1,223 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include - -void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ - check = (png_size_t)fread(data, (png_size_t)1, length, (FILE *)png_ptr->io_ptr); - - if (check != length) { - png_error(png_ptr, "Read Error"); - } -} - -void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - - check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr)); - - if (check != length) { - png_error(png_ptr, "Write Error"); - } -} - -void png_flush(png_structp png_ptr) -{ - FILE *io_ptr; - io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr)); - - if (io_ptr != NULL) { - fflush(io_ptr); - } -} - - -unsigned char* loadPNG (char* fname, int& w, int& h) -{ - - FILE *file = fopen (fname, "rb"); - - unsigned char header[8]; - fread (header, 1, 8, file); - - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); - png_infop info = png_create_info_struct (png); - png_infop end_info = png_create_info_struct (png); - - if (setjmp (png_jmpbuf(png))) { - png_destroy_read_struct (&png, &info, &end_info); - fclose (file); - return NULL; - } - - //set up png read - png_set_read_fn (png, file, png_read_data); - png_set_sig_bytes (png, 8); - - png_read_info(png, info); - - unsigned long width, height; - int bit_depth, color_type, interlace_type, compression_type, filter_method; - png_get_IHDR(png, info, &width, &height, &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_method); - - //converting to 32bpp format - if (color_type == PNG_COLOR_TYPE_PALETTE) { - png_set_palette_to_rgb(png); - } - - if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { - png_set_gray_to_rgb(png); - } - - if (png_get_valid(png, info, PNG_INFO_tRNS)) { - png_set_tRNS_to_alpha(png); - } - - if (interlace_type != PNG_INTERLACE_NONE) { - png_destroy_read_struct (&png, &info, &end_info); - fclose (file); - return NULL; - } - - if (color_type & PNG_COLOR_MASK_ALPHA) { - png_set_strip_alpha(png); - } - - //setting gamma - double gamma; - - if (png_get_gAMA(png, info, &gamma)) { - png_set_gamma(png, 2.0, gamma); - } else { - png_set_gamma(png, 2.0, 0.45455); - } - - int bps = 8; - - //updating png info struct - png_read_update_info(png, info); - png_get_IHDR(png, info, &width, &height, &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_method); - - if (color_type & PNG_COLOR_MASK_ALPHA) { - png_set_strip_alpha(png); - } - - png_read_update_info(png, info); - png_get_IHDR(png, info, &width, &height, &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_method); - - - unsigned char* data = new unsigned char[width * height * 3]; - int rowlen = width * 3; - unsigned char *row = new unsigned char [rowlen]; - - for (unsigned int i = 0; i < height; i++) { - - png_read_row (png, (png_byte*)row, NULL); - memcpy (data + 3 * i * width, row, 3 * width); - } - - png_read_end (png, 0); - png_destroy_read_struct (&png, &info, &end_info); - - delete [] row; - fclose(file); - - w = width; - h = height; - return data; -} - -void savePNG (char* fname, unsigned char* data1, unsigned char* data2, int w, int h) -{ - - FILE* file = fopen(fname, "wb"); - - png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); - png_infop info = png_create_info_struct(png); - - if (setjmp(png_jmpbuf(png))) { - png_destroy_write_struct (&png, &info); - fclose(file); - return; - } - - png_set_write_fn (png, file, png_write_data, png_flush); - png_set_compression_level(png, 6); - - int width = w; - int height = h; - int bps = 8; - - png_set_IHDR(png, info, width, height, bps, PNG_COLOR_TYPE_RGB_ALPHA, - PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_BASE); - - - int rowlen = width * 4; - unsigned char *row = new unsigned char [rowlen]; - - png_write_info(png, info); - - for (unsigned int i = 0; i < height; i++) { - for (int j = 0; j < width; j++) { - int ofs = 3 * (width * i + j); - unsigned char alpha = data2[ofs] - data1[ofs]; - - if (i == 8 && j == 8) { - printf ("alpha=%d pix=%d\n", (int)alpha, (int)(data1[ofs + 0] / (1.0 - alpha / 255.0))); - } - - if (alpha < 255) { - row[4 * j + 0] = data1[ofs + 0] / (1.0 - alpha / 255.0); - row[4 * j + 1] = data1[ofs + 1] / (1.0 - alpha / 255.0); - row[4 * j + 2] = data1[ofs + 2] / (1.0 - alpha / 255.0); - } else { - - } - - row[4 * j + 3] = 255 - alpha; - } - - png_write_row (png, (png_byte*)row); - } - - png_write_end(png, info); - png_destroy_write_struct(&png, &info); - - delete [] row; - fclose (file); -} - -int main (int argc, char* argv[]) -{ - - int w, h; - unsigned char* data1 = loadPNG (argv[1], w, h); - unsigned char* data2 = loadPNG (argv[2], w, h); - savePNG (argv[3], data1, data2, w, h); - -} From f60a4fc4b11960da61c7c39e9db4c0165f5e7106 Mon Sep 17 00:00:00 2001 From: Hombre Date: Wed, 5 Oct 2016 01:13:20 +0200 Subject: [PATCH 025/115] Adding Picker size support and Displayed values support (RGB/HSV/LAB) --- rtgui/cropwindow.cc | 97 ++++++++++++++++++++++++++++++------ rtgui/cropwindow.h | 2 + rtgui/imagearea.cc | 12 +---- rtgui/lockablecolorpicker.cc | 45 ++++++++++++----- rtgui/lockablecolorpicker.h | 1 + rtgui/toolbar.cc | 4 ++ 6 files changed, 123 insertions(+), 38 deletions(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index f5d8ede4a..df9cb9f86 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -273,6 +273,38 @@ void CropWindow::flawnOver (bool isFlawnOver) this->isFlawnOver = isFlawnOver; } +void CropWindow::scroll (int state, GdkScrollDirection direction, int x, int y) +{ + if ((state & GDK_CONTROL_MASK) && onArea(ColorPicker, x, y)) { + // resizing a color picker + if (direction == GDK_SCROLL_UP) { + hoveredPicker->incSize(); + rtengine::Coord imgPos; + screenCoordToImage(x, y, imgPos.x, imgPos.y); + updateHoveredPicker(imgPos); + iarea->redraw (); + }else if (direction == GDK_SCROLL_DOWN) { + hoveredPicker->decSize(); + rtengine::Coord imgPos; + screenCoordToImage(x, y, imgPos.x, imgPos.y); + updateHoveredPicker(imgPos); + iarea->redraw (); + } + } else { + // not over a color picker, we zoom in/out + int newCenterX = x; + int newCenterY = y; + + screenCoordToImage(newCenterX, newCenterY, newCenterX, newCenterY); + + if (direction == GDK_SCROLL_UP && !isMaxZoom()) { + zoomIn (true, newCenterX, newCenterY); + } else if (!isMinZoom()) { + zoomOut (true, newCenterX, newCenterY); + } + } +} + void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) { @@ -282,7 +314,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) iarea->grabFocus (this); if (button == 1) { - if (type == GDK_2BUTTON_PRESS && onArea (CropImage, x, y) && (state == SNormal || state == SCropImgMove)) { + if (type == GDK_2BUTTON_PRESS && onArea (CropImage, x, y) && !onArea (ColorPicker, x, y) && (state == SNormal || state == SCropImgMove)) { if (fitZoomEnabled) { if (fitZoom) { state = SNormal; @@ -318,23 +350,27 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) if (onArea (CropImage, x, y)) { // events inside of the image domain if (iarea->getToolMode () == TMColorPicker) { if (hoveredPicker) { - // Color Picker drag starts - state = SDragPicker; + if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + hoveredPicker->decSize(); + rtengine::Coord imgPos; + screenCoordToImage(x, y, imgPos.x, imgPos.y); + updateHoveredPicker(imgPos); + needRedraw = true; + } else if (!(bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { + hoveredPicker->rollDisplayedValues(); + needRedraw = true; + } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + // Color Picker drag starts + state = SDragPicker; + } } else { // Add a new Color Picker - rtengine::Coord imgPos, cropPos; + rtengine::Coord imgPos; screenCoordToImage(x, y, imgPos.x, imgPos.y); LockableColorPicker *newPicker = new LockableColorPicker(imgPos.x, imgPos.y, LockableColorPicker::Size::S15, 0., 0., 0., this, &cropHandler.colorParams.output, &cropHandler.colorParams.working); colorPickers.push_back(newPicker); hoveredPicker = newPicker; - imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); - float r=0.f, g=0.f, b=0.f; - LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); - hoveredPicker->setValidity (validity); - if (validity == LockableColorPicker::Validity::INSIDE) { - cropHandler.colorPick(cropPos, r, g, b, hoveredPicker->getSize()); - hoveredPicker->setRGB (r, g, b); - } + updateHoveredPicker(imgPos); state = SDragPicker; press_x = x; press_y = y; @@ -465,8 +501,18 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) action_y = 0; } } else if (iarea->getToolMode () == TMColorPicker && hoveredPicker) { - // Color Picker drag starts - state = SDragPicker; + if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + hoveredPicker->decSize(); + rtengine::Coord imgPos; + screenCoordToImage(x, y, imgPos.x, imgPos.y); + updateHoveredPicker(imgPos); + needRedraw = true; + } else if (!(bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { + hoveredPicker->rollDisplayedValues(); + } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + // Color Picker drag starts + state = SDragPicker; + } } } } @@ -521,6 +567,12 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) hoveredPicker = nullptr; state = SDeletePicker; needRedraw = true; + } else if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + hoveredPicker->incSize(); + rtengine::Coord imgPos; + screenCoordToImage(x, y, imgPos.x, imgPos.y); + updateHoveredPicker(imgPos); + needRedraw = true; } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { // Deleting the hovered picker for (std::vector::iterator i = colorPickers.begin(); i != colorPickers.end(); i++) { @@ -2018,6 +2070,23 @@ void CropWindow::redrawNeeded (LWButton* button) iarea->redraw (); } +void CropWindow::updateHoveredPicker (rtengine::Coord &imgPos) +{ + + if (!hoveredPicker) { + return; + } + + rtengine::Coord cropPos; + imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); + float r=0.f, g=0.f, b=0.f; + LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); + hoveredPicker->setValidity (validity); + if (validity == LockableColorPicker::Validity::INSIDE) { + cropHandler.colorPick(cropPos, r, g, b, hoveredPicker->getSize()); + hoveredPicker->setRGB (r, g, b); + } +} void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) { diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index 74cc318c4..089fcb8a4 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -104,6 +104,7 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed void drawUnscaledSpotRectangle (Cairo::RefPtr cr, int rectSize); void drawObservedFrame (Cairo::RefPtr cr, int rw = 0, int rh = 0); void changeZoom (int zoom, bool notify = true, int centerx = -1, int centery = -1); + void updateHoveredPicker (rtengine::Coord &imgPos); LockableColorPicker::Validity checkValidity (LockableColorPicker* picker, const rtengine::Coord &pos); @@ -166,6 +167,7 @@ public: bool isInside (int x, int y); + void scroll (int state, GdkScrollDirection direction, int x, int y); void buttonPress (int button, int num, int state, int x, int y); void buttonRelease (int button, int num, int state, int x, int y); void pointerMoved (int bstate, int x, int y); diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index f21cd1b94..c09051e4f 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -274,18 +274,8 @@ bool ImageArea::on_scroll_event (GdkEventScroll* event) { CropWindow* cw = getCropWindow (event->x, event->y); - if (cw) { - int newCenterX = (int)event->x; - int newCenterY = (int)event->y; - - cw->screenCoordToImage(newCenterX, newCenterY, newCenterX, newCenterY); - - if (event->direction == GDK_SCROLL_UP && !cw->isMaxZoom()) { - cw->zoomIn (true, newCenterX, newCenterY); - } else if (!cw->isMinZoom()) { - cw->zoomOut (true, newCenterX, newCenterY); - } + cw->scroll (event->state, event->direction, event->x, event->y); } return true; diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index 351787121..1d1da9b5c 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -38,12 +38,12 @@ LockableColorPicker::LockableColorPicker (int x, int y, Size size, const float R r(R), g(G), b(B), L(0.f), a(0.f), bb(0.f) { float h_, s_, v_; - rtengine::Color::rgb2hsv((float)r*65535.f, (float)g*65535.f, (float)b*65535.f, h_, s_, v_); + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h_, s_, v_); h = (int)(h_*255.f); s = (int)(s_*255.f); v = (int)(v_*255.f); - rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? + rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? } void LockableColorPicker::updateBackBuffer () @@ -66,21 +66,29 @@ void LockableColorPicker::updateBackBuffer () switch (displayedValues) { case ColorPickerType::RGB: - layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_R") + " "); + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_R")); layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(r*255.f))); - layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_G") + " "); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_G")); layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(g*255.f))); - layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_B") + " "); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_B")); layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(b*255.f))); break; case ColorPickerType::HSV: - default: - layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_H") + " "); + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_H")); layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(h*255.f))); - layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_S") + " "); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_S")); layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(s*255.f))); - layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_V") + " "); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_V")); layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(v*255.f))); + break; + case ColorPickerType::LAB: + default: + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_L")); + layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(1), L)); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_A")); + layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(1), a)); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_B")); + layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(1), bb)); } int w00, w01, w10, w11, w20, w21, h00, h01, h10, h11, h20, h21; @@ -256,12 +264,12 @@ void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const floa b = B; float h_, s_, v_; - rtengine::Color::rgb2hsv((float)r*65535.f, (float)g*65535.f, (float)b*65535.f, h_, s_, v_); + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h_, s_, v_); h = (float)h_; s = (float)s_; v = (float)v_; - rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? + rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? if (validity != Validity::OUTSIDE) { setDirty(true); @@ -279,12 +287,12 @@ void LockableColorPicker::setRGB (const float R, const float G, const float B) b = B; float h_, s_, v_; - rtengine::Color::rgb2hsv((float)r*65535.f, (float)g*65535.f, (float)b*65535.f, h_, s_, v_); + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h_, s_, v_); h = (float)h_; s = (float)s_; v = (float)v_; - rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? + rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? if (validity != Validity::OUTSIDE) { setDirty(true); @@ -340,6 +348,17 @@ LockableColorPicker::Size LockableColorPicker::getSize () return size; } +void LockableColorPicker::rollDisplayedValues () +{ + if (displayedValues < ColorPickerType::LAB) { + displayedValues = (ColorPickerType)((int)displayedValues + 1); + } else { + displayedValues = ColorPickerType::RGB; + } + setDirty(true); + +} + void LockableColorPicker::incSize () { if (size < Size::S30) { diff --git a/rtgui/lockablecolorpicker.h b/rtgui/lockablecolorpicker.h index 8be803081..c42f742c4 100644 --- a/rtgui/lockablecolorpicker.h +++ b/rtgui/lockablecolorpicker.h @@ -87,6 +87,7 @@ public: bool isOver (int x, int y); void setValidity (Validity isValid); void setSize (Size newSize); + void rollDisplayedValues (); void incSize (); void decSize (); }; diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index 10137c673..c3b1cae1d 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -1,3 +1,4 @@ + /* * This file is part of RawTherapee. * @@ -371,6 +372,9 @@ void ToolBar::colPicker_pressed (GdkEventButton* event) handTool->set_active (false); showColorPickers(true); current = TMColorPicker; + if (pickerListener) { + pickerListener->switchPickerVisibility (showColPickers); + } } else { // Disabling the picker tool, enabling the Hand tool and keeping the "visible pickers" mode handTool->set_active (true); From 8a2b2e6700e214b2cd14d97b32d9b8215a1d0a62 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 5 Oct 2016 01:15:52 +0200 Subject: [PATCH 026/115] Extended StopWatch class to report processing time in microseconds --- rtengine/StopWatch.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/rtengine/StopWatch.h b/rtengine/StopWatch.h index ac4a4d16c..9e4400b94 100644 --- a/rtengine/StopWatch.h +++ b/rtengine/StopWatch.h @@ -26,18 +26,17 @@ #ifdef BENCHMARK #define BENCHFUN StopWatch StopFun(__func__); + #define BENCHFUNMICRO StopWatch StopFun(__func__, true); #else #define BENCHFUN + #define BENCHFUNMICRO #endif class StopWatch { public: - StopWatch( ) - { - stopped = false; - } - explicit StopWatch( const char* msg ) + + explicit StopWatch( const char* msg, bool microseconds = false ) : microseconds(microseconds) { message = msg; start(); @@ -56,8 +55,13 @@ public: void stop() { stopTime.set(); - long elapsedTime = stopTime.etime(startTime) / 1000; - std::cout << message << " took " << elapsedTime << " ms" << std::endl; + if(!microseconds) { + long elapsedTime = stopTime.etime(startTime) / 1000; + std::cout << message << " took " << elapsedTime << " ms" << std::endl; + } else { + long elapsedTime = stopTime.etime(startTime); + std::cout << message << " took " << elapsedTime << " us" << std::endl; + } stopped = true; } void stop(const char *msg) @@ -66,6 +70,7 @@ public: stop(); }; private: + bool microseconds; MyTime startTime; MyTime stopTime; const char *message; From 773a65b5be550d6facfe4cf5d46a894c828fdb7e Mon Sep 17 00:00:00 2001 From: Hombre Date: Fri, 7 Oct 2016 01:25:45 +0200 Subject: [PATCH 027/115] Bugfix and using the Navigator's range for displaying values Thanks a lot to Heckflosse and Floessie for the bugfix --- rtgui/crophandler.cc | 40 +++++++++++-- rtgui/crophandler.h | 2 +- rtgui/cropwindow.cc | 85 +++++++++++++++++++++----- rtgui/cropwindow.h | 26 +++----- rtgui/imagearea.cc | 11 +++- rtgui/imagearea.h | 3 +- rtgui/lockablecolorpicker.cc | 97 +++++++++++++++++++----------- rtgui/lockablecolorpicker.h | 7 ++- rtgui/navigator.cc | 109 +++++++++++++++++++++------------- rtgui/navigator.h | 4 ++ rtgui/pointermotionlistener.h | 17 +++++- 11 files changed, 279 insertions(+), 122 deletions(-) diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index 522b34c41..64bca19f4 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -475,15 +475,22 @@ bool CropHandler::getEnabled () return enabled; } -void CropHandler::colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::Size size) +void CropHandler::colorPick (const rtengine::Coord &pickerPos, float &r, float &g, float &b, float &rpreview, float &gpreview, float &bpreview, LockableColorPicker::Size size) { + if (!cropPixbuf || !cropPixbuftrue) { + r = g = b = 0.f; + rpreview = gpreview = bpreview = 0.f; + return; + } + int xSize = (int)size; int ySize = (int)size; int pixbufW = cropPixbuftrue->get_width(); + int pixbufH = cropPixbuftrue->get_height(); rtengine::Coord topLeftPos(pickerPos.x - xSize/2, pickerPos.y - ySize/2); - if (topLeftPos.x > pixbufW || topLeftPos.y > pixbufW || topLeftPos.x + xSize < 0 || topLeftPos.y + ySize < 0) { + if (topLeftPos.x > pixbufW || topLeftPos.y > pixbufH || topLeftPos.x + xSize < 0 || topLeftPos.y + ySize < 0) { return; } @@ -503,8 +510,8 @@ void CropHandler::colorPick (rtengine::Coord pickerPos, float &r, float &g, floa ySize += topLeftPos.y; topLeftPos.y = 0; } - if (topLeftPos.y + ySize > cropimg_height) { - ySize = cropimg_height - topLeftPos.y; + if (topLeftPos.y + ySize > pixbufH) { + ySize = pixbufH - topLeftPos.y; } // Accumulating the data @@ -526,10 +533,35 @@ void CropHandler::colorPick (rtengine::Coord pickerPos, float &r, float &g, floa } } } + // Averaging r = (float)r2 / (float)count / 255.f; g = (float)g2 / (float)count / 255.f; b = (float)b2 / (float)count / 255.f; + + // Accumulating the data + r2=0, g2=0, b2=0; + count = 0; + data = cropPixbuf->get_pixels(); + for (int j = topLeftPos.y ; j < topLeftPos.y + ySize ; ++j) { + const guint8* data2 = data + cropPixbuf->get_rowstride()*j; + for (int i = topLeftPos.x ; i < topLeftPos.x + xSize ; ++i) { + const guint8* data3 = data2 + i*3; + rtengine::Coord currPos(i, j); + rtengine::Coord delta = pickerPos - currPos; + rtengine::PolarCoord p(delta); + if (p.radius <= radius) { + r2 += *data3; + g2 += *(data3+1); + b2 += *(data3+2); + ++count; + } + } + } + // Averaging + rpreview = (float)r2 / (float)count / 255.f; + gpreview = (float)g2 / (float)count / 255.f; + bpreview = (float)b2 / (float)count / 255.f; } void CropHandler::getSize (int& w, int& h) diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index 150b256f4..1350df27e 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -113,7 +113,7 @@ public: void setEnabled (bool e); bool getEnabled (); - void colorPick (rtengine::Coord pickerPos, float &r, float &g, float &b, LockableColorPicker::Size size); + void colorPick (const rtengine::Coord &pickerPos, float &r, float &g, float &b, float &rpreview, float &gpreview, float &bpreview, LockableColorPicker::Size size); rtengine::DetailedCrop* getCrop() { diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index df9cb9f86..aa1e8c859 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -66,13 +66,13 @@ ZoomStep zoomSteps[] = { #define MAXZOOMSTEPS 20 #define ZOOM11INDEX 13 -CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_, bool isDetailWindow) +CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow) : ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false), fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3), upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0), imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(NULL), - pmlistener(NULL), pmhlistener(NULL), observedCropWin(NULL), ipc(ipc_) + pmlistener(NULL), pmhlistener(NULL), observedCropWin(NULL) { Glib::RefPtr context = parent->get_pango_context () ; Pango::FontDescription fontd = context->get_font_description (); @@ -110,7 +110,7 @@ CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, minWidth = bsw + iw + 2 * sideBorderWidth; cropHandler.setDisplayHandler(this); - cropHandler.newImage (ipc_, isDetailWindow); + cropHandler.newImage (parent->getImProcCoordinator(), isDetailWindow); } CropWindow::~CropWindow () @@ -904,22 +904,23 @@ void CropWindow::pointerMoved (int bstate, int x, int y) screenCoordToImage (x, y, imgPos.x, imgPos.y); if (imgPos.x < 0) { imgPos.x = 0; - }else if (imgPos.x >= ipc->getFullWidth()) { - imgPos.x = ipc->getFullWidth()-1; + }else if (imgPos.x >= iarea->getImProcCoordinator()->getFullWidth()) { + imgPos.x = iarea->getImProcCoordinator()->getFullWidth()-1; } if (imgPos.y < 0) { imgPos.y = 0; - }else if (imgPos.y >= ipc->getFullHeight()) { - imgPos.y = ipc->getFullHeight()-1; + }else if (imgPos.y >= iarea->getImProcCoordinator()->getFullHeight()) { + imgPos.y = iarea->getImProcCoordinator()->getFullHeight()-1; } imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); float r=0.f, g=0.f, b=0.f; + float rpreview=0.f, gpreview=0.f, bpreview=0.f; LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); hoveredPicker->setValidity (validity); if (validity == LockableColorPicker::Validity::INSIDE) { - cropHandler.colorPick(cropPos, r, g, b, hoveredPicker->getSize()); + cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, hoveredPicker->getSize()); } - hoveredPicker->setPosition (imgPos, r, g, b); + hoveredPicker->setPosition (imgPos, r, g, b, rpreview, gpreview, bpreview); iarea->redraw (); } else if (state == SNormal && iarea->getToolMode () == TMColorPicker && onArea(ColorPicker, x, y)) { // TODO: we could set the hovered picker as Highlighted here @@ -2056,10 +2057,10 @@ void CropWindow::buttonPressed (LWButton* button, int actionCode, void* actionDa } else if (button == bZoom100) { // zoom 100 zoom11 (); } else if (button == bClose) { // close - if(ipc->updateTryLock()) { + if(iarea->getImProcCoordinator()->updateTryLock()) { deleted = true; iarea->cropWindowClosed (this); - ipc->updateUnLock(); + iarea->getImProcCoordinator()->updateUnLock(); } } } @@ -2080,11 +2081,12 @@ void CropWindow::updateHoveredPicker (rtengine::Coord &imgPos) rtengine::Coord cropPos; imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); float r=0.f, g=0.f, b=0.f; + float rpreview=0.f, gpreview=0.f, bpreview=0.f; LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); hoveredPicker->setValidity (validity); if (validity == LockableColorPicker::Validity::INSIDE) { - cropHandler.colorPick(cropPos, r, g, b, hoveredPicker->getSize()); - hoveredPicker->setRGB (r, g, b); + cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, hoveredPicker->getSize()); + hoveredPicker->setRGB (r, g, b, rpreview, gpreview, bpreview); } } void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) @@ -2455,9 +2457,10 @@ void CropWindow::cropImageUpdated () colorPicker->getImagePosition(imgPos); imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); float r=0.f, g=0.f, b=0.f; + float rpreview=0.f, gpreview=0.f, bpreview=0.f; colorPicker->setValidity (checkValidity (colorPicker, cropPos)); - cropHandler.colorPick(cropPos, r, g, b, colorPicker->getSize()); - colorPicker->setRGB (r, g, b); + cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, colorPicker->getSize()); + colorPicker->setRGB (r, g, b, rpreview, gpreview, bpreview); } iarea->redraw (); } @@ -2524,3 +2527,55 @@ ImageArea* CropWindow::getImageArea() { return iarea; } + +void CropWindow::setCropGUIListener (CropGUIListener* cgl) +{ + cropgl = cgl; +} + +void CropWindow::setPointerMotionListener (PointerMotionListener* pml) +{ + pmlistener = pml; + pml->signal_cycle_rgb().connect( sigc::mem_fun(*this, &CropWindow::cycleRGB) ); + pml->signal_cycle_hsv().connect( sigc::mem_fun(*this, &CropWindow::cycleHSV) ); +} + +PointerMotionListener* CropWindow::getPointerMotionListener () +{ + return pmlistener; +} + +void CropWindow::setPointerMotionHListener (PointerMotionListener* pml) +{ + pmhlistener = pml; +} + +// crop window listeners +void CropWindow::addCropWindowListener (CropWindowListener* l) +{ + listeners.push_back (l); +} + +void CropWindow::cycleRGB () +{ + bool redraw = false; + for (auto colorPicker : colorPickers) { + redraw |= colorPicker->cycleRGB (); + } + + if (redraw) { + iarea->redraw (); + } +} + +void CropWindow::cycleHSV () +{ + bool redraw = false; + for (auto colorPicker : colorPickers) { + redraw |= colorPicker->cycleHSV (); + } + + if (redraw) { + iarea->redraw (); + } +} diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index 089fcb8a4..f976c98b1 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -94,7 +94,6 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed std::list listeners; CropWindow* observedCropWin; // Pointer to the currently active detail CropWindow - rtengine::StagedImageProcessor* ipc; bool onArea (CursorArea a, int x, int y); void updateCursor (int x, int y); @@ -105,6 +104,8 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed void drawObservedFrame (Cairo::RefPtr cr, int rw = 0, int rh = 0); void changeZoom (int zoom, bool notify = true, int centerx = -1, int centery = -1); void updateHoveredPicker (rtengine::Coord &imgPos); + void cycleRGB (); + void cycleHSV (); LockableColorPicker::Validity checkValidity (LockableColorPicker* picker, const rtengine::Coord &pos); @@ -113,7 +114,7 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed public: CropHandler cropHandler; - CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_, bool isDetailWindow); + CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow); ~CropWindow (); void setDecorated (bool decorated) @@ -190,24 +191,13 @@ public: void setCropAnchorPosition (int& w, int& h); // listeners - void setCropGUIListener (CropGUIListener* cgl) - { - cropgl = cgl; - } - void setPointerMotionListener (PointerMotionListener* pml) - { - pmlistener = pml; - } - void setPointerMotionHListener (PointerMotionListener* pml) - { - pmhlistener = pml; - } + void setCropGUIListener (CropGUIListener* cgl); + void setPointerMotionListener (PointerMotionListener* pml); + PointerMotionListener* getPointerMotionListener (); + void setPointerMotionHListener (PointerMotionListener* pml); // crop window listeners - void addCropWindowListener (CropWindowListener* l) - { - listeners.push_back (l); - } + void addCropWindowListener (CropWindowListener* l); void delCropWindowListener (CropWindowListener* l); // crophandlerlistener interface diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index c09051e4f..125968b8e 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -88,7 +88,7 @@ void ImageArea::on_resized (Gtk::Allocation& req) { if (ipc && get_width() > 1) { // sometimes on_resize is called in some init state, causing wrong sizes if (!mainCropWindow) { - mainCropWindow = new CropWindow (this, ipc, false, false); + mainCropWindow = new CropWindow (this, false, false); mainCropWindow->setDecorated (false); mainCropWindow->setFitZoomEnabled (true); mainCropWindow->addCropWindowListener (this); @@ -106,7 +106,12 @@ void ImageArea::on_resized (Gtk::Allocation& req) } } -void ImageArea::setImProcCoordinator (rtengine::StagedImageProcessor* ipc_) +rtengine::StagedImageProcessor* ImageArea::getImProcCoordinator() const +{ + return ipc; +} + +void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_) { if( !ipc_ ) { focusGrabber = NULL; @@ -398,7 +403,7 @@ void ImageArea::addCropWindow () return; // if called but no image is loaded, it would crash } - CropWindow* cw = new CropWindow (this, ipc, true, true); + CropWindow* cw = new CropWindow (this, true, true); cw->zoom11(); cw->setCropGUIListener (cropgl); cw->setPointerMotionListener (pmlistener); diff --git a/rtgui/imagearea.h b/rtgui/imagearea.h index deabe8aa7..71d4007d1 100644 --- a/rtgui/imagearea.h +++ b/rtgui/imagearea.h @@ -73,7 +73,8 @@ public: ImageArea (ImageAreaPanel* p); ~ImageArea (); - void setImProcCoordinator (rtengine::StagedImageProcessor* ipc_); + rtengine::StagedImageProcessor* getImProcCoordinator() const; + void setImProcCoordinator(rtengine::StagedImageProcessor* ipc_); void setPreviewModePanel(PreviewModePanel* previewModePanel_) { previewModePanel = previewModePanel_; diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index 1d1da9b5c..896bdaa2a 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -23,26 +23,22 @@ #include "../rtengine/rt_math.h" #include "imagearea.h" #include "multilangmgr.h" +#include "navigator.h" extern Options options; LockableColorPicker::LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) : cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(Size::S20), outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), - r(0.f), g(0.f), b(0.f), h(0.f), s(0.f), v(0.f), L(0.f), a(0.f), bb(0.f) + r(0.f), g(0.f), b(0.f), rpreview(0.f), gpreview(0.f), bpreview(0.f), h(0.f), s(0.f), v(0.f), L(0.f), a(0.f), bb(0.f) {} LockableColorPicker::LockableColorPicker (int x, int y, Size size, const float R, const float G, const float B, CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) : cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(x, y), size(size), outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), - r(R), g(G), b(B), L(0.f), a(0.f), bb(0.f) + r(R), g(G), b(B), rpreview(R), gpreview(G), bpreview(B), L(0.f), a(0.f), bb(0.f) { - float h_, s_, v_; - rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h_, s_, v_); - h = (int)(h_*255.f); - s = (int)(s_*255.f); - v = (int)(v_*255.f); - + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h, s, v); rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? } @@ -52,6 +48,7 @@ void LockableColorPicker::updateBackBuffer () // -------------------- setting some key constants --------------------- const float circlePadding = 3.f; // keep this value odd + const double opacity = 0.62; // --------------------------------------------------------------------- if (validity == Validity::INSIDE) { @@ -63,32 +60,37 @@ void LockableColorPicker::updateBackBuffer () pangoContext->set_font_description (fontd); Glib::RefPtr layout[3][2]; + Glib::ustring s1, s2, s3; + PointerMotionListener* navigator = cropWindow->getPointerMotionListener (); switch (displayedValues) { case ColorPickerType::RGB: + navigator->getRGBText ((int)(r*255.f), (int)(g*255.f), (int)(b*255.f), s1, s2, s3); layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_R")); - layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(r*255.f))); + layout[0][1] = iArea->create_pango_layout(s1); layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_G")); - layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(g*255.f))); + layout[1][1] = iArea->create_pango_layout(s2); layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_B")); - layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(b*255.f))); + layout[2][1] = iArea->create_pango_layout(s3); break; case ColorPickerType::HSV: + navigator->getHSVText (h, s, v, s1, s2, s3); layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_H")); - layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(h*255.f))); + layout[0][1] = iArea->create_pango_layout(s1); layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_S")); - layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(s*255.f))); + layout[1][1] = iArea->create_pango_layout(s2); layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_V")); - layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(0), (int)(v*255.f))); + layout[2][1] = iArea->create_pango_layout(s3); break; case ColorPickerType::LAB: default: + navigator->getLABText (L, a, bb, s1, s2, s3); layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_L")); - layout[0][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(1), L)); + layout[0][1] = iArea->create_pango_layout(s1); layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_A")); - layout[1][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(1), a)); + layout[1][1] = iArea->create_pango_layout(s2); layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_B")); - layout[2][1] = iArea->create_pango_layout(Glib::ustring::format(std::fixed, std::setprecision(1), bb)); + layout[2][1] = iArea->create_pango_layout(s3); } int w00, w01, w10, w11, w20, w21, h00, h01, h10, h11, h20, h21; @@ -108,7 +110,6 @@ void LockableColorPicker::updateBackBuffer () const int textPadding = 3; const int textWidth = maxWCol0 + maxWCol1 + textPadding; const int textHeight = maxHRow0 + maxHRow1 + maxHRow2 + 2*textPadding; - const double opacity = 0.62; // --------------------------------------------------------------------- newW = rtengine::max((int)size + 2 * circlePadding, textWidth + 2 * textPadding); @@ -124,7 +125,6 @@ void LockableColorPicker::updateBackBuffer () bbcr->paint (); bbcr->set_operator (Cairo::OPERATOR_OVER); - // for drawing text bbcr->set_antialias (Cairo::ANTIALIAS_SUBPIXEL); bbcr->set_line_width (0.); @@ -154,7 +154,7 @@ void LockableColorPicker::updateBackBuffer () // spot disc with picked color bbcr->arc (center, center, center - circlePadding, 0., 2. * (double)M_PI); - bbcr->set_source_rgb (r, g, b); // <- set the picker color here + bbcr->set_source_rgb (rpreview, gpreview, bpreview); // <- set the picker color here bbcr->set_line_width (0.); bbcr->fill(); @@ -220,15 +220,24 @@ void LockableColorPicker::updateBackBuffer () setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, newW, newH, true); Cairo::RefPtr bbcr = BackBuffer::getContext(); + + // cleaning the back buffer + bbcr->set_source_rgba (0., 0., 0., 0.); + bbcr->set_operator (Cairo::OPERATOR_CLEAR); + bbcr->paint (); + bbcr->set_operator (Cairo::OPERATOR_OVER); + bbcr->set_antialias(Cairo::ANTIALIAS_SUBPIXEL); float center = (float)size / 2.f + circlePadding; + + // light grey circle around the color mark bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)M_PI); - bbcr->set_source_rgb (0., 0., 0.); + bbcr->set_source_rgba (0., 0., 0., opacity); bbcr->set_line_width(circlePadding); bbcr->stroke_preserve(); - bbcr->set_source_rgb (1., 1., 1.); - bbcr->set_line_width(circlePadding - 2.); + bbcr->set_source_rgb (0.75, 0.75, 0.75); + bbcr->set_line_width (circlePadding - 2.); bbcr->stroke (); anchorOffset.set (center, center); @@ -254,7 +263,7 @@ void LockableColorPicker::draw (Cairo::RefPtr &cr) copySurface(cr); } -void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const float R, const float G, const float B) +void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const float R, const float G, float B, const float previewR, const float previewG, const float previewB) { // we're not checking bounds here, this will be done at rendering time position = newPos; @@ -263,12 +272,11 @@ void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const floa g = G; b = B; - float h_, s_, v_; - rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h_, s_, v_); - h = (float)h_; - s = (float)s_; - v = (float)v_; + rpreview = previewR; + gpreview = previewG; + bpreview = previewB; + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h, s, v); rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? if (validity != Validity::OUTSIDE) { @@ -276,7 +284,7 @@ void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const floa } } -void LockableColorPicker::setRGB (const float R, const float G, const float B) +void LockableColorPicker::setRGB (const float R, const float G, const float B, const float previewR, const float previewG, const float previewB) { if (r==R && g==G && b==B) { return; @@ -286,12 +294,11 @@ void LockableColorPicker::setRGB (const float R, const float G, const float B) g = G; b = B; - float h_, s_, v_; - rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h_, s_, v_); - h = (float)h_; - s = (float)s_; - v = (float)v_; + rpreview = previewR; + gpreview = previewG; + bpreview = previewB; + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h, s, v); rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? if (validity != Validity::OUTSIDE) { @@ -374,3 +381,23 @@ void LockableColorPicker::decSize () setDirty(true); } } + +// return true if the picker has to be redrawn +bool LockableColorPicker::cycleRGB () +{ + if (displayedValues == ColorPickerType::RGB) { + setDirty (true); + return true; + } + return false; +} + +// return true if the picker has to be redrawn +bool LockableColorPicker::cycleHSV () +{ + if (displayedValues == ColorPickerType::HSV) { + setDirty (true); + return true; + } + return false; +} diff --git a/rtgui/lockablecolorpicker.h b/rtgui/lockablecolorpicker.h index c42f742c4..467df2d87 100644 --- a/rtgui/lockablecolorpicker.h +++ b/rtgui/lockablecolorpicker.h @@ -66,6 +66,7 @@ private: Glib::ustring *workingProfile; Validity validity; float r, g, b; // red green blue in [0;1] range + float rpreview, gpreview, bpreview; float h, s, v; // hue saturation value in [0;1] range float L, a, bb; // L*a*b value in [0;1] range @@ -79,8 +80,8 @@ public: void draw (Cairo::RefPtr &cr); // Used to update the RGB color, the HSV values will be updated accordingly - void setPosition (const rtengine::Coord &newPos, const float R, const float G, const float B); - void setRGB (const float R, const float G, const float B); + void setPosition (const rtengine::Coord &newPos, const float R, const float G, float B, const float previewR, const float previewG, const float previewB); + void setRGB (const float R, const float G, const float B, const float previewR, const float previewG, const float previewB); void getImagePosition (rtengine::Coord &imgPos); void getScreenPosition (rtengine::Coord &screenPos); Size getSize (); @@ -90,6 +91,8 @@ public: void rollDisplayedValues (); void incSize (); void decSize (); + bool cycleRGB (); + bool cycleHSV (); }; #endif diff --git a/rtgui/navigator.cc b/rtgui/navigator.cc index 0142df49f..2c724ee4c 100644 --- a/rtgui/navigator.cc +++ b/rtgui/navigator.cc @@ -215,6 +215,55 @@ void Navigator::setInvalid (int fullWidth, int fullHeight) LAB_L->set_text (M("NAVIGATOR_NA")); } +void Navigator::getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB) +{ + switch (currentRGBUnit) { + case (Options::NavigatorUnit::R0_1): + sR = Glib::ustring::format(std::fixed, std::setprecision(4), r / 255.f); + sG = Glib::ustring::format(std::fixed, std::setprecision(4), g / 255.f); + sB = Glib::ustring::format(std::fixed, std::setprecision(4), b / 255.f); + break; + case (Options::NavigatorUnit::R0_255): + sR = Glib::ustring::format(std::fixed, std::setprecision(0), r); + sG = Glib::ustring::format(std::fixed, std::setprecision(0), g); + sB = Glib::ustring::format(std::fixed, std::setprecision(0), b); + break; + case (Options::NavigatorUnit::PERCENT): + default: + sR = Glib::ustring::format(std::fixed, std::setprecision(1), r * 100.f / 255.f) + Glib::ustring("%"); + sG = Glib::ustring::format(std::fixed, std::setprecision(1), g * 100.f / 255.f) + Glib::ustring("%"); + sB = Glib::ustring::format(std::fixed, std::setprecision(1), b * 100.f / 255.f) + Glib::ustring("%"); + } +} + +void Navigator::getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV) +{ + switch (currentHSVUnit) { + case (Options::NavigatorUnit::R0_1): + sH = Glib::ustring::format(std::fixed, std::setprecision(4), h); + sS = Glib::ustring::format(std::fixed, std::setprecision(4), s); + sV = Glib::ustring::format(std::fixed, std::setprecision(4), v); + break; + case (Options::NavigatorUnit::R0_255): + sH = Glib::ustring::format(std::fixed, std::setprecision(0), h * 255); + sS = Glib::ustring::format(std::fixed, std::setprecision(0), s * 255); + sV = Glib::ustring::format(std::fixed, std::setprecision(0), v * 255); + break; + case (Options::NavigatorUnit::PERCENT): + default: + sH = Glib::ustring::format(std::fixed, std::setprecision(1), h * 360.f) + Glib::ustring("\xc2\xb0"); + sS = Glib::ustring::format(std::fixed, std::setprecision(1), s * 100.f) + Glib::ustring("%"); + sV = Glib::ustring::format(std::fixed, std::setprecision(1), v * 100.f) + Glib::ustring("%"); + } +} + +void Navigator::getLABText (float l, float a, float b, Glib::ustring &sL, Glib::ustring &sA, Glib::ustring &sB) +{ + sL = Glib::ustring::format(std::fixed, std::setprecision(1), l); + sA = Glib::ustring::format(std::fixed, std::setprecision(1), a); + sB = Glib::ustring::format(std::fixed, std::setprecision(1), b); +} + // if !validPos then x/y contain the full image size void Navigator::pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b) { @@ -222,54 +271,28 @@ void Navigator::pointerMoved (bool validPos, Glib::ustring profile, Glib::ustrin if (!validPos) { setInvalid (x, y); } else { + Glib::ustring s1, s2, s3; + float h, s, v; + float LAB_a, LAB_b, LAB_l; + position->set_text (Glib::ustring::compose ("x: %1, y: %2", x, y)); - switch (currentRGBUnit) { - case (Options::NavigatorUnit::R0_1): - R->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), r / 255.f)); - G->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), g / 255.f)); - B->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), b / 255.f)); - break; - case (Options::NavigatorUnit::R0_255): - R->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), r)); - G->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), g)); - B->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), b)); - break; - case (Options::NavigatorUnit::PERCENT): - default: - R->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), r * 100.f / 255.f) + Glib::ustring("%")); - G->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), g * 100.f / 255.f) + Glib::ustring("%")); - B->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), b * 100.f / 255.f) + Glib::ustring("%")); - break; - } + getRGBText (r, g, b, s1, s2, s3); + R->set_text (s1); + G->set_text (s2); + B->set_text (s3); - float h, s, v; Color::rgb2hsv (r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, h, s, v); - switch (currentHSVUnit) { - case (Options::NavigatorUnit::R0_1): - H->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), h)); - S->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), s)); - V->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), v)); - break; - case (Options::NavigatorUnit::R0_255): - H->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), h * 255)); - S->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), s * 255)); - V->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), v * 255)); - break; - case (Options::NavigatorUnit::PERCENT): - default: - H->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), h * 360.f) + Glib::ustring("\xc2\xb0")); - S->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), s * 100.f) + Glib::ustring("%")); - V->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), v * 100.f) + Glib::ustring("%")); - break; - } + getHSVText (h, s, v, s1, s2, s3); + H->set_text (s1); + S->set_text (s2); + V->set_text (s3); - float LAB_a, LAB_b, LAB_l; - //rgb2lab (r, g, b, LAB_l, LAB_a, LAB_b); Color::rgb2lab (profile, profileW, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, LAB_l, LAB_a, LAB_b, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? - LAB_A->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_a)); - LAB_B->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_b)); - LAB_L->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_l)); + getLABText (LAB_l, LAB_a, LAB_b, s1, s2, s3); + LAB_L->set_text (s1); + LAB_A->set_text (s2); + LAB_B->set_text (s3); } } @@ -299,6 +322,7 @@ void Navigator::cycleUnitsRGB (GdkEventButton *event) { B->set_text ("[%]"); break; } + sig_cycle_rgb.emit(); } void Navigator::cycleUnitsHSV (GdkEventButton *event) { @@ -327,4 +351,5 @@ void Navigator::cycleUnitsHSV (GdkEventButton *event) { V->set_text ("[%]"); break; } + sig_cycle_hsv.emit(); } diff --git a/rtgui/navigator.h b/rtgui/navigator.h index d7b9d2bae..647df7a34 100644 --- a/rtgui/navigator.h +++ b/rtgui/navigator.h @@ -57,6 +57,10 @@ public: // void pointerMoved (bool validPos, int x, int y, int r, int g, int b); void pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b); + void getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB); + void getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV); + void getLABText (float l, float a, float b, Glib::ustring &sL, Glib::ustring &sA, Glib::ustring &sB); + }; #endif diff --git a/rtgui/pointermotionlistener.h b/rtgui/pointermotionlistener.h index 46eb42476..09a9b3b4f 100644 --- a/rtgui/pointermotionlistener.h +++ b/rtgui/pointermotionlistener.h @@ -21,11 +21,26 @@ class PointerMotionListener { +protected: + sigc::signal sig_cycle_rgb; + sigc::signal sig_cycle_hsv; public: -// virtual void pointerMoved (bool validPos, int x, int y, int r, int g, int b) {} + virtual ~PointerMotionListener() {} virtual void pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b) {} virtual void toggleFreeze () {} + virtual void getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB) { sR = "--"; sG = "--"; sB = "--"; } + virtual void getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV) { sH = "--"; sS = "--"; sV = "--"; } + virtual void getLABText (float l, float a, float b, Glib::ustring &sL, Glib::ustring &sA, Glib::ustring &sB) { sL = "--"; sA = "--"; sB = "--"; } + + sigc::signal signal_cycle_rgb() + { + return sig_cycle_rgb; + } + sigc::signal signal_cycle_hsv() + { + return sig_cycle_hsv; + } }; #endif From 103091e2c9079f7b2834e40f99189283d96b44a0 Mon Sep 17 00:00:00 2001 From: Hombre Date: Fri, 7 Oct 2016 02:18:52 +0200 Subject: [PATCH 028/115] Code simplification + bugfix --- rtgui/cropwindow.cc | 57 +++++++++++++++--------------------- rtgui/cropwindow.h | 2 +- rtgui/lockablecolorpicker.cc | 36 +++++------------------ rtgui/lockablecolorpicker.h | 7 ++--- 4 files changed, 36 insertions(+), 66 deletions(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index aa1e8c859..d40486627 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -279,15 +279,11 @@ void CropWindow::scroll (int state, GdkScrollDirection direction, int x, int y) // resizing a color picker if (direction == GDK_SCROLL_UP) { hoveredPicker->incSize(); - rtengine::Coord imgPos; - screenCoordToImage(x, y, imgPos.x, imgPos.y); - updateHoveredPicker(imgPos); + updateHoveredPicker(); iarea->redraw (); }else if (direction == GDK_SCROLL_DOWN) { hoveredPicker->decSize(); - rtengine::Coord imgPos; - screenCoordToImage(x, y, imgPos.x, imgPos.y); - updateHoveredPicker(imgPos); + updateHoveredPicker(); iarea->redraw (); } } else { @@ -352,9 +348,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) if (hoveredPicker) { if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { hoveredPicker->decSize(); - rtengine::Coord imgPos; - screenCoordToImage(x, y, imgPos.x, imgPos.y); - updateHoveredPicker(imgPos); + updateHoveredPicker(); needRedraw = true; } else if (!(bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { hoveredPicker->rollDisplayedValues(); @@ -367,10 +361,10 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) // Add a new Color Picker rtengine::Coord imgPos; screenCoordToImage(x, y, imgPos.x, imgPos.y); - LockableColorPicker *newPicker = new LockableColorPicker(imgPos.x, imgPos.y, LockableColorPicker::Size::S15, 0., 0., 0., this, &cropHandler.colorParams.output, &cropHandler.colorParams.working); + LockableColorPicker *newPicker = new LockableColorPicker(this, &cropHandler.colorParams.output, &cropHandler.colorParams.working); colorPickers.push_back(newPicker); hoveredPicker = newPicker; - updateHoveredPicker(imgPos); + updateHoveredPicker(&imgPos); state = SDragPicker; press_x = x; press_y = y; @@ -502,11 +496,10 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) } } else if (iarea->getToolMode () == TMColorPicker && hoveredPicker) { if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { - hoveredPicker->decSize(); - rtengine::Coord imgPos; - screenCoordToImage(x, y, imgPos.x, imgPos.y); - updateHoveredPicker(imgPos); - needRedraw = true; + if (hoveredPicker->decSize()) { + updateHoveredPicker(); + needRedraw = true; + } } else if (!(bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { hoveredPicker->rollDisplayedValues(); } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { @@ -568,11 +561,10 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) state = SDeletePicker; needRedraw = true; } else if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { - hoveredPicker->incSize(); - rtengine::Coord imgPos; - screenCoordToImage(x, y, imgPos.x, imgPos.y); - updateHoveredPicker(imgPos); - needRedraw = true; + if (hoveredPicker->incSize()) { + updateHoveredPicker(); + needRedraw = true; + } } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { // Deleting the hovered picker for (std::vector::iterator i = colorPickers.begin(); i != colorPickers.end(); i++) { @@ -898,7 +890,7 @@ void CropWindow::pointerMoved (int bstate, int x, int y) action_y = new_action_y; iarea->redraw (); } else if (state == SDragPicker) { - Coord imgPos, cropPos; + Coord imgPos; action_x = x - press_x; action_x = y - press_y; screenCoordToImage (x, y, imgPos.x, imgPos.y); @@ -912,15 +904,7 @@ void CropWindow::pointerMoved (int bstate, int x, int y) }else if (imgPos.y >= iarea->getImProcCoordinator()->getFullHeight()) { imgPos.y = iarea->getImProcCoordinator()->getFullHeight()-1; } - imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); - float r=0.f, g=0.f, b=0.f; - float rpreview=0.f, gpreview=0.f, bpreview=0.f; - LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); - hoveredPicker->setValidity (validity); - if (validity == LockableColorPicker::Validity::INSIDE) { - cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, hoveredPicker->getSize()); - } - hoveredPicker->setPosition (imgPos, r, g, b, rpreview, gpreview, bpreview); + updateHoveredPicker (&imgPos); iarea->redraw (); } else if (state == SNormal && iarea->getToolMode () == TMColorPicker && onArea(ColorPicker, x, y)) { // TODO: we could set the hovered picker as Highlighted here @@ -2071,7 +2055,7 @@ void CropWindow::redrawNeeded (LWButton* button) iarea->redraw (); } -void CropWindow::updateHoveredPicker (rtengine::Coord &imgPos) +void CropWindow::updateHoveredPicker (rtengine::Coord *imgPos) { if (!hoveredPicker) { @@ -2079,9 +2063,16 @@ void CropWindow::updateHoveredPicker (rtengine::Coord &imgPos) } rtengine::Coord cropPos; - imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); float r=0.f, g=0.f, b=0.f; float rpreview=0.f, gpreview=0.f, bpreview=0.f; + if (imgPos) { + imageCoordToCropImage(imgPos->x, imgPos->y, cropPos.x, cropPos.y); + hoveredPicker->setPosition (*imgPos); + } else { + rtengine::Coord imgPos2; + hoveredPicker->getImagePosition(imgPos2); + imageCoordToCropImage(imgPos2.x, imgPos2.y, cropPos.x, cropPos.y); + } LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); hoveredPicker->setValidity (validity); if (validity == LockableColorPicker::Validity::INSIDE) { diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index f976c98b1..eec1b812a 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -103,7 +103,7 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed void drawUnscaledSpotRectangle (Cairo::RefPtr cr, int rectSize); void drawObservedFrame (Cairo::RefPtr cr, int rw = 0, int rh = 0); void changeZoom (int zoom, bool notify = true, int centerx = -1, int centery = -1); - void updateHoveredPicker (rtengine::Coord &imgPos); + void updateHoveredPicker (rtengine::Coord *imgPos = nullptr); void cycleRGB (); void cycleHSV (); diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index 896bdaa2a..b52ad8a0e 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -28,20 +28,11 @@ extern Options options; LockableColorPicker::LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) -: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(Size::S20), +: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(Size::S15), outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), r(0.f), g(0.f), b(0.f), rpreview(0.f), gpreview(0.f), bpreview(0.f), h(0.f), s(0.f), v(0.f), L(0.f), a(0.f), bb(0.f) {} -LockableColorPicker::LockableColorPicker (int x, int y, Size size, const float R, const float G, const float B, CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) -: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(x, y), size(size), - outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), - r(R), g(G), b(B), rpreview(R), gpreview(G), bpreview(B), L(0.f), a(0.f), bb(0.f) -{ - rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h, s, v); - rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? -} - void LockableColorPicker::updateBackBuffer () { int newW, newH; @@ -263,25 +254,10 @@ void LockableColorPicker::draw (Cairo::RefPtr &cr) copySurface(cr); } -void LockableColorPicker::setPosition (const rtengine::Coord &newPos, const float R, const float G, float B, const float previewR, const float previewG, const float previewB) +void LockableColorPicker::setPosition (const rtengine::Coord &newPos) { // we're not checking bounds here, this will be done at rendering time position = newPos; - - r = R; - g = G; - b = B; - - rpreview = previewR; - gpreview = previewG; - bpreview = previewB; - - rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h, s, v); - rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? - - if (validity != Validity::OUTSIDE) { - setDirty(true); - } } void LockableColorPicker::setRGB (const float R, const float G, const float B, const float previewR, const float previewG, const float previewB) @@ -366,20 +342,24 @@ void LockableColorPicker::rollDisplayedValues () } -void LockableColorPicker::incSize () +bool LockableColorPicker::incSize () { if (size < Size::S30) { size = (Size)((int)size + 5); setDirty(true); + return true; } + return false; } -void LockableColorPicker::decSize () +bool LockableColorPicker::decSize () { if (size > Size::S5) { size = (Size)((int)size - 5); setDirty(true); + return true; } + return false; } // return true if the picker has to be redrawn diff --git a/rtgui/lockablecolorpicker.h b/rtgui/lockablecolorpicker.h index 467df2d87..23f381cc2 100644 --- a/rtgui/lockablecolorpicker.h +++ b/rtgui/lockablecolorpicker.h @@ -75,12 +75,11 @@ private: public: LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile); - LockableColorPicker (int x, int y, Size size, const float R, const float G, const float B, CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile); void draw (Cairo::RefPtr &cr); // Used to update the RGB color, the HSV values will be updated accordingly - void setPosition (const rtengine::Coord &newPos, const float R, const float G, float B, const float previewR, const float previewG, const float previewB); + void setPosition (const rtengine::Coord &newPos); void setRGB (const float R, const float G, const float B, const float previewR, const float previewG, const float previewB); void getImagePosition (rtengine::Coord &imgPos); void getScreenPosition (rtengine::Coord &screenPos); @@ -89,8 +88,8 @@ public: void setValidity (Validity isValid); void setSize (Size newSize); void rollDisplayedValues (); - void incSize (); - void decSize (); + bool incSize (); + bool decSize (); bool cycleRGB (); bool cycleHSV (); }; From 1c8d8c6dce0187fbca3b9620d8011ec1dbb9901f Mon Sep 17 00:00:00 2001 From: Hombre Date: Fri, 7 Oct 2016 12:48:20 +0200 Subject: [PATCH 029/115] Small code cleanup --- rtgui/lockablecolorpicker.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index b52ad8a0e..698b9c064 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -38,8 +38,8 @@ void LockableColorPicker::updateBackBuffer () int newW, newH; // -------------------- setting some key constants --------------------- - const float circlePadding = 3.f; // keep this value odd - const double opacity = 0.62; + constexpr float circlePadding = 3.f; // keep this value odd + constexpr double opacity = 0.62; // --------------------------------------------------------------------- if (validity == Validity::INSIDE) { @@ -98,7 +98,7 @@ void LockableColorPicker::updateBackBuffer () int maxHRow2 = rtengine::max(h20, h21); // -------------------- setting some key constants --------------------- - const int textPadding = 3; + constexpr int textPadding = 3; const int textWidth = maxWCol0 + maxWCol1 + textPadding; const int textHeight = maxHRow0 + maxHRow1 + maxHRow2 + 2*textPadding; // --------------------------------------------------------------------- @@ -334,7 +334,7 @@ LockableColorPicker::Size LockableColorPicker::getSize () void LockableColorPicker::rollDisplayedValues () { if (displayedValues < ColorPickerType::LAB) { - displayedValues = (ColorPickerType)((int)displayedValues + 1); + displayedValues = (ColorPickerType)(rtengine::toUnderlying(displayedValues) + 1); } else { displayedValues = ColorPickerType::RGB; } @@ -345,7 +345,7 @@ void LockableColorPicker::rollDisplayedValues () bool LockableColorPicker::incSize () { if (size < Size::S30) { - size = (Size)((int)size + 5); + size = (Size)(rtengine::toUnderlying(size) + 5); setDirty(true); return true; } @@ -355,7 +355,7 @@ bool LockableColorPicker::incSize () bool LockableColorPicker::decSize () { if (size > Size::S5) { - size = (Size)((int)size - 5); + size = (Size)(rtengine::toUnderlying(size) - 5); setDirty(true); return true; } From 222b8a7562606312761c97dabbe6063c2f7d8c12 Mon Sep 17 00:00:00 2001 From: Hombre Date: Fri, 7 Oct 2016 14:38:22 +0200 Subject: [PATCH 030/115] Bugfix: Pickers wasn't displayed after a Detail window move See issue #1812 --- rtgui/cropwindow.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index d40486627..f59f9eb81 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -613,6 +613,10 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } needRedraw = true; + } else if (state == SCropWinMove) { + if (iarea->showColorPickers () && !colorPickers.empty()) { + needRedraw = true; + } } else if (state == SCropImgMove) { cropHandler.update (); @@ -1275,6 +1279,8 @@ void CropWindow::expose (Cairo::RefPtr cr) { MyMutex::MyLock lock(cropHandler.cimg); + bool isPreviewImg = false; + if (decorated) { drawDecoration (cr); } @@ -1787,6 +1793,8 @@ void CropWindow::expose (Cairo::RefPtr cr) } } + + isPreviewImg = true; } else { // cropHandler.cropPixbuf is null int cropX, cropY; @@ -1821,7 +1829,7 @@ void CropWindow::expose (Cairo::RefPtr cr) } } - if ((state == SNormal || state == SDragPicker) && iarea->showColorPickers()) { + if ((state == SNormal || state == SDragPicker) && isPreviewImg && iarea->showColorPickers()) { for (auto colorPicker : colorPickers) { colorPicker->draw(cr); } From e16b2407bdee4e3d60921f29b853b4ab594e93ed Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 8 Oct 2016 00:44:59 +0200 Subject: [PATCH 031/115] Bugfix: double click to zoom in/out now effective over Pickers when the Color Picker mode is off. see issue #1812 --- rtgui/cropwindow.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index f59f9eb81..ca33a1b69 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -310,7 +310,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) iarea->grabFocus (this); if (button == 1) { - if (type == GDK_2BUTTON_PRESS && onArea (CropImage, x, y) && !onArea (ColorPicker, x, y) && (state == SNormal || state == SCropImgMove)) { + if (type == GDK_2BUTTON_PRESS && onArea (CropImage, x, y) && iarea->getToolMode () != TMColorPicker && (state == SNormal || state == SCropImgMove)) { if (fitZoomEnabled) { if (fitZoom) { state = SNormal; From d132149a2661c4036b87fd951349dd79a1cec90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sat, 8 Oct 2016 15:36:44 +0200 Subject: [PATCH 032/115] Introduce `rtengine/noncopyable.hpp` --- rtengine/EdgePreservingDecomposition.h | 10 +++++--- rtengine/LUT.h | 10 +++++--- rtengine/array2D.h | 7 +++--- rtengine/cieimage.h | 6 ++--- rtengine/clutstore.h | 12 ++++----- rtengine/cplx_wavelet_dec.h | 8 +++--- rtengine/dcp.h | 11 ++++---- rtengine/jaggedarray.h | 14 ++++------- rtengine/noncopyable.h | 34 +++++++++++++++++++++++++ rtengine/procparams.h | 6 +++-- rtengine/rawimage.h | 7 +++--- rtengine/shmap.h | 6 ++--- rtexif/rtexif.h | 6 +++-- rtgui/cachemanager.h | 11 +++----- rtgui/previewloader.cc | 5 ++-- rtgui/previewloader.h | 20 ++++++++++----- rtgui/profilestore.h | 11 +++++--- rtgui/threadutils.h | 35 ++++++++++---------------- rtgui/thumbimageupdater.cc | 6 ++--- rtgui/thumbimageupdater.h | 22 +++++++++------- 20 files changed, 142 insertions(+), 105 deletions(-) create mode 100644 rtengine/noncopyable.h diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index a369bdf4d..a9038355e 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -50,17 +50,19 @@ My email address is my screen name followed by @yahoo.com. I'm also known as ben #include #include #include + #include "opthelper.h" +#include "noncopyable.h" //This is for solving big symmetric positive definite linear problems. float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = NULL, float RMSResidual = 0.0f, void *Pass = NULL, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = NULL); //Storage and use class for symmetric matrices, the nonzero contents of which are confined to diagonals. -class MultiDiagonalSymmetricMatrix +class MultiDiagonalSymmetricMatrix : + public rtengine::NonCopyable { public: MultiDiagonalSymmetricMatrix(int Dimension, int NumberOfDiagonalsInLowerTriangle); - MultiDiagonalSymmetricMatrix(const MultiDiagonalSymmetricMatrix&) = delete; ~MultiDiagonalSymmetricMatrix(); /* Storage of matrix data, and a function to create memory for Diagonals[index]. @@ -115,11 +117,11 @@ public: }; -class EdgePreservingDecomposition +class EdgePreservingDecomposition : + public rtengine::NonCopyable { public: EdgePreservingDecomposition(int width, int height); - EdgePreservingDecomposition(const EdgePreservingDecomposition&) = delete; ~EdgePreservingDecomposition(); //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. diff --git a/rtengine/LUT.h b/rtengine/LUT.h index c570fe671..2d3d91ed5 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -61,13 +61,16 @@ #include #include +#include + #ifndef NDEBUG #include #include #endif + #include "opthelper.h" -#include #include "rt_math.h" +#include "noncopyable.h" // Bit representations of flags enum { @@ -85,7 +88,8 @@ using LUTd = LUT; using LUTuc = LUT; template -class LUT +class LUT : + public rtengine::NonCopyable { protected: // list of variables ordered to improve cache speed @@ -167,8 +171,6 @@ public: reset(); } - LUT(const LUT&) = delete; - ~LUT() { if (owner) { diff --git a/rtengine/array2D.h b/rtengine/array2D.h index 75d784cbc..db44fcfc8 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -66,8 +66,11 @@ #include #include +#include "noncopyable.h" + template -class array2D +class array2D : + public rtengine::NonCopyable { private: @@ -167,8 +170,6 @@ public: } } - array2D(const array2D&) = delete; - // destructor ~array2D() { diff --git a/rtengine/cieimage.h b/rtengine/cieimage.h index d8cf45cf8..23b080ae3 100644 --- a/rtengine/cieimage.h +++ b/rtengine/cieimage.h @@ -20,11 +20,13 @@ #define _CIEIMAGE_H_ #include "image16.h" +#include "noncopyable.h" namespace rtengine { -class CieImage +class CieImage : + public NonCopyable { private: bool fromImage; @@ -41,8 +43,6 @@ public: float** h_p; CieImage (int w, int h); - CieImage (const CieImage&) = delete; - ~CieImage (); //Copies image data in Img into this instance. diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index 7383b597f..5e4930fa1 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -7,16 +7,16 @@ #include "cache.h" #include "alignedbuffer.h" +#include "noncopyable.h" namespace rtengine { -class HaldCLUT +class HaldCLUT final : + public NonCopyable { public: HaldCLUT(); - HaldCLUT(const HaldCLUT& other) = delete; - HaldCLUT& operator =(const HaldCLUT& other) = delete; ~HaldCLUT(); bool load(const Glib::ustring& filename); @@ -51,14 +51,12 @@ private: Glib::ustring clut_profile; }; -class CLUTStore +class CLUTStore final : + public NonCopyable { public: static CLUTStore& getInstance(); - CLUTStore(const CLUTStore& other) = delete; - CLUTStore& operator =(const CLUTStore& other) = delete; - std::shared_ptr getClut(const Glib::ustring& filename); void clearCache(); diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index c5267897c..bc8b7bdd3 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -22,15 +22,17 @@ #define CPLX_WAVELET_DEC_H_INCLUDED #include -#include +#include #include "cplx_wavelet_level.h" #include "cplx_wavelet_filter_coeffs.h" +#include "noncopyable.h" namespace rtengine { -class wavelet_decomposition +class wavelet_decomposition : + public NonCopyable { public: @@ -58,8 +60,6 @@ public: template wavelet_decomposition(E * src, int width, int height, int maxlvl, int subsampling, int skipcrop = 1, int numThreads = 1, int Daub4Len = 6); - wavelet_decomposition(const wavelet_decomposition&) = delete; - ~wavelet_decomposition(); internal_type ** level_coeffs(int level) const diff --git a/rtengine/dcp.h b/rtengine/dcp.h index ffc1e33ce..8b781ce6b 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -26,11 +26,12 @@ #include +#include "../rtgui/threadutils.h" + #include "imagefloat.h" #include "curves.h" #include "colortemp.h" - -#include "../rtgui/threadutils.h" +#include "noncopyable.h" namespace rtengine { @@ -145,14 +146,12 @@ private: AdobeToneCurve tone_curve; }; -class DCPStore final +class DCPStore final : + public NonCopyable { public: static DCPStore* getInstance(); - DCPStore(const DCPStore& other) = delete; - DCPStore& operator =(const DCPStore& other) = delete; - void init(const Glib::ustring& rt_profile_dir); bool isValidDCPFileName(const Glib::ustring& filename) const; diff --git a/rtengine/jaggedarray.h b/rtengine/jaggedarray.h index 4d01747da..153ed2902 100644 --- a/rtengine/jaggedarray.h +++ b/rtengine/jaggedarray.h @@ -17,8 +17,9 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#ifndef JAGGEDARRAY_H -#define JAGGEDARRAY_H +#pragma once + +#include "noncopyable.h" namespace rtengine { @@ -50,7 +51,8 @@ inline void freeJaggedArray (T** const a) } template -class JaggedArray +class JaggedArray : + public NonCopyable { public: JaggedArray (const int W, const int H, const bool initZero = false) @@ -65,10 +67,6 @@ public: } } - JaggedArray (const JaggedArray&) = delete; - JaggedArray& operator= (const JaggedArray&) = delete; - -public: operator T** const () const { return a; @@ -85,5 +83,3 @@ template void freeJaggedArray (JaggedArray&); } // rtengine - -#endif // JAGGEDARRAY_H diff --git a/rtengine/noncopyable.h b/rtengine/noncopyable.h new file mode 100644 index 000000000..d34c42441 --- /dev/null +++ b/rtengine/noncopyable.h @@ -0,0 +1,34 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2016 Flössie + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#pragma once + +namespace rtengine +{ + +class NonCopyable +{ +public: + NonCopyable() = default; + + explicit NonCopyable(const NonCopyable&) = delete; + NonCopyable& operator =(const NonCopyable&) = delete; +}; + +} diff --git a/rtengine/procparams.h b/rtengine/procparams.h index cf02b9f10..d51c032c0 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -19,11 +19,13 @@ #ifndef _PROCPARAMS_H_ #define _PROCPARAMS_H_ -#include #include #include #include + +#include #include + #include "LUT.h" #include "coord.h" @@ -1363,7 +1365,7 @@ class PartialProfile public: rtengine::procparams::ProcParams* pparams; ParamsEdited* pedited; - PartialProfile& operator=(PartialProfile& rhs) + PartialProfile& operator =(const PartialProfile& rhs) { pparams = rhs.pparams; pedited = rhs.pedited; diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 26ddbfd1b..45e67cbac 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -20,8 +20,10 @@ #define __RAWIMAGE_H #include + #include "dcraw.h" #include "imageio.h" +#include "noncopyable.h" namespace rtengine { @@ -32,7 +34,8 @@ struct badPix { badPix( uint16_t xc, uint16_t yc ): x(xc), y(yc) {} }; -class PixelsMap +class PixelsMap : + public NonCopyable { int w; // line width in base_t units int h; // height @@ -49,8 +52,6 @@ public: memset(pm, 0, h * w * base_t_size ); } - PixelsMap(const PixelsMap&) = delete; - ~PixelsMap() { delete [] pm; diff --git a/rtengine/shmap.h b/rtengine/shmap.h index 990193378..9bb496b54 100644 --- a/rtengine/shmap.h +++ b/rtengine/shmap.h @@ -21,11 +21,13 @@ #include "imagefloat.h" #include "image16.h" +#include "noncopyable.h" namespace rtengine { -class SHMap +class SHMap : + public NonCopyable { public: @@ -33,8 +35,6 @@ public: float max_f, min_f, avg; SHMap (int w, int h, bool multiThread); - SHMap(const SHMap&) = delete; - ~SHMap (); void update (Imagefloat* img, double radius, double lumi[3], bool hq, int skip); diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index ea57ada73..02d357a5d 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -28,7 +28,9 @@ #include #include #include + #include "../rtengine/procparams.h" +#include "../rtengine/noncopyable.h" class CacheImageData; @@ -178,7 +180,8 @@ public: }; // a class representing a single tag -class Tag +class Tag : + public rtengine::NonCopyable { protected: @@ -202,7 +205,6 @@ public: Tag (TagDirectory* parent, const TagAttrib* attr, unsigned char *data, TagType t); Tag (TagDirectory* parent, const TagAttrib* attr, int data, TagType t); // create a new tag from array (used Tag (TagDirectory* parent, const TagAttrib* attr, const char* data); // create a new tag from array (used - Tag(const Tag&) = delete; ~Tag (); void initType (unsigned char *data, TagType type); diff --git a/rtgui/cachemanager.h b/rtgui/cachemanager.h index 4460204cc..99c732e88 100644 --- a/rtgui/cachemanager.h +++ b/rtgui/cachemanager.h @@ -24,11 +24,14 @@ #include +#include "../rtengine/noncopyable.h" + #include "threadutils.h" class Thumbnail; -class CacheManager +class CacheManager : + public rtengine::NonCopyable { private: using Entries = std::map; @@ -41,12 +44,7 @@ private: void applyCacheSizeLimitation () const; - CacheManager () = default; - CacheManager (const CacheManager&) = delete; - CacheManager& operator= (const CacheManager&) = delete; - public: - static CacheManager* getInstance (); void init (); @@ -69,7 +67,6 @@ public: const Glib::ustring& fname, const Glib::ustring& fext, const Glib::ustring& md5) const; - }; #define cacheMgr CacheManager::getInstance() diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index e7b37cac6..c38fed49d 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -29,7 +29,8 @@ #define DEBUG(format,args...) //#define DEBUG(format,args...) printf("PreviewLoader::%s: " format "\n", __FUNCTION__, ## args) -class PreviewLoader::Impl +class PreviewLoader::Impl : + public rtengine::NonCopyable { public: struct Job { @@ -81,8 +82,6 @@ public: threadPool_ = new Glib::ThreadPool(threadCount, 0); } - Impl(const Impl&) = delete; - Glib::ThreadPool* threadPool_; MyMutex mutex_; JobSet jobs_; diff --git a/rtgui/previewloader.h b/rtgui/previewloader.h index 05669d399..d5207cd44 100644 --- a/rtgui/previewloader.h +++ b/rtgui/previewloader.h @@ -21,11 +21,17 @@ #include #include + +#include "../rtengine/noncopyable.h" + #include "filebrowserentry.h" class PreviewLoaderListener { public: + virtual ~PreviewLoaderListener() + { + } /** * @brief a preview is ready @@ -33,20 +39,22 @@ public: * @param dir_id directory ID this is for * @param fd entry */ - virtual void previewReady (int dir_id, FileBrowserEntry* fd) {} + virtual void previewReady(int dir_id, FileBrowserEntry* fd) + { + } /** * @brief all previews have finished loading */ - virtual void previewsFinished (int dir_id_) {} + virtual void previewsFinished(int dir_id_) + { + } }; -class PreviewLoader +class PreviewLoader : + public rtengine::NonCopyable { public: - - PreviewLoader(const PreviewLoader&) = delete; - /** * @brief Singleton entry point. * diff --git a/rtgui/profilestore.h b/rtgui/profilestore.h index 0304db330..05a0a3797 100644 --- a/rtgui/profilestore.h +++ b/rtgui/profilestore.h @@ -21,11 +21,14 @@ #include #include +#include + #include "../rtengine/rtengine.h" +#include "../rtengine/noncopyable.h" + #include "threadutils.h" #include "paramsedited.h" #include "guiutils.h" -#include /** @brief This will implement callback functions for the ProfileStore @@ -118,7 +121,8 @@ public: * This store can be queried by the GUI to display a Tree of the profiles available * in the user's and system's profile directory and subdirectories. */ -class ProfileStore +class ProfileStore : + public rtengine::NonCopyable { typedef enum { @@ -176,9 +180,8 @@ private: public: ProfileStore(); - ProfileStore (const ProfileStore&) = delete; - ~ProfileStore(); + bool init (); void parseProfiles (); int findFolderId(const Glib::ustring &path); diff --git a/rtgui/threadutils.h b/rtgui/threadutils.h index 03203db82..1215d53a1 100644 --- a/rtgui/threadutils.h +++ b/rtgui/threadutils.h @@ -27,6 +27,8 @@ #include +#include "../rtengine/noncopyable.h" + #if STRICT_MUTEX && NDEBUG using MyMutexBase = Glib::Threads::Mutex; #else @@ -41,15 +43,13 @@ using MyMutexBase = Glib::Threads::RecMutex; * It will behave like Glib::Threads::RecMutex (STRICT_MUTEX=0) or Glib::Threads::Mutex (STRICT_MUTEX=1). * Debug builds with strict mutexes, will emit a message and crash immediately upon recursive locking. */ -class MyMutex : private MyMutexBase +class MyMutex : + public rtengine::NonCopyable, + private MyMutexBase { public: class MyLock; - MyMutex () = default; - MyMutex (const MyMutex&) = delete; - MyMutex& operator= (const MyMutex&) = delete; - void lock (); bool trylock (); void unlock (); @@ -62,7 +62,8 @@ private: #endif }; -class MyMutex::MyLock +class MyMutex::MyLock : + public rtengine::NonCopyable { public: explicit MyLock (MyMutex& mutex); @@ -71,9 +72,6 @@ public: ~MyLock (); - MyLock (const MyLock&) = delete; - MyLock& operator= (const MyLock&) = delete; - void acquire (); bool try_acquire (); void release (); @@ -86,13 +84,10 @@ private: /** * @brief Custom implementation to replace Glib::Threads::RWLock */ -class MyRWMutex +class MyRWMutex : + public rtengine::NonCopyable { public: - MyRWMutex () = default; - MyRWMutex (const MyRWMutex&) = delete; - MyRWMutex& operator= (const MyRWMutex&) = delete; - friend class MyReaderLock; friend class MyWriterLock; @@ -113,14 +108,12 @@ private: /** * @brief Custom implementation to replace Glib::Threads::RWLock::ReaderLock */ -class MyReaderLock +class MyReaderLock : + public rtengine::NonCopyable { public: ~MyReaderLock (); - MyReaderLock (const MyReaderLock&) = delete; - MyReaderLock& operator= (const MyReaderLock&) = delete; - #if !TRACE_MYRWMUTEX explicit MyReaderLock (MyRWMutex& mutex); @@ -141,14 +134,12 @@ private: /** * @brief Custom implementation to replace Glib::Threads::RWLock::WriterLock */ -class MyWriterLock +class MyWriterLock : + public rtengine::NonCopyable { public: ~MyWriterLock (); - MyWriterLock (const MyWriterLock&) = delete; - MyWriterLock& operator= (const MyWriterLock&) = delete; - #if !TRACE_MYRWMUTEX explicit MyWriterLock (MyRWMutex& mutex); diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index a247af5f8..39711a5ae 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -30,8 +30,8 @@ #define DEBUG(format,args...) //#define DEBUG(format,args...) printf("ThumbImageUpdate::%s: " format "\n", __FUNCTION__, ## args) -class - ThumbImageUpdater::Impl +class ThumbImageUpdater::Impl : + public rtengine::NonCopyable { public: @@ -78,8 +78,6 @@ public: threadPool_ = new Glib::ThreadPool(threadCount, 0); } - Impl(const Impl&) = delete; - Glib::ThreadPool* threadPool_; // Need to be a Glib::Threads::Mutex because used in a Glib::Threads::Cond object... diff --git a/rtgui/thumbimageupdater.h b/rtgui/thumbimageupdater.h index 8d1fc2cc5..3b34c9456 100644 --- a/rtgui/thumbimageupdater.h +++ b/rtgui/thumbimageupdater.h @@ -20,14 +20,19 @@ #define _THUMBIMAGEUPDATER_ #include -#include "../rtengine/rtengine.h" -#include "thumbbrowserentrybase.h" #include +#include "../rtengine/rtengine.h" +#include "../rtengine/noncopyable.h" + +#include "thumbbrowserentrybase.h" + class ThumbImageUpdateListener { - public: + virtual ~ThumbImageUpdateListener() + { + } /** * @brief Called when thumbnail image is update @@ -38,16 +43,15 @@ public: * * @note no locks are held when called back */ - virtual void updateImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams) {} + virtual void updateImage(rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams) + { + } }; -class ThumbImageUpdater +class ThumbImageUpdater : + public rtengine::NonCopyable { - public: - - ThumbImageUpdater(const ThumbImageUpdater&) = delete; - /** * @brief Singleton entry point. * From 967b1a2ea97a8cbf68efd7aab1b262f7cb6e85e2 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Mon, 10 Oct 2016 00:18:40 +0200 Subject: [PATCH 033/115] Create .travis.yml Initial Travis Continuous Integration support, using the Ubuntu 14.04 Trusty Tahr environment. --- .travis.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..0da13a01a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,37 @@ +sudo: required +dist: trusty + +language: cpp + +compiler: + - gcc + +os: + - linux + +branches: + only: + - master + +notifications: + email: false + irc: + channels: + - "chat.freenode.net#rawtherapee" + template: + - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}" + +env: + global: + - OMP_NUM_THREADS=4 + +before_install: + - sudo apt-get -qq update + - sudo apt-get install build-essential cmake curl git libbz2-dev libcanberra-gtk-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk2.0-dev libgtkmm-2.4-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev + +before_script: + - mkdir build + - cd build + - cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DWITH_LTO="OFF" -DPROC_TARGET_NUMBER="2" + +script: make From 252e50085e5d513dcb7ad13267603ed0282815d3 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Mon, 10 Oct 2016 00:22:22 +0200 Subject: [PATCH 034/115] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0da13a01a..021177c02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,6 @@ before_install: before_script: - mkdir build - cd build - - cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DWITH_LTO="OFF" -DPROC_TARGET_NUMBER="2" + - cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DWITH_LTO="OFF" -DPROC_TARGET_NUMBER="2" .. script: make From fdc50d4837223e60c4fba90a301b0cb2c97b625a Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 10 Oct 2016 00:50:04 +0200 Subject: [PATCH 035/115] Removed .travis.yml, use "travis" branch. --- .travis.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 021177c02..000000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -sudo: required -dist: trusty - -language: cpp - -compiler: - - gcc - -os: - - linux - -branches: - only: - - master - -notifications: - email: false - irc: - channels: - - "chat.freenode.net#rawtherapee" - template: - - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}" - -env: - global: - - OMP_NUM_THREADS=4 - -before_install: - - sudo apt-get -qq update - - sudo apt-get install build-essential cmake curl git libbz2-dev libcanberra-gtk-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk2.0-dev libgtkmm-2.4-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev - -before_script: - - mkdir build - - cd build - - cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DWITH_LTO="OFF" -DPROC_TARGET_NUMBER="2" .. - -script: make From 3781d3cc16e153b8153ce76d6742ca27b94e8cc2 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 10 Oct 2016 14:37:11 +0200 Subject: [PATCH 036/115] Added .travis.yml for GCC-6 build testing of master, #3451 --- .travis.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..541ebc997 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +sudo: required +dist: trusty + +language: cpp + +compiler: + - gcc + +os: + - linux + +branches: + only: + - travis + +notifications: + email: false + irc: + channels: + - "chat.freenode.net#rawtherapee" + template: + - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}" + email: + on_success: change + on_failure: always + +env: + global: + - OMP_NUM_THREADS=4 + +before_install: + - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + - sudo apt-get -qq update + - sudo apt-get install build-essential cmake curl g++-6 gcc-6 git libbz2-dev libcanberra-gtk-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk2.0-dev libgtkmm-2.4-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev + - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 + +before_script: + - mkdir build + - cd build + - cmake -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" -DWITH_LTO="OFF" -DPROC_TARGET_NUMBER="2" .. + +script: make From 78c5cdd1ca758d1b3e78b1e2b577a98440f91ac2 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Mon, 10 Oct 2016 14:41:43 +0200 Subject: [PATCH 037/115] Set Travis to for master only with email --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 541ebc997..6ef54e62a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,9 @@ os: branches: only: - - travis + - master notifications: - email: false irc: channels: - "chat.freenode.net#rawtherapee" From c7cf196ae15c11f8ff169da98626d76712eb6d52 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 10 Oct 2016 15:03:45 +0200 Subject: [PATCH 038/115] Fix a cppcheck style issue to test Travis --- rtengine/median.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/median.h b/rtengine/median.h index d7a6b37de..971452bc3 100644 --- a/rtengine/median.h +++ b/rtengine/median.h @@ -45,7 +45,7 @@ inline T median(std::array array) std::nth_element(array.begin(), middle, array.end()); return - N % 2 + (N % 2) ? *middle : ((*middle + *std::max_element(array.begin(), middle)) / static_cast(2)); } From 0821eea7b6a4ac2fce1fcf644e06078e161e41e3 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 10 Oct 2016 16:28:44 +0200 Subject: [PATCH 039/115] Cppcheck: Fixed 2 issues introduced with merge of lockable colour picker --- rtgui/cropwindow.cc | 2 +- rtgui/lockablecolorpicker.cc | 6 +++--- rtgui/lockablecolorpicker.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index ca33a1b69..f7d7c3001 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -567,7 +567,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) } } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { // Deleting the hovered picker - for (std::vector::iterator i = colorPickers.begin(); i != colorPickers.end(); i++) { + for (std::vector::iterator i = colorPickers.begin(); i != colorPickers.end(); ++i) { if (*i == hoveredPicker) { colorPickers.erase(i); delete hoveredPicker; diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index 698b9c064..abfb94344 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -30,7 +30,7 @@ extern Options options; LockableColorPicker::LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) : cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(Size::S15), outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), - r(0.f), g(0.f), b(0.f), rpreview(0.f), gpreview(0.f), bpreview(0.f), h(0.f), s(0.f), v(0.f), L(0.f), a(0.f), bb(0.f) + r(0.f), g(0.f), b(0.f), rpreview(0.f), gpreview(0.f), bpreview(0.f), hue(0.f), sat(0.f), val(0.f), L(0.f), a(0.f), bb(0.f) {} void LockableColorPicker::updateBackBuffer () @@ -65,7 +65,7 @@ void LockableColorPicker::updateBackBuffer () layout[2][1] = iArea->create_pango_layout(s3); break; case ColorPickerType::HSV: - navigator->getHSVText (h, s, v, s1, s2, s3); + navigator->getHSVText (hue, sat, val, s1, s2, s3); layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_H")); layout[0][1] = iArea->create_pango_layout(s1); layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_S")); @@ -274,7 +274,7 @@ void LockableColorPicker::setRGB (const float R, const float G, const float B, c gpreview = previewG; bpreview = previewB; - rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, h, s, v); + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, hue, sat, val); rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? if (validity != Validity::OUTSIDE) { diff --git a/rtgui/lockablecolorpicker.h b/rtgui/lockablecolorpicker.h index 23f381cc2..308f5d6d5 100644 --- a/rtgui/lockablecolorpicker.h +++ b/rtgui/lockablecolorpicker.h @@ -67,7 +67,7 @@ private: Validity validity; float r, g, b; // red green blue in [0;1] range float rpreview, gpreview, bpreview; - float h, s, v; // hue saturation value in [0;1] range + float hue, sat, val; // hue saturation value in [0;1] range float L, a, bb; // L*a*b value in [0;1] range void updateBackBuffer (); From b8eb3492c9db1365a7b596dbd3cd48e00f4b6a94 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 10 Oct 2016 17:10:31 +0200 Subject: [PATCH 040/115] colour picker died when crop tool was activated while colour picker was active --- rtgui/toolbar.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index c3b1cae1d..86604863e 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -438,7 +438,7 @@ void ToolBar::crop_pressed () bool cropWasBlocked = cropConn.block (true); bool wbWasBlocked = true, cpWasBlocked = true; if (colPickerTool) { - cpConn.block(true); + cpWasBlocked = cpConn.block(true); } if (wbTool) { From a989d440b1ac55645b8caefb6bfec943fd5ca3ef Mon Sep 17 00:00:00 2001 From: Hombre Date: Mon, 10 Oct 2016 23:48:39 +0200 Subject: [PATCH 041/115] Bugfix : RT was crashing if Soft-proofing activated w/ "No ICM" output See issue #3406 --- rtengine/improcfun.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 4855cd21a..5795ed32b 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -90,7 +90,7 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con bool softProofCreated = false; if (softProof) { - cmsHPROFILE oprof; + cmsHPROFILE oprof = nullptr; if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 GammaValues ga; iccStore->getGammaArray(icm, ga); From ff64e656bc084916844891298934e45618a3cb12 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 11 Oct 2016 09:39:14 +0200 Subject: [PATCH 042/115] Sets Wavelet sub-tools to "off" by default, #3386 --- rtengine/procparams.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 70b764da1..0b4d2a5b6 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -753,13 +753,13 @@ void WaveletParams::setDefaults() hhcurve.push_back(FCT_Linear); Chcurve.clear (); Chcurve.push_back(FCT_Linear); - expcontrast = true; - expchroma = true; - expedge = true; - expresid = true; - expfinal = true; - exptoning = true; - expnoise = true; + expcontrast = false; + expchroma = false; + expedge = false; + expresid = false; + expfinal = false; + exptoning = false; + expnoise = false; for(int i = 0; i < 9; i ++) { c[i] = 0; From e902091fe9f9d1356ddef7c78c0813bb66055e93 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 11 Oct 2016 09:46:42 +0200 Subject: [PATCH 043/115] =?UTF-8?q?Fix=20crash=20when=20toggling=20Before|?= =?UTF-8?q?After=20view,=20by=20Fl=C3=B6ssie,=20fixes=20#3454?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtgui/cropwindow.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index f7d7c3001..a4d7ded47 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -2535,8 +2535,10 @@ void CropWindow::setCropGUIListener (CropGUIListener* cgl) void CropWindow::setPointerMotionListener (PointerMotionListener* pml) { pmlistener = pml; - pml->signal_cycle_rgb().connect( sigc::mem_fun(*this, &CropWindow::cycleRGB) ); - pml->signal_cycle_hsv().connect( sigc::mem_fun(*this, &CropWindow::cycleHSV) ); + if (pml) { + pml->signal_cycle_rgb().connect( sigc::mem_fun(*this, &CropWindow::cycleRGB) ); + pml->signal_cycle_hsv().connect( sigc::mem_fun(*this, &CropWindow::cycleHSV) ); + } } PointerMotionListener* CropWindow::getPointerMotionListener () From 554bbf18933a43ca90bc6fbbe6dbe9f48247b999 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 11 Oct 2016 22:08:03 +0200 Subject: [PATCH 044/115] Deleted clean.sh --- clean.sh | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100755 clean.sh diff --git a/clean.sh b/clean.sh deleted file mode 100755 index 5500bf28e..000000000 --- a/clean.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -find -name CMakeCache.txt -delete -rm install_manifest.txt - -rm -r ./CMakeFiles -rm -r ./rtengine/CMakeFiles -rm -r ./rtexif/CMakeFiles -rm -r ./rtgui/CMakeFiles -rm -r ./rtdata/CMakeFiles - -rm ./cmake* -rm ./rtengine/cmake* -rm ./rtexif/cmake* -rm ./rtgui/cmake* -rm ./rtdata/cmake* - -rm ./Makefile -rm ./rtengine/Makefile -rm ./rtexif/Makefile -rm ./rtgui/Makefile -rm ./rtdata/Makefile - -rm ./rtengine/librtengine.so -rm ./rtengine/librtengine.a -rm ./rtgui/rawtherapee -rm ./rtexif/librtexif.so -rm ./rtexif/librtexif.a -exit 0 From 81c5b1ca4197f39ddfd9c98b204c63da235cbb2d Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 11 Oct 2016 23:21:41 +0200 Subject: [PATCH 045/115] Cancelling a 32 bits Tiff workaround, now the Gamma value from embedded ICC profile is correctly handled --- rtengine/imageio.cc | 88 +++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 55 deletions(-) diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index a9be4e7e3..48d9d81b6 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -771,39 +771,39 @@ int ImageIO::loadTIFF (Glib::ustring fname) * We could use the min/max values set in TIFFTAG_SMINSAMPLEVALUE and * TIFFTAG_SMAXSAMPLEVALUE, but for now, we normalize the image to the * effective minimum and maximum values - * - printf("Informations de \"%s\":\n", fname.c_str()); - uint16 tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; - if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) { - printf(" DefaultScale: %d\n", tiffDefaultScale); - } - else - printf(" No DefaultScale value!\n"); - if (TIFFGetField(in, TIFFTAG_BASELINEEXPOSURE, &tiffBaselineExposure)) { - printf(" BaselineExposure: %d\n", tiffBaselineExposure); - } - else - printf(" No BaselineExposure value!\n"); - if (TIFFGetField(in, TIFFTAG_LINEARRESPONSELIMIT, &tiffLinearResponseLimit)) { - printf(" LinearResponseLimit: %d\n", tiffLinearResponseLimit); - } - else - printf(" No LinearResponseLimit value!\n"); + */ + if (options.rtSettings.verbose) { + printf("Informations of \"%s\":\n", fname.c_str()); + uint16 tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; + if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) { + printf(" DefaultScale: %d\n", tiffDefaultScale); + } + else + printf(" No DefaultScale value!\n"); + if (TIFFGetField(in, TIFFTAG_BASELINEEXPOSURE, &tiffBaselineExposure)) { + printf(" BaselineExposure: %d\n", tiffBaselineExposure); + } + else + printf(" No BaselineExposure value!\n"); + if (TIFFGetField(in, TIFFTAG_LINEARRESPONSELIMIT, &tiffLinearResponseLimit)) { + printf(" LinearResponseLimit: %d\n", tiffLinearResponseLimit); + } + else + printf(" No LinearResponseLimit value!\n"); - uint16 tiffMinValue, tiffMaxValue; - if (TIFFGetField(in, TIFFTAG_SMINSAMPLEVALUE, &tiffMinValue)) { - printf(" MinValue: %d\n", tiffMinValue); + uint16 tiffMinValue, tiffMaxValue; + if (TIFFGetField(in, TIFFTAG_SMINSAMPLEVALUE, &tiffMinValue)) { + printf(" MinValue: %d\n", tiffMinValue); + } + else + printf(" No minimum value!\n"); + if (TIFFGetField(in, TIFFTAG_SMAXSAMPLEVALUE, &tiffMaxValue)) { + printf(" MaxValue: %d\n\n", tiffMaxValue); + } + else + printf(" No maximum value!\n\n"); + printf(" Those values are not taken into account, the image data are normalized to a [0;1] range\n\n"); } - else - printf(" No minimum value!\n"); - if (TIFFGetField(in, TIFFTAG_SMAXSAMPLEVALUE, &tiffMaxValue)) { - printf(" MaxValue: %d\n\n", tiffMaxValue); - } - else - printf(" No maximum value!\n\n"); - printf("\n"); - */ - char* profdata; deleteLoadedProfileData(); @@ -811,30 +811,8 @@ int ImageIO::loadTIFF (Glib::ustring fname) if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &loadedProfileLength, &profdata)) { embProfile = cmsOpenProfileFromMem (profdata, loadedProfileLength); - - // For 32 bits floating point images, gamma is forced to linear in embedded ICC profiles - if ( sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT) ) { - // Modifying the gammaTRG tags - cmsWriteTag(embProfile, cmsSigGreenTRCTag, (void*)Color::linearGammaTRC ); - cmsWriteTag(embProfile, cmsSigRedTRCTag, (void*)Color::linearGammaTRC ); - cmsWriteTag(embProfile, cmsSigBlueTRCTag, (void*)Color::linearGammaTRC ); - - // Saving the profile in the memory - cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(embProfile, 0, &bytesNeeded); - - if (bytesNeeded > 0) { - loadedProfileData = new char[bytesNeeded + 1]; - cmsSaveProfileToMem(embProfile, loadedProfileData, &bytesNeeded); - } - - loadedProfileLength = (int)bytesNeeded; - } else { - // Saving the profile in the memory as is - loadedProfileData = new char [loadedProfileLength]; - memcpy (loadedProfileData, profdata, loadedProfileLength); - } - + loadedProfileData = new char [loadedProfileLength]; + memcpy (loadedProfileData, profdata, loadedProfileLength); } else { embProfile = NULL; } From 3076787c0fec69114a23c9a52f55a28c0d9baec8 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 12 Oct 2016 01:39:04 +0200 Subject: [PATCH 046/115] Removed rtengine/dirpyrLab_equalizer.cc --- rtengine/dirpyrLab_equalizer.cc | 521 -------------------------------- 1 file changed, 521 deletions(-) delete mode 100644 rtengine/dirpyrLab_equalizer.cc diff --git a/rtengine/dirpyrLab_equalizer.cc b/rtengine/dirpyrLab_equalizer.cc deleted file mode 100644 index fc5fc70a0..000000000 --- a/rtengine/dirpyrLab_equalizer.cc +++ /dev/null @@ -1,521 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - * - * (C) 2010 Emil Martinec - * - */ - -#include -#include -#include "curves.h" -#include "labimage.h" -#include "improcfun.h" -#include "rawimagesource.h" -#include "rt_math.h" - -#ifdef _OPENMP -#include -#endif - -#define CLIPC(a) ((a)>-32000?((a)<32000?(a):32000):-32000) - -#define DIRWT(i1,j1,i,j) (rangefn[abs((int)data_fine->L[i1][j1]-data_fine->L[i][j])+abs((int)data_fine->a[i1][j1]-data_fine->a[i][j])+abs((int)data_fine->b[i1][j1]-data_fine->b[i][j])] ) - -namespace rtengine -{ - -static const int maxlevel = 4; - -//sequence of scales -static const int scales[8] = {1, 2, 4, 8, 16, 32, 64, 128}; -//sequence of pitches -static const int pitches[8] = {1, 1, 1, 1, 1, 1, 1, 1}; - -//sequence of scales -//static const int scales[8] = {1,1,1,1,1,1,1,1}; -//sequence of pitches -//static const int pitches[8] = {2,2,2,2,2,2,2,2}; - -//sequence of scales -//static const int scales[8] = {1,3,6,10,15,21,28,36}; -//sequence of pitches -//static const int pitches[8] = {1,1,1,1,1,1,1,1}; - -//sequence of scales -//static const int scales[8] = {1,1,2,4,8,16,32,64}; -//sequence of pitches -//static const int pitches[8] = {2,1,1,1,1,1,1,1}; - -//pitch is spacing of subsampling -//scale is spacing of directional averaging weights -//example 1: no subsampling at any level -- pitch=1, scale=2^n -//example 2: subsampling by 2 every level -- pitch=2, scale=1 at each level -//example 3: no subsampling at first level, subsampling by 2 thereafter -- -// pitch =1, scale=1 at first level; pitch=2, scale=2 thereafter - - - - -void ImProcFunctions :: dirpyrLab_equalizer(LabImage * src, LabImage * dst, /*float luma, float chroma, float gamma*/ const double * mult ) -{ - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - LUTf rangefn(0x20000); - - - //set up weights - float noise = 1500; - - - //set up range functions - - for (int i = 0; i < 0x20000; i++) { - rangefn[i] = (int)((noise / ((double)i + noise))); - } - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - int level; - int ** buffer[3]; - - - LabImage * dirpyrLablo[maxlevel]; - - int w = src->W; - int h = src->H; - - buffer[0] = allocArray (w + 128, h + 128); - buffer[1] = allocArray (w + 128, h + 128); - buffer[2] = allocArray (w + 128, h + 128); - - for (int i = 0; i < h + 128; i++) - for (int j = 0; j < w + 128; j++) { - for (int c = 0; c < 3; c++) { - buffer[c][i][j] = 0; - } - } - - w = (int)((w - 1) / pitches[0]) + 1; - h = (int)((h - 1) / pitches[0]) + 1; - - dirpyrLablo[0] = new LabImage(w, h); - - for (level = 1; level < maxlevel; level++) { - w = (int)((w - 1) / pitches[level]) + 1; - h = (int)((h - 1) / pitches[level]) + 1; - dirpyrLablo[level] = new LabImage(w, h); - }; - - ////////////////////////////////////////////////////////////////////////////// - - - // c[0] = luma = noise_L - // c[1] = chroma = noise_ab - // c[2] decrease of noise var with scale - // c[3] radius of domain blur at each level - // c[4] shadow smoothing - // c[5] edge preservation - - level = 0; - - int scale = scales[level]; - - int pitch = pitches[level]; - - //int thresh = 10 * c[8]; - //impulse_nr (src, src, m_w1, m_h1, thresh, noisevar); - - dirpyr_eq(src, dirpyrLablo[0], rangefn, 0, pitch, scale, mult ); - - level = 1; - - int totalpitch = pitches[0]; - - while(level < maxlevel) { - scale = scales[level]; - pitch = pitches[level]; - - dirpyr_eq(dirpyrLablo[level - 1], dirpyrLablo[level], rangefn, level, pitch, scale, mult ); - - level ++; - totalpitch *= pitch; - } - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - //initiate buffer for final image - for(int i = 0, i1 = 0; i < src->H; i += totalpitch, i1++) - for(int j = 0, j1 = 0; j < src->W; j += totalpitch, j1++) { - - //copy pixels - buffer[0][i][j] = dirpyrLablo[maxlevel - 1]->L[i1][j1]; - buffer[1][i][j] = dirpyrLablo[maxlevel - 1]->a[i1][j1]; - buffer[2][i][j] = dirpyrLablo[maxlevel - 1]->b[i1][j1]; - - } - - //if we are not subsampling, this is lots faster but does the typecasting work??? - //memcpy(buffer[0],dirpyrLablo[maxlevel-1]->L,sizeof(buffer[0])); - //memcpy(buffer[1],dirpyrLablo[maxlevel-1]->a,sizeof(buffer[1])); - //memcpy(buffer[2],dirpyrLablo[maxlevel-1]->b,sizeof(buffer[2])); - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - for(int level = maxlevel - 1; level > 0; level--) { - - //int scale = scales[level]; - int pitch = pitches[level]; - - totalpitch /= pitch; - - idirpyr_eq(dirpyrLablo[level], dirpyrLablo[level - 1], buffer, level, pitch, totalpitch, mult ); - - } - - - scale = scales[0]; - pitch = pitches[0]; - totalpitch /= pitch; - - idirpyr_eq(dirpyrLablo[0], dst, buffer, 0, pitch, totalpitch, mult ); - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - for (int i = 0; i < dst->H; i++) - for (int j = 0; j < dst->W; j++) { - - // TODO: Is integer cast necessary here? - dst->L[i][j] = CLIP((int)( buffer[0][i][j] )); - dst->a[i][j] = CLIPC((int)( buffer[1][i][j] )); - dst->b[i][j] = CLIPC((int)( buffer[2][i][j] )); - - } - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - for(int i = 0; i < maxlevel; i++) { - delete dirpyrLablo[i]; - } - - for (int c = 0; c < 3; c++) { - freeArray(buffer[c], h + 128); - } - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -} - -void ImProcFunctions::dirpyr_eq(LabImage* data_fine, LabImage* data_coarse, LUTf & rangefn, int level, int pitch, int scale, const double * mult ) -{ - - //pitch is spacing of subsampling - //scale is spacing of directional averaging weights - //example 1: no subsampling at any level -- pitch=1, scale=2^n - //example 2: subsampling by 2 every level -- pitch=2, scale=1 at each level - //example 3: no subsampling at first level, subsampling by 2 thereafter -- - // pitch =1, scale=1 at first level; pitch=2, scale=2 thereafter - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - // calculate weights, compute directionally weighted average - - int width = data_fine->W; - int height = data_fine->H; - - - - //generate domain kernel - int halfwin = 1;//min(ceil(2*sig),3); - int scalewin = halfwin * scale; - - -#ifdef _OPENMP - #pragma omp parallel for -#endif - - for(int i = 0; i < height; i += pitch) { - int i1 = i / pitch; - - for(int j = 0, j1 = 0; j < width; j += pitch, j1++) { - float Lout, aout, bout; - float norm; - norm = 0;//if we do want to include the input pixel in the sum - Lout = 0; - aout = 0; - bout = 0; - - for(int inbr = max(0, i - scalewin); inbr <= min(height - 1, i + scalewin); inbr += scale) { - for (int jnbr = max(0, j - scalewin); jnbr <= min(width - 1, j + scalewin); jnbr += scale) { - float dirwt = DIRWT(inbr, jnbr, i, j); - Lout += dirwt * data_fine->L[inbr][jnbr]; - aout += dirwt * data_fine->a[inbr][jnbr]; - bout += dirwt * data_fine->b[inbr][jnbr]; - norm += dirwt; - } - } - - data_coarse->L[i1][j1] = Lout / norm; //low pass filter - data_coarse->a[i1][j1] = aout / norm; - data_coarse->b[i1][j1] = bout / norm; - } - } - - - - -} - -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -void ImProcFunctions::idirpyr_eq(LabImage* data_coarse, LabImage* data_fine, int *** buffer, int level, int pitch, int scale, const double * mult ) -{ - - int width = data_fine->W; - int height = data_fine->H; - - float lumamult[4], chromamult[4]; - - for (int i = 0; i < 4; i++) { - lumamult[i] = mult[i]; - chromamult[i] = mult[i + 4]; - } - - float wtdsum[6], norm, dirwt; - float hipass[3]; - int i1, j1; - - - // for coarsest level, take non-subsampled lopass image and subtract from lopass_fine to generate hipass image - - // denoise hipass image, add back into lopass_fine to generate denoised image at fine scale - - // now iterate: - // (1) take denoised image at level n, expand and smooth using gradient weights from lopass image at level n-1 - // the result is the smoothed image at level n-1 - // (2) subtract smoothed image at level n-1 from lopass image at level n-1 to make hipass image at level n-1 - // (3) denoise the hipass image at level n-1 - // (4) add the denoised image at level n-1 to the smoothed image at level n-1 to make the denoised image at level n-1 - - // note that the coarsest level amounts to skipping step (1) and doing (2,3,4). - // in other words, skip step one if pitch=1 - - - - if (pitch == 1) { - // step (1-2-3-4) -#ifdef _OPENMP - #pragma omp parallel for -#endif - - for(int i = 0; i < height; i++) - for(int j = 0; j < width; j++) { - - //luma - float hipass0 = (float)data_fine->L[i][j] - data_coarse->L[i][j]; - buffer[0][i * scale][j * scale] += hipass0 * lumamult[level]; //*luma; - - //chroma - float hipass1 = data_fine->a[i][j] - data_coarse->a[i][j]; - float hipass2 = data_fine->b[i][j] - data_coarse->b[i][j]; - buffer[1][i * scale][j * scale] += hipass1 * chromamult[level]; //*chroma; - buffer[2][i * scale][j * scale] += hipass2 * chromamult[level]; //*chroma; - } - - } else { - - // step (1) - //if (pitch>1), pitch=2; expand coarse image, fill in missing data - - LabImage* smooth; - smooth = new LabImage(width, height); -#ifdef _OPENMP - #pragma omp parallel -#endif - - { -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height; i += pitch) { - int i2 = i / pitch; - - for(int j = 0, j2 = 0; j < width; j += pitch, j2++) { - - //copy common pixels - smooth->L[i][j] = data_coarse->L[i2][j2]; - smooth->a[i][j] = data_coarse->a[i2][j2]; - smooth->b[i][j] = data_coarse->b[i2][j2]; - } - } - -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height - 1; i += 2) - for(int j = 0; j < width - 1; j += 2) { - //do midpoint first - norm = dirwt = 0; - wtdsum[0] = wtdsum[1] = wtdsum[2] = wtdsum[3] = wtdsum[4] = wtdsum[5] = 0.0; - - for(i1 = i; i1 < min(height, i + 3); i1 += 2) - for (j1 = j; j1 < min(width, j + 3); j1 += 2) { - dirwt = 1;//IDIRWT(i1, j1, i, j); - wtdsum[0] += dirwt * smooth->L[i1][j1]; - wtdsum[1] += dirwt * smooth->a[i1][j1]; - wtdsum[2] += dirwt * smooth->b[i1][j1]; - wtdsum[3] += dirwt * buffer[0][i1 * scale][j1 * scale]; // not completely right if j1*scale or i1*scale is out of bounds of original image ??? - wtdsum[4] += dirwt * buffer[1][i1 * scale][j1 * scale]; // also should we use directional average? - wtdsum[5] += dirwt * buffer[2][i1 * scale][j1 * scale]; - norm += dirwt; - } - - norm = 1 / norm; - smooth->L[i + 1][j + 1] = wtdsum[0] * norm; - smooth->a[i + 1][j + 1] = wtdsum[1] * norm; - smooth->b[i + 1][j + 1] = wtdsum[2] * norm; - buffer[0][(i + 1)*scale][(j + 1)*scale] = wtdsum[3] * norm; - buffer[1][(i + 1)*scale][(j + 1)*scale] = wtdsum[4] * norm; - buffer[2][(i + 1)*scale][(j + 1)*scale] = wtdsum[5] * norm; - } - -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height - 1; i += 2) - for(int j = 0; j < width - 1; j += 2) { - //now right neighbor - if (j + 1 == width) { - continue; - } - - norm = dirwt = 0; - wtdsum[0] = wtdsum[1] = wtdsum[2] = wtdsum[3] = wtdsum[4] = wtdsum[5] = 0.0; - - for (j1 = j; j1 < min(width, j + 3); j1 += 2) { - dirwt = 1;//IDIRWT(i, j1, i, j); - wtdsum[0] += dirwt * smooth->L[i][j1]; - wtdsum[1] += dirwt * smooth->a[i][j1]; - wtdsum[2] += dirwt * smooth->b[i][j1]; - wtdsum[3] += dirwt * buffer[0][i * scale][j1 * scale]; - wtdsum[4] += dirwt * buffer[1][i * scale][j1 * scale]; - wtdsum[5] += dirwt * buffer[2][i * scale][j1 * scale]; - norm += dirwt; - } - - for (i1 = max(0, i - 1); i1 < min(height, i + 2); i1 += 2) { - dirwt = 1;//IDIRWT(i1, j+1, i, j); - wtdsum[0] += dirwt * smooth->L[i1][j + 1]; - wtdsum[1] += dirwt * smooth->a[i1][j + 1]; - wtdsum[2] += dirwt * smooth->b[i1][j + 1]; - wtdsum[3] += dirwt * buffer[0][i1 * scale][(j + 1) * scale]; - wtdsum[4] += dirwt * buffer[1][i1 * scale][(j + 1) * scale]; - wtdsum[5] += dirwt * buffer[2][i1 * scale][(j + 1) * scale]; - norm += dirwt; - } - - norm = 1 / norm; - smooth->L[i][j + 1] = wtdsum[0] * norm; - smooth->a[i][j + 1] = wtdsum[1] * norm; - smooth->b[i][j + 1] = wtdsum[2] * norm; - buffer[0][i][(j + 1)*scale] = wtdsum[3] * norm; - buffer[1][i][(j + 1)*scale] = wtdsum[4] * norm; - buffer[2][i][(j + 1)*scale] = wtdsum[5] * norm; - - //now down neighbor - if (i + 1 == height) { - continue; - } - - norm = 0; - wtdsum[0] = wtdsum[1] = wtdsum[2] = wtdsum[3] = wtdsum[4] = wtdsum[5] = 0.0; - - for (i1 = i; i1 < min(height, i + 3); i1 += 2) { - dirwt = 1;//IDIRWT(i1, j, i, j); - wtdsum[0] += dirwt * smooth->L[i1][j]; - wtdsum[1] += dirwt * smooth->a[i1][j]; - wtdsum[2] += dirwt * smooth->b[i1][j]; - wtdsum[3] += dirwt * buffer[0][i1 * scale][j * scale]; - wtdsum[4] += dirwt * buffer[1][i1 * scale][j * scale]; - wtdsum[5] += dirwt * buffer[2][i1 * scale][j * scale]; - norm += dirwt; - } - - for (j1 = max(0, j - 1); j1 < min(width, j + 2); j1 += 2) { - dirwt = 1;//IDIRWT(i+1, j1, i, j); - wtdsum[0] += dirwt * smooth->L[i + 1][j1]; - wtdsum[1] += dirwt * smooth->a[i + 1][j1]; - wtdsum[2] += dirwt * smooth->b[i + 1][j1]; - wtdsum[3] += dirwt * buffer[0][(i + 1) * scale][j1 * scale]; - wtdsum[4] += dirwt * buffer[1][(i + 1) * scale][j1 * scale]; - wtdsum[5] += dirwt * buffer[2][(i + 1) * scale][j1 * scale]; - norm += dirwt; - } - - norm = 1 / norm; - smooth->L[i + 1][j] = wtdsum[0] * norm; - smooth->a[i + 1][j] = wtdsum[1] * norm; - smooth->b[i + 1][j] = wtdsum[2] * norm; - buffer[0][(i + 1)*scale][j * scale] = wtdsum[3] * norm; - buffer[1][(i + 1)*scale][j * scale] = wtdsum[4] * norm; - buffer[2][(i + 1)*scale][j * scale] = wtdsum[5] * norm; - - } - - - // step (2-3-4) -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height; i++) - for(int j = 0; j < width; j++) { - - //luma - hipass[0] = (float)data_fine->L[i][j] - smooth->L[i][j]; - buffer[0][i * scale][j * scale] += hipass[0] * lumamult[level]; //*luma; - - //chroma - hipass[1] = data_fine->a[i][j] - smooth->a[i][j]; - hipass[2] = data_fine->b[i][j] - smooth->b[i][j]; - buffer[1][i * scale][j * scale] += hipass[1] * chromamult[level]; //*chroma; - buffer[2][i * scale][j * scale] += hipass[2] * chromamult[level]; //*chroma; - } - } // end parallel - delete smooth; - - } -} - - -#undef DIRWT_L -#undef DIRWT_AB - -#undef NRWT_L -#undef NRWT_AB - -} - From 29d5329f3f8d212186260ac7775ec46317d61f29 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 12 Oct 2016 10:01:01 +0200 Subject: [PATCH 047/115] Fixed RT.ico path in WindowsInnoSetup.iss.in --- tools/win/InnoSetup/WindowsInnoSetup.iss.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/win/InnoSetup/WindowsInnoSetup.iss.in b/tools/win/InnoSetup/WindowsInnoSetup.iss.in index 5c4a2a239..1ba02590d 100644 --- a/tools/win/InnoSetup/WindowsInnoSetup.iss.in +++ b/tools/win/InnoSetup/WindowsInnoSetup.iss.in @@ -54,7 +54,7 @@ AllowNoIcons=yes LicenseFile={#MyBuildBasePath}\LICENSE.txt OutputDir={#MyBuildBasePath}\..\ OutputBaseFilename={#MyAppName}_{#MySystemName}_{#MyBitDepth}_{#MyAppFullVersion} -SetupIconFile={#MySourceBasePath}\rtgui\RT.ico +SetupIconFile={#MySourceBasePath}\rtdata\icons\RT.ico WizardImageFile={#MySourceBasePath}\tools\win\InnoSetup\installerStrip.bmp WizardImageBackColor=$2A2A2A Compression=lzma From 0731975ff08e0d57e5c40ef69554dd68eb4bc6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 12 Oct 2016 17:48:40 +0200 Subject: [PATCH 048/115] Apply `modernize-use-nullptr` Setup: - `mkdir tidy; cd tidy` - `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` - `cd ..` - `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;` --- rtengine/EdgePreservingDecomposition.cc | 26 +- rtengine/EdgePreservingDecomposition.h | 8 +- rtengine/PF_correct_RT.cc | 4 +- rtengine/alignedbuffer.h | 8 +- rtengine/array2D.h | 12 +- rtengine/cache.h | 2 +- rtengine/camconst.cc | 38 +- rtengine/cieimage.cc | 2 +- rtengine/color.cc | 4 +- rtengine/cplx_wavelet_dec.cc | 2 +- rtengine/cplx_wavelet_dec.h | 8 +- rtengine/cplx_wavelet_level.h | 2 +- rtengine/dcraw.cc | 22 +- rtengine/dcraw.h | 10 +- rtengine/dcrop.cc | 48 +-- rtengine/demosaic_algos.cc | 24 +- rtengine/dfmanager.cc | 34 +- rtengine/dfmanager.h | 4 +- rtengine/ffmanager.cc | 28 +- rtengine/ffmanager.h | 4 +- rtengine/iccjpeg.cc | 8 +- rtengine/iccstore.cc | 32 +- rtengine/iccstore.h | 2 +- rtengine/iimage.h | 28 +- rtengine/image16.h | 2 +- rtengine/image8.cc | 4 +- rtengine/image8.h | 2 +- rtengine/imagedata.cc | 20 +- rtengine/imagedata.h | 2 +- rtengine/imagefloat.cc | 4 +- rtengine/imagefloat.h | 2 +- rtengine/imageio.cc | 62 +-- rtengine/imageio.h | 8 +- rtengine/imagesource.h | 4 +- rtengine/improccoordinator.cc | 28 +- rtengine/improccoordinator.h | 2 +- rtengine/improcfun.h | 16 +- rtengine/init.cc | 2 +- rtengine/iplab2rgb.cc | 6 +- rtengine/iptransform.cc | 8 +- rtengine/ipvibrance.cc | 10 +- rtengine/ipwavelet.cc | 26 +- rtengine/jdatasrc.cc | 12 +- rtengine/jpeg_memsrc.cc | 2 +- rtengine/klt/klt.cc | 32 +- rtengine/klt/klt_util.cc | 2 +- rtengine/klt/pnmio.cc | 14 +- rtengine/klt/pyramid.cc | 2 +- rtengine/klt/selectGoodFeatures.cc | 18 +- rtengine/klt/trackFeatures.cc | 44 +- rtengine/klt/writeFeatures.cc | 58 +-- rtengine/lcp.cc | 26 +- rtengine/loadinitial.cc | 4 +- rtengine/myfile.cc | 18 +- rtengine/pipettebuffer.cc | 22 +- rtengine/previewimage.cc | 8 +- rtengine/processingjob.h | 2 +- rtengine/procparams.cc | 14 +- rtengine/procparams.h | 8 +- rtengine/rawimage.cc | 34 +- rtengine/rawimage.h | 2 +- rtengine/rawimagesource.cc | 74 ++-- rtengine/rawimagesource.h | 2 +- rtengine/rtengine.h | 4 +- rtengine/simpleprocess.cc | 38 +- rtengine/stdimagesource.cc | 24 +- rtengine/stdimagesource.h | 2 +- rtexif/canonattribs.cc | 326 +++++++------- rtexif/fujiattribs.cc | 76 ++-- rtexif/kodakattribs.cc | 54 +-- rtexif/nikonattribs.cc | 172 ++++---- rtexif/olympusattribs.cc | 548 ++++++++++++------------ rtexif/pentaxattribs.cc | 370 ++++++++-------- rtexif/rtexif.cc | 164 +++---- rtexif/rtexif.h | 6 +- rtexif/sonyminoltaattribs.cc | 394 ++++++++--------- rtexif/stdattribs.cc | 506 +++++++++++----------- rtgui/adjuster.cc | 26 +- rtgui/adjuster.h | 4 +- rtgui/batchqueue.cc | 12 +- rtgui/batchqueueentry.cc | 10 +- rtgui/batchqueueentry.h | 2 +- rtgui/batchqueuepanel.cc | 4 +- rtgui/batchtoolpanelcoord.cc | 10 +- rtgui/batchtoolpanelcoord.h | 8 +- rtgui/bayerpreprocess.h | 6 +- rtgui/bayerprocess.h | 6 +- rtgui/bayerrawexposure.h | 6 +- rtgui/blackwhite.cc | 2 +- rtgui/blackwhite.h | 6 +- rtgui/bqentryupdater.cc | 8 +- rtgui/bqentryupdater.h | 2 +- rtgui/cacorrection.h | 6 +- rtgui/chmixer.h | 6 +- rtgui/clipboard.cc | 6 +- rtgui/coarsepanel.h | 4 +- rtgui/colorappearance.h | 6 +- rtgui/coloredbar.cc | 2 +- rtgui/colorprovider.h | 2 +- rtgui/colortoning.cc | 8 +- rtgui/colortoning.h | 6 +- rtgui/coordinateadjuster.cc | 2 +- rtgui/coordinateadjuster.h | 2 +- rtgui/crop.cc | 2 +- rtgui/crop.h | 4 +- rtgui/crophandler.cc | 32 +- rtgui/cropwindow.cc | 16 +- rtgui/curveeditor.cc | 8 +- rtgui/curveeditorgroup.cc | 18 +- rtgui/curveeditorgroup.h | 2 +- rtgui/darkframe.h | 4 +- rtgui/defringe.h | 6 +- rtgui/diagonalcurveeditorsubgroup.cc | 36 +- rtgui/dirbrowser.cc | 2 +- rtgui/dirpyrdenoise.cc | 4 +- rtgui/dirpyrdenoise.h | 6 +- rtgui/dirpyrequalizer.h | 6 +- rtgui/distortion.cc | 2 +- rtgui/distortion.h | 6 +- rtgui/edit.cc | 10 +- rtgui/editorpanel.cc | 64 +-- rtgui/editorpanel.h | 4 +- rtgui/epd.h | 6 +- rtgui/exifpanel.cc | 4 +- rtgui/exifpanel.h | 6 +- rtgui/exportpanel.cc | 2 +- rtgui/extprog.cc | 2 +- rtgui/filebrowser.cc | 52 +-- rtgui/filebrowserentry.cc | 16 +- rtgui/filecatalog.cc | 12 +- rtgui/filepanel.cc | 4 +- rtgui/filmsimulation.h | 4 +- rtgui/filterpanel.cc | 2 +- rtgui/flatcurveeditorsubgroup.cc | 16 +- rtgui/flatfield.h | 6 +- rtgui/gradient.h | 6 +- rtgui/guiutils.cc | 20 +- rtgui/guiutils.h | 8 +- rtgui/histogrampanel.h | 2 +- rtgui/history.cc | 2 +- rtgui/history.h | 2 +- rtgui/hsvequalizer.h | 4 +- rtgui/icmpanel.cc | 8 +- rtgui/icmpanel.h | 6 +- rtgui/imagearea.cc | 38 +- rtgui/imageareapanel.cc | 2 +- rtgui/imageareatoollistener.h | 10 +- rtgui/impulsedenoise.h | 6 +- rtgui/indclippedpanel.cc | 2 +- rtgui/inspector.cc | 18 +- rtgui/iptcpanel.h | 6 +- rtgui/labcurve.cc | 4 +- rtgui/labcurve.h | 6 +- rtgui/lensgeom.cc | 2 +- rtgui/lensgeom.h | 4 +- rtgui/lensprofile.h | 4 +- rtgui/lwbutton.cc | 2 +- rtgui/main.cc | 12 +- rtgui/mycurve.cc | 12 +- rtgui/options.cc | 6 +- rtgui/partialpastedlg.h | 2 +- rtgui/pcvignette.h | 6 +- rtgui/perspective.h | 6 +- rtgui/popupcommon.cc | 4 +- rtgui/pparamschangelistener.h | 2 +- rtgui/preferences.cc | 12 +- rtgui/preprocess.h | 4 +- rtgui/previewhandler.cc | 4 +- rtgui/previewloader.cc | 6 +- rtgui/previewmodepanel.cc | 4 +- rtgui/previewwindow.cc | 2 +- rtgui/profilechangelistener.h | 2 +- rtgui/profilepanel.cc | 32 +- rtgui/profilepanel.h | 2 +- rtgui/profilestore.cc | 32 +- rtgui/profilestore.h | 2 +- rtgui/progressconnector.h | 4 +- rtgui/prsharpening.h | 6 +- rtgui/rawcacorrection.h | 6 +- rtgui/rawexposure.h | 6 +- rtgui/renamedlg.cc | 2 +- rtgui/resize.cc | 2 +- rtgui/resize.h | 6 +- rtgui/retinex.cc | 4 +- rtgui/retinex.h | 6 +- rtgui/rgbcurves.h | 4 +- rtgui/rotate.cc | 2 +- rtgui/rotate.h | 6 +- rtgui/rtwindow.cc | 26 +- rtgui/saveformatpanel.cc | 4 +- rtgui/shadowshighlights.h | 6 +- rtgui/sharpenedge.h | 6 +- rtgui/sharpening.h | 6 +- rtgui/sharpenmicro.h | 6 +- rtgui/shcselector.cc | 2 +- rtgui/splash.cc | 10 +- rtgui/splash.h | 2 +- rtgui/thresholdadjuster.cc | 10 +- rtgui/thresholdselector.cc | 4 +- rtgui/thumbbrowserbase.cc | 6 +- rtgui/thumbbrowserentrybase.cc | 8 +- rtgui/thumbimageupdater.cc | 10 +- rtgui/thumbnail.cc | 46 +- rtgui/thumbnail.h | 6 +- rtgui/tonecurve.h | 6 +- rtgui/toolbar.cc | 2 +- rtgui/toolpanel.cc | 2 +- rtgui/toolpanel.h | 22 +- rtgui/toolpanelcoord.cc | 12 +- rtgui/toolpanelcoord.h | 8 +- rtgui/vibrance.h | 6 +- rtgui/vignetting.h | 6 +- rtgui/wavelet.cc | 18 +- rtgui/wavelet.h | 6 +- rtgui/whitebalance.cc | 4 +- rtgui/whitebalance.h | 6 +- rtgui/xtransprocess.h | 6 +- rtgui/xtransrawexposure.h | 6 +- 218 files changed, 2406 insertions(+), 2406 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 927bfac2d..c8ba8f9d8 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -27,7 +27,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl float *r = (float*)(buffer + 64); //Start r and x. - if(x == NULL) { + if(x == nullptr) { x = new float[n]; memset(x, 0, sizeof(float)*n); //Zero initial guess if x == NULL. @@ -46,7 +46,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl //s is preconditionment of r. Without, direct to r. float *s = r, rs = 0.0f; - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { s = new float[n]; Preconditioner(s, r, Pass); @@ -114,7 +114,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl break; } - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { Preconditioner(s, r, Pass); } @@ -187,7 +187,7 @@ MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int Nu { n = Dimension; m = NumberOfDiagonalsInLowerTriangle; - IncompleteCholeskyFactorization = NULL; + IncompleteCholeskyFactorization = nullptr; Diagonals = new float *[m]; StartRows = new int [m + 1]; @@ -198,7 +198,7 @@ MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int Nu MultiDiagonalSymmetricMatrix::~MultiDiagonalSymmetricMatrix() { - if(DiagBuffer != NULL) { + if(DiagBuffer != nullptr) { free(buffer); } else for(int i = 0; i < m; i++) { @@ -218,10 +218,10 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) if(index == 0) { buffer = (char*)calloc( (n + padding) * m * sizeof(float) + (m + 16) * 64 + 63, 1); - if(buffer == NULL) + if(buffer == nullptr) // no big memory block available => try to allocate smaller blocks { - DiagBuffer = NULL; + DiagBuffer = nullptr; } else { DiagBuffer = (char*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); } @@ -238,12 +238,12 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) return false; } - if(DiagBuffer != NULL) { + if(DiagBuffer != nullptr) { Diagonals[index] = (float*)(DiagBuffer + (index * (n + padding) * sizeof(float)) + ((index + 16) * 64)); } else { Diagonals[index] = new float[DiagonalLength(StartRow)]; - if(Diagonals[index] == NULL) { + if(Diagonals[index] == nullptr) { printf("Error in MultiDiagonalSymmetricMatrix::CreateDiagonal: memory allocation failed. Out of memory?\n"); return false; } @@ -675,7 +675,7 @@ EdgePreservingDecomposition::EdgePreservingDecomposition(int width, int height) A->CreateDiagonal(3, w) && A->CreateDiagonal(4, w + 1))) { delete A; - A = NULL; + A = nullptr; printf("Error in EdgePreservingDecomposition construction: out of memory.\n"); } else { a0 = A->Diagonals[0]; @@ -694,7 +694,7 @@ EdgePreservingDecomposition::~EdgePreservingDecomposition() SSEFUNCTION float *EdgePreservingDecomposition::CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur, bool UseBlurForEdgeStop) { - if(Blur == NULL) + if(Blur == nullptr) UseBlurForEdgeStop = false, //Use source if there's no supplied Blur. Blur = new float[n]; @@ -868,7 +868,7 @@ float *EdgePreservingDecomposition::CreateIteratedBlur(float *Source, float Scal } //Create a blur here, initialize. - if(Blur == NULL) { + if(Blur == nullptr) { Blur = new float[n]; } @@ -927,7 +927,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour //Blur. Also setup memory for Compressed (we can just use u since each element of u is used in one calculation). float *u = CreateIteratedBlur(Source, Scale, EdgeStopping, Iterates, Reweightings); - if(Compressed == NULL) { + if(Compressed == nullptr) { Compressed = u; } diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index a15cacb62..944e0ec7f 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -72,7 +72,7 @@ ben_s or nonbasketless. Enjoy! #include "noncopyable.h" //This is for solving big symmetric positive definite linear problems. -float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = NULL, float RMSResidual = 0.0f, void *Pass = NULL, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = NULL); +float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = nullptr, float RMSResidual = 0.0f, void *Pass = nullptr, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = nullptr); //Storage and use class for symmetric matrices, the nonzero contents of which are confined to diagonals. class MultiDiagonalSymmetricMatrix : @@ -143,16 +143,16 @@ public: //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. //If UseBlurForEdgeStop is true, supplied not NULL Blur is used to calculate the edge stopping function instead of Source. - float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = NULL, bool UseBlurForEdgeStop = false); + float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = nullptr, bool UseBlurForEdgeStop = false); //Iterates CreateBlur such that the smoothness term approaches a specific norm via iteratively reweighted least squares. In place not ok. - float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = NULL); + float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = nullptr); /*Lowers global contrast while preserving or boosting local contrast. Can fill into Compressed. The smaller Compression the more compression is applied, with Compression = 1 giving no effect and above 1 the opposite effect. You can totally use Compression = 1 and play with DetailBoost for some really sweet unsharp masking. If working on luma/grey, consider giving it a logarithm. In place calculation to save memory (Source == Compressed) is totally ok. Reweightings > 0 invokes CreateIteratedBlur instead of CreateBlur. */ - float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = NULL); + float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = nullptr); private: MultiDiagonalSymmetricMatrix *A; //The equations are simple enough to not mandate a matrix class, but fast solution NEEDS a complicated preconditioner. diff --git a/rtengine/PF_correct_RT.cc b/rtengine/PF_correct_RT.cc index 6864e28ec..6808fd4eb 100644 --- a/rtengine/PF_correct_RT.cc +++ b/rtengine/PF_correct_RT.cc @@ -47,7 +47,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RT(LabImage * src, LabImage * dst, { const int halfwin = ceil(2 * radius) + 1; - FlatCurve* chCurve = NULL; + FlatCurve* chCurve = nullptr; if (params->defringe.huecurve.size() && FlatCurveType(params->defringe.huecurve.at(0)) > FCT_Linear) { chCurve = new FlatCurve(params->defringe.huecurve); @@ -289,7 +289,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RTcam(CieImage * src, CieImage * ds { const int halfwin = ceil(2 * radius) + 1; - FlatCurve* chCurve = NULL; + FlatCurve* chCurve = nullptr; if (params->defringe.huecurve.size() && FlatCurveType(params->defringe.huecurve.at(0)) > FCT_Linear) { chCurve = new FlatCurve(params->defringe.huecurve); diff --git a/rtengine/alignedbuffer.h b/rtengine/alignedbuffer.h index 652bfe8cf..44fd43e81 100644 --- a/rtengine/alignedbuffer.h +++ b/rtengine/alignedbuffer.h @@ -43,7 +43,7 @@ public: * @param size Number of elements of size T to allocate, i.e. allocated size will be sizeof(T)*size ; set it to 0 if you want to defer the allocation * @param align Expressed in bytes; SSE instructions need 128 bits alignment, which mean 16 bytes, which is the default value */ - AlignedBuffer (size_t size = 0, size_t align = 16) : real(NULL), alignment(align), allocatedSize(0), unitSize(0), data(NULL), inUse(false) + AlignedBuffer (size_t size = 0, size_t align = 16) : real(nullptr), alignment(align), allocatedSize(0), unitSize(0), data(nullptr), inUse(false) { if (size) { resize(size); @@ -78,8 +78,8 @@ public: free(real); } - real = NULL; - data = NULL; + real = nullptr; + data = nullptr; inUse = false; allocatedSize = 0; unitSize = 0; @@ -117,7 +117,7 @@ public: } else { allocatedSize = 0; unitSize = 0; - data = NULL; + data = nullptr; inUse = false; return false; } diff --git a/rtengine/array2D.h b/rtengine/array2D.h index db44fcfc8..d9cfb23e2 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -82,19 +82,19 @@ private: { if ((ptr) && ((h > y) || (4 * h < y))) { delete[] ptr; - ptr = NULL; + ptr = nullptr; } if ((data) && (((h * w) > (x * y)) || ((h * w) < ((x * y) / 4)))) { delete[] data; - data = NULL; + data = nullptr; } - if (ptr == NULL) { + if (ptr == nullptr) { ptr = new T*[h]; } - if (data == NULL) { + if (data == nullptr) { data = new T[h * w + offset]; } @@ -112,7 +112,7 @@ public: // use as empty declaration, resize before use! // very useful as a member object array2D() : - x(0), y(0), owner(0), ptr(NULL), data(NULL), lock(0) + x(0), y(0), owner(0), ptr(nullptr), data(nullptr), lock(0) { //printf("got empty array2D init\n"); } @@ -150,7 +150,7 @@ public: if (owner) { data = new T[h * w]; } else { - data = NULL; + data = nullptr; } x = w; diff --git a/rtengine/cache.h b/rtengine/cache.h index ea567542c..f4c232673 100644 --- a/rtengine/cache.h +++ b/rtengine/cache.h @@ -64,7 +64,7 @@ public: virtual void onDestroy() = 0; }; - Cache(unsigned long _size, Hook* _hook = 0) : + Cache(unsigned long _size, Hook* _hook = nullptr) : store_size(_size), hook(_hook) { diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index c7a6412be..3e7ad6202 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -41,7 +41,7 @@ CameraConst::parseApertureScaling(CameraConst *cc, void *ji_) return false; } - for (ji = ji->child; ji != NULL; ji = ji->next) { + for (ji = ji->child; ji != nullptr; ji = ji->next) { cJSON *js = cJSON_GetObjectItem(ji, "aperture"); if (!js) { @@ -90,7 +90,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) int i; cJSON *js; - for (js = ji->child, i = 0; js != NULL && i < 4; js = js->next, i++) { + for (js = ji->child, i = 0; js != nullptr && i < 4; js = js->next, i++) { lvl.levels[i] = js->valueint; } @@ -98,7 +98,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) lvl.levels[3] = lvl.levels[1]; // G2 = G1 } else if (i == 1) { lvl.levels[3] = lvl.levels[2] = lvl.levels[1] = lvl.levels[0]; - } else if (i != 4 || js != NULL) { + } else if (i != 4 || js != nullptr) { fprintf(stderr, "\"ranges\":\"%s\" array must have 1, 3 or 4 numbers.\n", bw ? "white" : "black"); return false; } @@ -107,7 +107,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) return true; } - for (ji = ji->child; ji != NULL; ji = ji->next) { + for (ji = ji->child; ji != nullptr; ji = ji->next) { int iso[1000] = { 0 }; int iso_count = 0; cJSON *js = cJSON_GetObjectItem(ji, "iso"); @@ -121,7 +121,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) } else if (js->type == cJSON_Array) { int i; - for (js = js->child, i = 0; js != NULL && i < 1000; js = js->next, i++) { + for (js = js->child, i = 0; js != nullptr && i < 1000; js = js->next, i++) { if (js->type != cJSON_Number) { fprintf(stderr, "\"ranges\":\"%s\":\"iso\" must be a number or an array of numbers.\n", bw ? "white" : "black"); return false; @@ -150,7 +150,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) } else if (js->type == cJSON_Array) { int i; - for (js = js->child, i = 0; js != NULL && i < 4; js = js->next, i++) { + for (js = js->child, i = 0; js != nullptr && i < 4; js = js->next, i++) { if (js->type != cJSON_Number) { fprintf(stderr, "\"ranges\":\"%s\":\"levels\" must be a number or an array of numbers.\n", bw ? "white" : "black"); return false; @@ -163,7 +163,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) lvl.levels[3] = lvl.levels[1]; // G2 = G1 } else if (i == 1) { lvl.levels[3] = lvl.levels[2] = lvl.levels[1] = lvl.levels[0]; - } else if (i != 4 || js != NULL) { + } else if (i != 4 || js != nullptr) { fprintf(stderr, "\"ranges\":\"%s\":\"levels\" array must have 1, 3 or 4 numbers.\n", bw ? "white" : "black"); return false; } @@ -183,7 +183,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) CameraConst * CameraConst::parseEntry(void *cJSON_, const char *make_model) { - CameraConst *cc = 0; + CameraConst *cc = nullptr; cJSON *js, *ji, *jranges; js = (cJSON *)cJSON_; @@ -200,7 +200,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 12 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 12 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"dcraw_matrix\" array must contain numbers\n"); goto parse_error; @@ -220,7 +220,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 4 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 4 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"raw_crop\" array must contain numbers\n"); goto parse_error; @@ -229,7 +229,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) cc->raw_crop[i] = ji->valueint; } - if (i != 4 || ji != NULL) { + if (i != 4 || ji != nullptr) { fprintf(stderr, "\"raw_crop\" must contain 4 numbers\n"); goto parse_error; } @@ -245,7 +245,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 8 * 4 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 8 * 4 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"masked_areas\" array must contain numbers\n"); goto parse_error; @@ -317,7 +317,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) return cc; parse_error: - return 0; + return nullptr; } bool @@ -342,7 +342,7 @@ const short * CameraConst::get_dcrawMatrix(void) { if (!has_dcrawMatrix()) { - return 0; + return nullptr; } return dcraw_matrix; @@ -545,7 +545,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) const char *filename = filename_.c_str(); FILE *stream = fopen(filename, "rt"); - if (stream == NULL) { + if (stream == nullptr) { fprintf(stderr, "Could not open camera constants file \"%s\": %s\n", filename, strerror(errno)); return false; } @@ -614,7 +614,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) goto parse_error; } - for (js = js->child; js != NULL; js = js->next) { + for (js = js->child; js != nullptr; js = js->next) { cJSON *ji = cJSON_GetObjectItem(js, "make_model"); if (!ji) { @@ -629,7 +629,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) is_array = true; } - while (ji != NULL) { + while (ji != nullptr) { if (ji->type != cJSON_String) { fprintf(stderr, "\"make_model\" must be a string or an array of strings\n"); goto parse_error; @@ -667,7 +667,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) if (is_array) { ji = ji->next; } else { - ji = NULL; + ji = nullptr; } } } @@ -715,7 +715,7 @@ CameraConstantsStore::get(const char make[], const char model[]) it = mCameraConstants.find(key); if (it == mCameraConstants.end()) { - return 0; + return nullptr; } return it->second; diff --git a/rtengine/cieimage.cc b/rtengine/cieimage.cc index 87954e1f0..be122febf 100644 --- a/rtengine/cieimage.cc +++ b/rtengine/cieimage.cc @@ -15,7 +15,7 @@ CieImage::CieImage (int w, int h) : fromImage(false), W(w), H(h) // Initialize the pointers to zero for (unsigned int c = 0; c < 6; ++c) { - data[c] = NULL; + data[c] = nullptr; } // Trying to allocate all in one block diff --git a/rtengine/color.cc b/rtengine/color.cc index a23a261b7..b0250ce9c 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -350,7 +350,7 @@ void Color::init () #ifdef _OPENMP #pragma omp section #endif - linearGammaTRC = cmsBuildGamma(NULL, 1.0); + linearGammaTRC = cmsBuildGamma(nullptr, 1.0); } } @@ -2638,7 +2638,7 @@ SSEFUNCTION void Color::LabGamutMunsell(float *labL, float *laba, float *labb, MyTime t1e, t2e; t1e.set(); int negat = 0, moreRGB = 0; - MunsellDebugInfo* MunsDebugInfo = NULL; + MunsellDebugInfo* MunsDebugInfo = nullptr; if (corMunsell) { MunsDebugInfo = new MunsellDebugInfo(); diff --git a/rtengine/cplx_wavelet_dec.cc b/rtengine/cplx_wavelet_dec.cc index d9e72e6c5..eafadaa54 100644 --- a/rtengine/cplx_wavelet_dec.cc +++ b/rtengine/cplx_wavelet_dec.cc @@ -26,7 +26,7 @@ namespace rtengine wavelet_decomposition::~wavelet_decomposition() { for(int i = 0; i <= lvltot; i++) { - if(wavelet_decomp[i] != NULL) { + if(wavelet_decomp[i] != nullptr) { delete wavelet_decomp[i]; } } diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index bc8b7bdd3..40639e7ea 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -97,7 +97,7 @@ public: template wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int maxlvl, int subsampling, int skipcrop, int numThreads, int Daub4Len) - : coeff0(NULL), memoryAllocationFailed(false), lvltot(0), subsamp(subsampling), numThreads(numThreads), m_w(width), m_h(height) + : coeff0(nullptr), memoryAllocationFailed(false), lvltot(0), subsamp(subsampling), numThreads(numThreads), m_w(width), m_h(height) { //initialize wavelet filters @@ -219,7 +219,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpLo = wavelet_decomp[lvl]->wavcoeffs[2]; // we can use this as buffer wavelet_decomp[lvl]->reconstruct_level(tmpLo, tmpHi, coeff0, coeff0, wavfilt_synth, wavfilt_synth, wavfilt_len, wavfilt_offset); delete wavelet_decomp[lvl]; - wavelet_decomp[lvl] = NULL; + wavelet_decomp[lvl] = nullptr; } delete[] tmpHi; @@ -261,9 +261,9 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) delete[] tmpHi; delete wavelet_decomp[0]; - wavelet_decomp[0] = NULL; + wavelet_decomp[0] = nullptr; delete[] coeff0; - coeff0 = NULL; + coeff0 = nullptr; } }; diff --git a/rtengine/cplx_wavelet_level.h b/rtengine/cplx_wavelet_level.h index cbdb5a481..5c13158b8 100644 --- a/rtengine/cplx_wavelet_level.h +++ b/rtengine/cplx_wavelet_level.h @@ -189,7 +189,7 @@ void wavelet_level::destroy(T ** subbands) delete[] subbands[1]; } else { for(int j = 1; j < 4; j++) { - if(subbands[j] != NULL) { + if(subbands[j] != nullptr) { delete[] subbands[j]; } } diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 3593f2777..8acfd6187 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=0, (*ip)[4]; + short *rp=nullptr, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=0; + ushort *pixel=nullptr; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return 0; + return nullptr; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return 0; + return nullptr; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4155,7 +4155,7 @@ void CLASS remove_zeroes() */ void CLASS bad_pixels (const char *cfname) { - FILE *fp=0; + FILE *fp=nullptr; char *fname, *cp, line[128]; int len, time, row, col, r, c, rad, tot, n, fixed=0; @@ -4430,7 +4430,7 @@ void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) void CLASS wavelet_denoise() { - float *fimg=0, *temp, thold, mul[2], avg, diff; + float *fimg=nullptr, *temp, thold, mul[2], avg, diff; int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ushort *window[4]; static const float noise[] = @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=0, *pix; + ushort *img=nullptr, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -4748,7 +4748,7 @@ void CLASS xtrans_interpolate (int passes) if (verbose) fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); - cielab (0,0); + cielab (nullptr,nullptr); ndir = 4 << (passes > 1); buffer = (char *) malloc (TS*TS*(ndir*11+6)); merror (buffer, "xtrans_interpolate()"); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = 0; + load_raw = thumb_load_raw = nullptr; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } goto dng_skip; } diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 405f202bd..666b4276f 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -43,13 +43,13 @@ public: :exif_base(-1) ,ciff_base(-1) ,ciff_len(0) - ,ifp(NULL),ofp(NULL) + ,ifp(nullptr),ofp(nullptr) ,order(0x4949) - ,ifname(NULL) - ,meta_data(NULL) + ,ifname(nullptr) + ,meta_data(nullptr) ,shot_select(0),multi_out(0) - ,float_raw_image(NULL) - ,image(NULL) + ,float_raw_image(nullptr) + ,image(nullptr) ,bright(1.),threshold(0.) ,half_size(0),four_color_rgb(0),document_mode(0),highlight(0) ,verbose(0) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index ac8b6fc0e..22c5f91d9 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -31,15 +31,15 @@ namespace rtengine extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) - : PipetteBuffer(editDataProvider), origCrop(NULL), laboCrop(NULL), labnCrop(NULL), - cropImg(NULL), cbuf_real(NULL), cshmap(NULL), transCrop(NULL), cieCrop(NULL), cbuffer(NULL), + : PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), + cropImg(nullptr), cbuf_real(nullptr), cshmap(nullptr), transCrop(nullptr), cieCrop(nullptr), cbuffer(nullptr), updating(false), newUpdatePending(false), skip(10), padding(0), cropx(0), cropy(0), cropw(-1), croph(-1), trafx(0), trafy(0), trafw(-1), trafh(-1), rqcropx(0), rqcropy(0), rqcropw(-1), rqcroph(-1), borderRequested(32), upperBorder(0), leftBorder(0), cropAllocated(false), - cropImageListener(NULL), parent(parent), isDetailWindow(isDetailWindow) + cropImageListener(nullptr), parent(parent), isDetailWindow(isDetailWindow) { parent->crops.push_back (this); } @@ -77,7 +77,7 @@ void Crop::setListener (DetailedCropListener* il) EditUniqueID Crop::getCurrEditID() { - EditSubscriber *subscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : NULL; + EditSubscriber *subscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; return subscriber ? subscriber->getEditID() : EUID_None; } @@ -90,17 +90,17 @@ void Crop::setEditSubscriber(EditSubscriber* newSubscriber) MyMutex::MyLock lock(cropMutex); // At this point, editCrop.dataProvider->currSubscriber is the old subscriber - EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : NULL; + EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; - if (newSubscriber == NULL || (oldSubscriber != NULL && oldSubscriber->getPipetteBufferType() != newSubscriber->getPipetteBufferType())) { - if (PipetteBuffer::imgFloatBuffer != NULL) { + if (newSubscriber == nullptr || (oldSubscriber != nullptr && oldSubscriber->getPipetteBufferType() != newSubscriber->getPipetteBufferType())) { + if (PipetteBuffer::imgFloatBuffer != nullptr) { delete PipetteBuffer::imgFloatBuffer; - PipetteBuffer::imgFloatBuffer = NULL; + PipetteBuffer::imgFloatBuffer = nullptr; } - if (PipetteBuffer::LabBuffer != NULL) { + if (PipetteBuffer::LabBuffer != nullptr) { delete PipetteBuffer::LabBuffer; - PipetteBuffer::LabBuffer = NULL; + PipetteBuffer::LabBuffer = nullptr; } if (PipetteBuffer::singlePlaneBuffer.getW() != -1) { @@ -164,7 +164,7 @@ void Crop::update (int todo) // printf("x=%d y=%d crow=%d croh=%d skip=%d\n",rqcropx, rqcropy, rqcropw, rqcroph, skip); // printf("trafx=%d trafyy=%d trafwsk=%d trafHs=%d \n",trafx, trafy, trafw*skip, trafh*skip); - Imagefloat *calclum = NULL;//for Luminance denoise curve + Imagefloat *calclum = nullptr;//for Luminance denoise curve NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; float autoNR = (float) settings->nrauto;// @@ -696,7 +696,7 @@ void Crop::update (int todo) delete transCrop; } - transCrop = NULL; + transCrop = nullptr; } if ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { @@ -955,7 +955,7 @@ void Crop::update (int todo) delete cieCrop; } - cieCrop = NULL; + cieCrop = nullptr; } } @@ -1018,47 +1018,47 @@ void Crop::freeAll () if (cropAllocated) { if (origCrop ) { delete origCrop; - origCrop = NULL; + origCrop = nullptr; } if (transCrop) { delete transCrop; - transCrop = NULL; + transCrop = nullptr; } if (laboCrop ) { delete laboCrop; - laboCrop = NULL; + laboCrop = nullptr; } if (labnCrop ) { delete labnCrop; - labnCrop = NULL; + labnCrop = nullptr; } if (cropImg ) { delete cropImg; - cropImg = NULL; + cropImg = nullptr; } if (cieCrop ) { delete cieCrop; - cieCrop = NULL; + cieCrop = nullptr; } if (cbuf_real) { delete [] cbuf_real; - cbuf_real = NULL; + cbuf_real = nullptr; } if (cbuffer ) { delete [] cbuffer; - cbuffer = NULL; + cbuffer = nullptr; } if (cshmap ) { delete cshmap; - cshmap = NULL; + cshmap = nullptr; } PipetteBuffer::flush(); @@ -1179,7 +1179,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte //cieCrop is only used in Crop::update, it is destroyed now but will be allocated on first use if (cieCrop) { delete cieCrop; - cieCrop = NULL; + cieCrop = nullptr; } if (cbuffer ) { @@ -1192,7 +1192,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte if (cshmap ) { delete cshmap; - cshmap = NULL; + cshmap = nullptr; } cbuffer = new float*[croph]; diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index 405a34118..0d85db8b8 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -104,8 +104,8 @@ void RawImageSource::eahd_demosaic () interpolate_row_g (gh[0], gv[0], 0); interpolate_row_g (gh[1], gv[1], 1); interpolate_row_g (gh[2], gv[2], 2); - interpolate_row_rb (rh[0], bh[0], NULL, gh[0], gh[1], 0); - interpolate_row_rb (rv[0], bv[0], NULL, gv[0], gv[1], 0); + interpolate_row_rb (rh[0], bh[0], nullptr, gh[0], gh[1], 0); + interpolate_row_rb (rv[0], bv[0], nullptr, gv[0], gv[1], 0); interpolate_row_rb (rh[1], bh[1], gh[0], gh[1], gh[2], 1); interpolate_row_rb (rv[1], bv[1], gv[0], gv[1], gv[2], 1); @@ -138,8 +138,8 @@ void RawImageSource::eahd_demosaic () interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], gh[(i + 2) % 4], i + 1); interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], gv[(i + 2) % 4], i + 1); } else { - interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], NULL, i + 1); - interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], NULL, i + 1); + interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], nullptr, i + 1); + interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], nullptr, i + 1); } convert_to_cielab_row (rh[(i + 1) % 3], gh[(i + 1) % 4], bh[(i + 1) % 3], lLh[(i + 1) % 3], lah[(i + 1) % 3], lbh[(i + 1) % 3]); @@ -285,9 +285,9 @@ void RawImageSource::eahd_demosaic () // Interpolate R and B for (int i = 0; i < H; i++) { if (i == 0) { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -550,9 +550,9 @@ void RawImageSource::hphd_demosaic () for (int i = 0; i < H; i++) { if (i == 0) { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -861,9 +861,9 @@ void RawImageSource::vng4_demosaic () // rm, gm, bm must be recovered //interpolate_row_rb_mul_pp (red, blue, NULL, green[i], green[i+1], i, rm, gm, bm, 0, W, 1); { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -1368,7 +1368,7 @@ SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int i float *qix[5]; float *buffer = (float *)calloc(rr1 * cc1 * 5 * sizeof(float), 1); - if(buffer == NULL) { // allocation of big block of memory failed, try to get 5 smaller ones + if(buffer == nullptr) { // allocation of big block of memory failed, try to get 5 smaller ones printf("lmmse_interpolate_omp: allocation of big memory block failed, try to get 5 smaller ones now...\n"); bool allocationFailed = false; @@ -4047,7 +4047,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab) double progressInc = 36.0 * (1.0 - progress) / ((H * W) / ((ts - 16) * (ts - 16))); const int ndir = 4 << (passes > 1); - cielab (0, 0, 0, 0, 0, 0, 0, 0); + cielab (nullptr, nullptr, nullptr, nullptr, 0, 0, 0, nullptr); struct s_minmaxgreen { float min; float max; diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index e06ac27e2..347b96792 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -45,7 +45,7 @@ inline dfInfo& dfInfo::operator =(const dfInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } return *this; @@ -138,7 +138,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -200,7 +200,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -332,11 +332,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -344,11 +344,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info && info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -359,14 +359,14 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } RawImage ri (filename); int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } dfList_t::iterator iter; @@ -406,7 +406,7 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch(Gio::Error&) {} - return 0; + return nullptr; } void DFManager::getStat( int &totFiles, int &totTemplates) @@ -433,7 +433,7 @@ void DFManager::getStat( int &totFiles, int &totTemplates) dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t ) { if( dfList.empty() ) { - return 0; + return nullptr; } std::string key( dfInfo::key(mak, mod, isospeed, shut) ); @@ -467,7 +467,7 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -478,7 +478,7 @@ RawImage* DFManager::searchDarkFrame( const std::string &mak, const std::string if( df ) { return df->getRawImage(); } else { - return 0; + return nullptr; } } @@ -496,7 +496,7 @@ RawImage* DFManager::searchDarkFrame( const Glib::ustring filename ) return df->getRawImage(); } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) { @@ -506,7 +506,7 @@ std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) } } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t ) { @@ -525,7 +525,7 @@ std::vector *DFManager::getHotPixels ( const std::string &mak, const std return &df->getHotPixels(); } else { - return 0; + return nullptr; } } @@ -624,7 +624,7 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std } if(!found) { - return 0; + return nullptr; } else { return &(iter->second); } diff --git a/rtengine/dfmanager.h b/rtengine/dfmanager.h index befe67f5a..1cc22723b 100644 --- a/rtengine/dfmanager.h +++ b/rtengine/dfmanager.h @@ -39,10 +39,10 @@ public: dfInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, int iso, double shut, time_t t) - : pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(NULL) {} + : pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(nullptr) {} dfInfo( const dfInfo &o) - : pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(NULL) {} + : pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(nullptr) {} ~dfInfo() { if( ri ) { diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 8b26c3121..eae00cad0 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -41,7 +41,7 @@ inline ffInfo& ffInfo::operator =(const ffInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } return *this; @@ -131,7 +131,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -193,7 +193,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -291,11 +291,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file ) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -303,11 +303,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info || info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -319,7 +319,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } @@ -327,7 +327,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } ffList_t::iterator iter; @@ -367,7 +367,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch (Gio::Error&) {} - return 0; + return nullptr; } void FFManager::getStat( int &totFiles, int &totTemplates) @@ -394,7 +394,7 @@ void FFManager::getStat( int &totFiles, int &totTemplates) ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const std::string &len, double focal, double apert, time_t t ) { if( ffList.empty() ) { - return 0; + return nullptr; } std::string key( ffInfo::key(mak, mod, len, focal, apert) ); @@ -428,7 +428,7 @@ ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const s } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -439,7 +439,7 @@ RawImage* FFManager::searchFlatField( const std::string &mak, const std::string if( ff ) { return ff->getRawImage(); } else { - return 0; + return nullptr; } } @@ -457,7 +457,7 @@ RawImage* FFManager::searchFlatField( const Glib::ustring filename ) return ff->getRawImage(); } - return 0; + return nullptr; } diff --git a/rtengine/ffmanager.h b/rtengine/ffmanager.h index 5f6b2d267..f285bb5bf 100644 --- a/rtengine/ffmanager.h +++ b/rtengine/ffmanager.h @@ -42,10 +42,10 @@ public: ffInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, const std::string & len, double focal, double apert, time_t t) - : pathname(name), maker(mak), model(mod), lens(len), aperture(apert), focallength(focal), timestamp(t), ri(NULL) {} + : pathname(name), maker(mak), model(mod), lens(len), aperture(apert), focallength(focal), timestamp(t), ri(nullptr) {} ffInfo( const ffInfo &o) - : pathname(o.pathname), maker(o.maker), model(o.model), lens(o.lens), aperture(o.aperture), focallength(o.focallength), timestamp(o.timestamp), ri(NULL) {} + : pathname(o.pathname), maker(o.maker), model(o.model), lens(o.lens), aperture(o.aperture), focallength(o.focallength), timestamp(o.timestamp), ri(nullptr) {} ~ffInfo() { if( ri ) { diff --git a/rtengine/iccjpeg.cc b/rtengine/iccjpeg.cc index fef281c49..21ba86f28 100644 --- a/rtengine/iccjpeg.cc +++ b/rtengine/iccjpeg.cc @@ -180,7 +180,7 @@ read_icc_profile (j_decompress_ptr cinfo, unsigned int data_length[MAX_SEQ_NO + 1]; /* size of profile data in marker */ unsigned int data_offset[MAX_SEQ_NO + 1]; /* offset for data in marker */ - *icc_data_ptr = NULL; /* avoid confusion if FALSE return */ + *icc_data_ptr = nullptr; /* avoid confusion if FALSE return */ *icc_data_len = 0; /* This first pass over the saved markers discovers whether there are @@ -191,7 +191,7 @@ read_icc_profile (j_decompress_ptr cinfo, marker_present[seq_no] = 0; } - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { + for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) { if (marker_is_icc(marker)) { if (num_markers == 0) { num_markers = GETJOCTET(marker->data[13]); @@ -236,12 +236,12 @@ read_icc_profile (j_decompress_ptr cinfo, /* Allocate space for assembled data */ icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); - if (icc_data == NULL) { + if (icc_data == nullptr) { return FALSE; /* oops, out of memory */ } /* and fill it in */ - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { + for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) { if (marker_is_icc(marker)) { JOCTET FAR *src_ptr; JOCTET *dst_ptr; diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 82f280e54..85409fd53 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -187,8 +187,8 @@ std::vector ICCStore::getProfilesFromDir (const Glib::ustring& di ProfileMap profiles; - loadProfiles (profilesDir, &profiles, NULL, NULL, false, true); - loadProfiles (dirName, &profiles, NULL, NULL, false, true); + loadProfiles (profilesDir, &profiles, nullptr, nullptr, false, true); + loadProfiles (dirName, &profiles, nullptr, nullptr, false, true); for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { res.push_back (profile->first); @@ -201,14 +201,14 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) { // forgive me for the messy code, quick hack to change gamma of an ICC profile to the RT standard gamma if (!iprof) { - return NULL; + return nullptr; } cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(iprof, 0, &bytesNeeded); + cmsSaveProfileToMem(iprof, nullptr, &bytesNeeded); if (bytesNeeded == 0) { - return NULL; + return nullptr; } uint8_t *data = new uint8_t[bytesNeeded + 1]; @@ -407,7 +407,7 @@ cmsHPROFILE ICCStore::getStdProfile (const Glib::ustring& name) const // profile does not exist if (f == fileStdProfilesFileNames.end ()) { - return NULL; + return nullptr; } // but there exists one => load it @@ -464,15 +464,15 @@ void ICCStore::init (const Glib::ustring& usrICCDir, const Glib::ustring& rtICCD profilesDir = Glib::build_filename (rtICCDir, "output"); fileProfiles.clear(); fileProfileContents.clear(); - loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, NULL, false, true); - loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, NULL, false, true); + loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, nullptr, false, true); + loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, nullptr, false, true); // Input profiles // Load these to different areas, since the short name (e.g. "NIKON D700" may overlap between system/user and RT dir) stdProfilesDir = Glib::build_filename (rtICCDir, "input"); fileStdProfiles.clear(); fileStdProfilesFileNames.clear(); - loadProfiles (stdProfilesDir, NULL, NULL, &fileStdProfilesFileNames, true, false); + loadProfiles (stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true, false); } // Determine the first monitor default profile of operating system, if selected @@ -515,7 +515,7 @@ void ICCStore::findDefaultMonitorProfile () } } -ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(NULL), length(0) +ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(nullptr), length(0) { FILE* f = g_fopen (fileName.c_str (), "rb"); @@ -542,16 +542,16 @@ ProfileContent::ProfileContent (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } } -ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(NULL), length(0) +ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(nullptr), length(0) { - if (hProfile != NULL) { + if (hProfile != nullptr) { cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(hProfile, 0, &bytesNeeded); + cmsSaveProfileToMem(hProfile, nullptr, &bytesNeeded); if (bytesNeeded > 0) { data = new char[bytesNeeded + 1]; @@ -573,7 +573,7 @@ ProfileContent& ProfileContent::operator= (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } return *this; @@ -585,7 +585,7 @@ cmsHPROFILE ProfileContent::toProfile () const if (data) { return cmsOpenProfileFromMem (data, length); } else { - return NULL; + return nullptr; } } diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 05281f9df..62212e397 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -120,7 +120,7 @@ public: #define iccStore ICCStore::getInstance() inline ProfileContent::ProfileContent () : - data(NULL), + data(nullptr), length(0) { } diff --git a/rtengine/iimage.h b/rtengine/iimage.h index cd49c1329..70f07d68f 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -144,7 +144,7 @@ public: #if CHECK_BOUNDS PlanarPtr() : width_(0), height_(0), ptrs (NULL) {} #else - PlanarPtr() : ptrs (NULL) {} + PlanarPtr() : ptrs (nullptr) {} #endif bool resize(int newSize) @@ -153,7 +153,7 @@ public: ptrs = ab.data; return true; } else { - ptrs = NULL; + ptrs = nullptr; return false; } } @@ -219,8 +219,8 @@ public: T* data; PlanarPtr v; // v stands for "value", whatever it represent - PlanarWhateverData() : rowstride(0), data (NULL) {} - PlanarWhateverData(int w, int h) : rowstride(0), data (NULL) + PlanarWhateverData() : rowstride(0), data (nullptr) {} + PlanarWhateverData(int w, int h) : rowstride(0), data (nullptr) { allocate(w, h); } @@ -291,7 +291,7 @@ public: } else { // asking for a new size of 0 is safe and will free memory, if any! abData.resize(0); - data = NULL; + data = nullptr; v.resize(0); width = height = -1; #if CHECK_BOUNDS @@ -593,7 +593,7 @@ public: PlanarPtr b; PlanarRGBData() : rowstride(0), planestride(0), data (NULL) {} - PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (NULL) + PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (nullptr) { allocate(w, h); } @@ -683,7 +683,7 @@ public: } else { // asking for a new size of 0 is safe and will free memory, if any! abData.resize(0); - data = NULL; + data = nullptr; r.resize(0); g.resize(0); b.resize(0); @@ -1165,7 +1165,7 @@ public: #if CHECK_BOUNDS ChunkyPtr() : ptr (NULL), width(-1), width_(0), height_(0) {} #else - ChunkyPtr() : ptr (NULL), width(-1) {} + ChunkyPtr() : ptr (nullptr), width(-1) {} #endif void init(T* base, int w = -1) { @@ -1232,7 +1232,7 @@ public: ChunkyPtr b; ChunkyRGBData() : data (NULL) {} - ChunkyRGBData(int w, int h) : data (NULL) + ChunkyRGBData(int w, int h) : data (nullptr) { allocate(w, h); } @@ -1299,10 +1299,10 @@ public: g.init(data + 1, width); b.init(data + 2, width); } else { - data = NULL; - r.init(NULL); - g.init(NULL); - b.init(NULL); + data = nullptr; + r.init(nullptr); + g.init(nullptr); + b.init(nullptr); width = height = -1; #if CHECK_BOUNDS r.width_ = r.height_ = -1; @@ -1315,7 +1315,7 @@ public: /** Copy the data to another ChunkyRGBData */ void copyData(ChunkyRGBData *dest) { - assert (dest != NULL); + assert (dest != nullptr); // Make sure that the size is the same, reallocate if necessary dest->allocate(width, height); diff --git a/rtengine/image16.h b/rtengine/image16.h index 0e1ac6786..05357839c 100644 --- a/rtengine/image16.h +++ b/rtengine/image16.h @@ -56,7 +56,7 @@ public: return 8 * sizeof(unsigned short); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImage16: virtual MyMutex& getMutex () diff --git a/rtengine/image8.cc b/rtengine/image8.cc index d7a49138b..8cb2b887a 100644 --- a/rtengine/image8.cc +++ b/rtengine/image8.cc @@ -40,7 +40,7 @@ Image8::~Image8 () void Image8::getScanline (int row, unsigned char* buffer, int bps) { - if (data == NULL) { + if (data == nullptr) { return; } @@ -58,7 +58,7 @@ void Image8::getScanline (int row, unsigned char* buffer, int bps) void Image8::setScanline (int row, unsigned char* buffer, int bps, float *minValue, float *maxValue) { - if (data == NULL) { + if (data == nullptr) { return; } diff --git a/rtengine/image8.h b/rtengine/image8.h index 188e20146..d0d7445e0 100644 --- a/rtengine/image8.h +++ b/rtengine/image8.h @@ -51,7 +51,7 @@ public: return 8 * sizeof(unsigned char); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImage*: virtual MyMutex& getMutex () diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 2622ffcf7..c3e8c7780 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -48,8 +48,8 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed( { size_t dotpos = fname.find_last_of ('.'); - root = NULL; - iptc = NULL; + root = nullptr; + iptc = nullptr; if (ri && (ri->exifBase >= 0 || ri->ciffBase >= 0)) { FILE* f = g_fopen (fname.c_str (), "rb"); @@ -205,7 +205,7 @@ void ImageData::extractInfo () orientation = root->getTag ("Orientation")->valueToString (); } - rtexif::TagDirectory* exif = NULL; + rtexif::TagDirectory* exif = nullptr; if (root->getTag ("Exif")) { exif = root->getTag ("Exif")->getDirectory (); @@ -506,7 +506,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const unsigned char buffer[2100]; for (int i = 0; i < 16; i++) { - IptcDataSet* ds = iptc_data_get_next_dataset (iptc, NULL, IPTC_RECORD_APP_2, strTags[i].tag); + IptcDataSet* ds = iptc_data_get_next_dataset (iptc, nullptr, IPTC_RECORD_APP_2, strTags[i].tag); if (ds) { iptc_dataset_get_data (ds, buffer, 2100); @@ -518,7 +518,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const } } - IptcDataSet* ds = NULL; + IptcDataSet* ds = nullptr; std::vector keywords; while ((ds = iptc_data_get_next_dataset (iptc, ds, IPTC_RECORD_APP_2, IPTC_TAG_KEYWORDS))) { @@ -527,7 +527,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const } iptcc["Keywords"] = keywords; - ds = NULL; + ds = nullptr; std::vector suppCategories; while ((ds = iptc_data_get_next_dataset (iptc, ds, IPTC_RECORD_APP_2, IPTC_TAG_SUPPL_CATEGORY))) { @@ -623,20 +623,20 @@ extern "C" { unsigned int iptc_len; if (!infile) { - return NULL; + return nullptr; } d = iptc_data_new (); if (!d) { - return NULL; + return nullptr; } buf = (unsigned char*)iptc_mem_alloc (d->priv->mem, buf_len); if (!buf) { iptc_data_unref (d); - return NULL; + return nullptr; } len = iptc_jpeg_read_ps3 (infile, buf, buf_len); @@ -659,7 +659,7 @@ extern "C" { failure: iptc_mem_free (d->priv->mem, buf); iptc_data_unref (d); - return NULL; + return nullptr; } } diff --git a/rtengine/imagedata.h b/rtengine/imagedata.h index 9ec3558c1..f28a49a2f 100644 --- a/rtengine/imagedata.h +++ b/rtengine/imagedata.h @@ -54,7 +54,7 @@ protected: public: - ImageData (Glib::ustring fname, RawMetaDataLocation* rml = NULL); + ImageData (Glib::ustring fname, RawMetaDataLocation* rml = nullptr); virtual ~ImageData (); const rtexif::TagDirectory* getExifData () const diff --git a/rtengine/imagefloat.cc b/rtengine/imagefloat.cc index ae4a1a09b..f4629682d 100644 --- a/rtengine/imagefloat.cc +++ b/rtengine/imagefloat.cc @@ -47,7 +47,7 @@ Imagefloat::~Imagefloat () void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, float *minValue, float *maxValue) { - if (data == NULL) { + if (data == nullptr) { return; } @@ -146,7 +146,7 @@ void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, float *mi void Imagefloat::getScanline (int row, unsigned char* buffer, int bps) { - if (data == NULL) { + if (data == nullptr) { return; } diff --git a/rtengine/imagefloat.h b/rtengine/imagefloat.h index 50b0d4aeb..1083ac609 100644 --- a/rtengine/imagefloat.h +++ b/rtengine/imagefloat.h @@ -60,7 +60,7 @@ public: return 8 * sizeof(float); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImagefloat: virtual MyMutex& getMutex () diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index a9be4e7e3..0b3d17905 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -52,7 +52,7 @@ namespace // Opens a file for binary writing and request exclusive lock (cases were you need "wb" mode plus locking) FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) { - FILE* f = NULL; + FILE* f = nullptr; #ifdef WIN32 @@ -91,13 +91,13 @@ Glib::ustring ImageIO::errorMsg[6] = {"Success", "Cannot read file.", "Invalid h // For only copying the raw input data void ImageIO::setMetadata (const rtexif::TagDirectory* eroot) { - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (NULL); + rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (nullptr); // make IPTC and XMP pass through td->keepTag(0x83bb); // IPTC @@ -115,18 +115,18 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr exifChange.clear(); exifChange = exif; - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - exifRoot = ((rtexif::TagDirectory*)eroot)->clone (NULL); + exifRoot = ((rtexif::TagDirectory*)eroot)->clone (nullptr); } - if (iptc != NULL) { + if (iptc != nullptr) { iptc_data_free (iptc); - iptc = NULL; + iptc = nullptr; } // build iptc structures for libiptcdata @@ -184,7 +184,7 @@ void ImageIO::setOutputProfile (char* pdata, int plen) profileData = new char [plen]; memcpy (profileData, pdata, plen); } else { - profileData = NULL; + profileData = nullptr; } profileLength = plen; @@ -224,7 +224,7 @@ int ImageIO::getPNGSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -303,7 +303,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -331,7 +331,7 @@ int ImageIO::loadPNG (Glib::ustring fname) png_read_info(png, info); - embProfile = NULL; + embProfile = nullptr; //retrieving image information png_uint_32 width, height; @@ -388,7 +388,7 @@ int ImageIO::loadPNG (Glib::ustring fname) for (unsigned int i = 0; i < height; i++) { - png_read_row (png, (png_byte*)row, NULL); + png_read_row (png, (png_byte*)row, nullptr); if (bit_depth == 16) { // convert scanline to host byte order unsigned short* srow = (unsigned short*)row; @@ -405,7 +405,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } } - png_read_end (png, 0); + png_read_end (png, nullptr); png_destroy_read_struct (&png, &info, &end_info); delete [] row; @@ -489,7 +489,7 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -568,7 +568,7 @@ int ImageIO::loadJPEG (Glib::ustring fname) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -623,7 +623,7 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -732,7 +732,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -821,7 +821,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) // Saving the profile in the memory cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(embProfile, 0, &bytesNeeded); + cmsSaveProfileToMem(embProfile, nullptr, &bytesNeeded); if (bytesNeeded > 0) { loadedProfileData = new char[bytesNeeded + 1]; @@ -836,7 +836,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) } } else { - embProfile = NULL; + embProfile = nullptr; } allocate (width, height); @@ -859,7 +859,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { setScanline (row, linebuffer, bitspersample, minValue, maxValue); } else { - setScanline (row, linebuffer, bitspersample, NULL, NULL); + setScanline (row, linebuffer, bitspersample, nullptr, nullptr); } if (pl && !(row % 100)) { @@ -930,7 +930,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) pl->setProgress (0.0); } - png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -940,7 +940,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) png_infop info = png_create_info_struct(png); if (!info) { - png_destroy_write_struct (&png, 0); + png_destroy_write_struct (&png, nullptr); fclose (file); return IMIO_HEADERERROR; } @@ -1123,7 +1123,7 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) int bytes = 0; - if (!error && (bytes = iptc_jpeg_ps3_save_iptc (NULL, 0, iptcdata, size, buffer, 65532)) < 0) { + if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, buffer, 65532)) < 0) { if (iptcdata) { iptc_data_free_buf (iptc, iptcdata); } @@ -1329,23 +1329,23 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) //TODO Even though we are saving EXIF IFD - MakerNote still comes out screwed. - if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != nullptr) { TIFFSetField (out, TIFFTAG_MODEL, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != nullptr) { TIFFSetField (out, TIFFTAG_MAKE, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != nullptr) { TIFFSetField (out, TIFFTAG_DATETIME, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != nullptr) { TIFFSetField (out, TIFFTAG_ARTIST, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != nullptr) { TIFFSetField (out, TIFFTAG_COPYRIGHT, tag->getValue()); } @@ -1442,7 +1442,7 @@ void png_flush(png_structp png_ptr) FILE *io_ptr; io_ptr = (FILE *)(png_get_io_ptr(png_ptr)); - if (io_ptr != NULL) { + if (io_ptr != nullptr) { fflush(io_ptr); } } diff --git a/rtengine/imageio.h b/rtengine/imageio.h index 1a13458c1..00bdbece1 100644 --- a/rtengine/imageio.h +++ b/rtengine/imageio.h @@ -97,13 +97,13 @@ private: } } - loadedProfileData = NULL; + loadedProfileData = nullptr; } public: static Glib::ustring errorMsg[6]; - ImageIO () : pl (NULL), embProfile(NULL), profileData(NULL), profileLength(0), loadedProfileData(NULL), loadedProfileDataJpg(false), - loadedProfileLength(0), iptc(NULL), exifRoot (NULL), sampleFormat(IIOSF_UNKNOWN), + ImageIO () : pl (nullptr), embProfile(nullptr), profileData(nullptr), profileLength(0), loadedProfileData(nullptr), loadedProfileDataJpg(false), + loadedProfileLength(0), iptc(nullptr), exifRoot (nullptr), sampleFormat(IIOSF_UNKNOWN), sampleArrangement(IIOSA_UNKNOWN) {} virtual ~ImageIO (); @@ -137,7 +137,7 @@ public: virtual int getBPS () = 0; virtual void getScanline (int row, unsigned char* buffer, int bps) {} - virtual void setScanline (int row, unsigned char* buffer, int bps, float minValue[3] = NULL, float maxValue[3] = NULL) {} + virtual void setScanline (int row, unsigned char* buffer, int bps, float minValue[3] = nullptr, float maxValue[3] = nullptr) {} virtual bool readImage (Glib::ustring &fname, FILE *fh) { diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 305c67da5..681da1f3d 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -63,7 +63,7 @@ protected: public: ImageSource () : references (1), redAWBMul(-1.), greenAWBMul(-1.), blueAWBMul(-1.), - embProfile(NULL), idata(NULL), dirpyrdenoiseExpComp(INFINITY) {} + embProfile(nullptr), idata(nullptr), dirpyrdenoiseExpComp(INFINITY) {} virtual ~ImageSource () {} virtual int load (const Glib::ustring &fname, bool batch = false) = 0; @@ -111,7 +111,7 @@ public: virtual bool isRAW() const = 0; virtual DCPProfile* getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - return NULL; + return nullptr; }; virtual void setProgressListener (ProgressListener* pl) {} diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 8925b29e0..981a1ebd7 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -32,8 +32,8 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(NULL), oprevi(NULL), oprevl(NULL), nprevl(NULL), previmg(NULL), workimg(NULL), - ncie(NULL), imgsrc(NULL), shmap(NULL), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), scale(10), + : orig_prev(nullptr), oprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), + ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), @@ -86,7 +86,7 @@ ImProcCoordinator::ImProcCoordinator () bcurvehist(256), bcurvehistCropped(256), bbeforehist(256), fullw(1), fullh(1), pW(-1), pH(-1), - plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), + plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), resultValid(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1) @@ -539,7 +539,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (oprevi, oprevl, NULL, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, + ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as); if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { @@ -611,7 +611,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); - ipf.chromiLuminanceCurve (NULL, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); + ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); ipf.vibrance(nprevl); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { @@ -765,7 +765,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) delete ncie; } - ncie = NULL; + ncie = nullptr; if (CAMBrightCurveJ) { CAMBrightCurveJ.reset(); @@ -849,19 +849,19 @@ void ImProcCoordinator::freeAll () delete oprevi; } - oprevi = NULL; + oprevi = nullptr; delete orig_prev; - orig_prev = NULL; + orig_prev = nullptr; delete oprevl; - oprevl = NULL; + oprevl = nullptr; delete nprevl; - nprevl = NULL; + nprevl = nullptr; if (ncie) { delete ncie; } - ncie = NULL; + ncie = nullptr; if (imageListener) { imageListener->delImage (previmg); @@ -875,7 +875,7 @@ void ImProcCoordinator::freeAll () delete shmap; } - shmap = NULL; + shmap = nullptr; } @@ -1094,7 +1094,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & MyMutex::MyLock lock(mProcessing); - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); @@ -1262,7 +1262,7 @@ void ImProcCoordinator::startProcessing () if (!destroying) { if (!updaterRunning) { updaterThreadStart.lock (); - thread = NULL; + thread = nullptr; updaterRunning = true; updaterThreadStart.unlock (); diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 0fb0041f3..0a0cbb2b0 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -174,7 +174,7 @@ protected: void reallocAll (); void updateLRGBHistograms (); void setScale (int prevscale); - void updatePreviewImage (int todo, Crop* cropCall = NULL); + void updatePreviewImage (int todo, Crop* cropCall = nullptr); MyMutex mProcessing; ProcParams params; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index ce65bc2f8..9eedfde2a 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -214,7 +214,7 @@ public: ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(NULL), lab2outputTransform(NULL), output2monitorTransform(NULL), params(iparams), scale(1), multiThread(imultiThread) {} + : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread) {} ~ImProcFunctions (); void setScale (double iscale); @@ -279,7 +279,7 @@ public: void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = NULL); + float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); @@ -314,11 +314,11 @@ public: void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); - void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = NULL); + void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); - void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = NULL); + void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); @@ -335,7 +335,7 @@ public: const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = NULL, bool madCalculated = false); + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); @@ -366,11 +366,11 @@ public: Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw);//without gamma ==>default // CieImage *ciec; - bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); - bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); + bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); + bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); - double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = NULL); + double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; diff --git a/rtengine/init.cc b/rtengine/init.cc index 3b2c5fbdc..27edd976b 100644 --- a/rtengine/init.cc +++ b/rtengine/init.cc @@ -35,7 +35,7 @@ namespace rtengine const Settings* settings; -MyMutex* lcmsMutex = NULL; +MyMutex* lcmsMutex = nullptr; int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir) { diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 9e81f4f90..805fb766b 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -146,7 +146,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } lcmsMutex->lock (); - cmsHPROFILE hLab = cmsCreateLab4Profile(NULL); + cmsHPROFILE hLab = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (hLab, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, intent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); // NOCACHE is important for thread safety cmsCloseProfile(hLab); @@ -508,8 +508,8 @@ Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int Parameters[6] = ga6; // 7 parameters for smoother curves cmsWhitePointFromTemp(&xyD, t50); - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters);//5 = more smoother than 4 - cmsHPROFILE oprofdef = cmsCreateRGBProfileTHR(NULL, &xyD, &Primaries, GammaTRC); //oprofdef becomes Outputprofile + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters);//5 = more smoother than 4 + cmsHPROFILE oprofdef = cmsCreateRGBProfileTHR(nullptr, &xyD, &Primaries, GammaTRC); //oprofdef becomes Outputprofile cmsFreeToneCurve(GammaTRC[0]); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 547ebf69c..d22fe08f2 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -43,7 +43,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, green.clear (); blue.clear (); - if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == NULL)) { + if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) { for (size_t i = 0; i < src.size(); i++) { red.push_back (Coord2D (src[i].x, src[i].y)); green.push_back (Coord2D (src[i].x, src[i].y)); @@ -234,7 +234,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, double focalLen, double focalLen35mm, float focusDist, int rawRotationDeg, bool fullImage) { - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip LCPProfile *pLCPProf = lcpStore->getProfile(params->lensProf.lcpFile); @@ -703,7 +703,7 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr oH * tan(hpalpha) * sqrt(SQR(4 * maxRadius) + SQR(oH * tan(hpalpha)))) / (SQR(maxRadius) * 8))); double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); - double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, fullImage ? pLCPMap : NULL) : 1.0; + double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, fullImage ? pLCPMap : nullptr) : 1.0; // smaller crop images are a problem, so only when processing fully bool enableLCPCA = pLCPMap && params->lensProf.useCA && fullImage && pLCPMap->enableCA; @@ -1005,7 +1005,7 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap) { - if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == NULL)) { + if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) { return 1; } diff --git a/rtengine/ipvibrance.cc b/rtengine/ipvibrance.cc index 1d152c737..215763f43 100644 --- a/rtengine/ipvibrance.cc +++ b/rtengine/ipvibrance.cc @@ -77,7 +77,7 @@ void ImProcFunctions::vibrance (LabImage* lab) // int skip=1; //scale==1 ? 1 : 16; bool skinCurveIsSet = false; - DiagonalCurve* dcurve = NULL; + DiagonalCurve* dcurve = nullptr; dcurve = new DiagonalCurve (params->vibrance.skintonescurve, CURVES_MIN_POLY_POINTS); if (dcurve) { @@ -85,14 +85,14 @@ void ImProcFunctions::vibrance (LabImage* lab) skinCurveIsSet = true; } else { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } } if (!skinCurveIsSet && !params->vibrance.pastels && !params->vibrance.saturated) { if (dcurve) { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } return; @@ -117,7 +117,7 @@ void ImProcFunctions::vibrance (LabImage* lab) if (dcurve) { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } @@ -180,7 +180,7 @@ void ImProcFunctions::vibrance (LabImage* lab) #ifdef _DEBUG - MunsellDebugInfo* MunsDebugInfo = NULL; + MunsellDebugInfo* MunsDebugInfo = nullptr; if (avoidcolorshift) { MunsDebugInfo = new MunsellDebugInfo(); diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 048f1b5d6..76dd15e59 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -699,7 +699,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int int height = tilebottom - tiletop; LabImage * labco; float **Lold; - float *LoldBuffer = NULL; + float *LoldBuffer = nullptr; if(numtiles == 1) { // untiled processing => we can use output buffer for labco labco = dst; @@ -825,7 +825,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int for(int i = (tileheight + 1) / 2; i < tileheight; i++) { delete [] varhue[i]; - varhue[i] = NULL; + varhue[i] = nullptr; } } else { // reduce the varhue array to get faster access in following processing for (int i = 0; i < (tileheight + 1) / 2; i++) { @@ -915,21 +915,21 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int vari[1] = max(0.0001f, vari[1]); vari[2] = max(0.0001f, vari[2]); vari[3] = max(0.0001f, vari[3]); - float* noisevarlum = NULL; // we need a dummy to pass it to WaveletDenoiseAllL + float* noisevarlum = nullptr; // we need a dummy to pass it to WaveletDenoiseAllL WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge); } ind = 1; //Flat curve for Contrast=f(H) in levels - FlatCurve* ChCurve = NULL;//curve C=f(H) + FlatCurve* ChCurve = nullptr;//curve C=f(H) bool Chutili = false; ChCurve = new FlatCurve(params->wavelet.Chcurve); if (!ChCurve || ChCurve->isIdentity()) { if (ChCurve) { delete ChCurve; - ChCurve = NULL; + ChCurve = nullptr; } } else { Chutili = true; @@ -952,14 +952,14 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } //Flat curve for H=f(H) in residual image - FlatCurve* hhCurve = NULL;//curve H=f(H) + FlatCurve* hhCurve = nullptr;//curve H=f(H) bool hhutili = false; hhCurve = new FlatCurve(params->wavelet.hhcurve); if (!hhCurve || hhCurve->isIdentity()) { if (hhCurve) { delete hhCurve; - hhCurve = NULL; + hhCurve = nullptr; } } else { hhutili = true; @@ -1224,7 +1224,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } } - if(LoldBuffer != NULL) { + if(LoldBuffer != nullptr) { delete [] LoldBuffer; delete [] Lold; } @@ -1236,7 +1236,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } for (int i = 0; i < tileheight; i++) - if(varhue[i] != NULL) { + if(varhue[i] != nullptr) { delete [] varhue[i]; } @@ -1435,7 +1435,7 @@ float *ImProcFunctions::ContrastDR(float *Source, int skip, struct cont_params & { int n = W_L * H_L; - if(Contrast == NULL) { + if(Contrast == nullptr) { Contrast = new float[n]; } @@ -1489,7 +1489,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int skip, struct c float *ucr = ContrastDR(Source, skip, cp, W_L, H_L, Compression, DetailBoost, max0, min0, ave, ah, bh, al, bl, factorx); - if(Compressed == NULL) { + if(Compressed == nullptr) { Compressed = ucr; } @@ -1697,7 +1697,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float max0 = 0.f; float min0 = FLT_MAX; - if(contrast != 0.f || cp.tonemap && cp.resena) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step + if(contrast != 0.f || (cp.tonemap && cp.resena)) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step #ifdef _RT_NESTED_OPENMP #pragma omp parallel for reduction(+:avedbl) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1771,7 +1771,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float *koeLi[12]; float maxkoeLi[12]; - float *koeLibuffer = NULL; + float *koeLibuffer = nullptr; for(int y = 0; y < 12; y++) { maxkoeLi[y] = 0.f; //9 diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc index ff509301d..0c2a13ed0 100644 --- a/rtengine/jdatasrc.cc +++ b/rtengine/jdatasrc.cc @@ -213,7 +213,7 @@ my_jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) * This makes it unsafe to use this manager and a different source * manager serially with the same JPEG object. Caveat programmer. */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ + if (cinfo->src == nullptr) { /* first time for this JPEG object? */ cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); @@ -231,7 +231,7 @@ my_jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) src->pub.term_source = my_term_source; src->infile = infile; src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ - src->pub.next_input_byte = NULL; /* until buffer loaded */ + src->pub.next_input_byte = nullptr; /* until buffer loaded */ } METHODDEF(void) @@ -338,7 +338,7 @@ format_message (j_common_ptr cinfo, char * buffer) { struct jpeg_error_mgr * err = cinfo->err; int msg_code = err->msg_code; - const char * msgtext = NULL; + const char * msgtext = nullptr; const char * msgptr; char ch; boolean isstring; @@ -346,14 +346,14 @@ format_message (j_common_ptr cinfo, char * buffer) /* Look up message string in proper table */ if (msg_code > 0 && msg_code <= err->last_jpeg_message) { msgtext = err->jpeg_message_table[msg_code]; - } else if (err->addon_message_table != NULL && + } else if (err->addon_message_table != nullptr && msg_code >= err->first_addon_message && msg_code <= err->last_addon_message) { msgtext = err->addon_message_table[msg_code - err->first_addon_message]; } /* Defend against bogus message number */ - if (msgtext == NULL) { + if (msgtext == nullptr) { err->msg_parm.i[0] = msg_code; msgtext = err->jpeg_message_table[0]; } @@ -419,7 +419,7 @@ my_jpeg_std_error (struct jpeg_error_mgr * err) err->jpeg_message_table = jpeg_std_message_table; err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; - err->addon_message_table = NULL; + err->addon_message_table = nullptr; err->first_addon_message = 0; /* for safety */ err->last_addon_message = 0; diff --git a/rtengine/jpeg_memsrc.cc b/rtengine/jpeg_memsrc.cc index ab4ecf7d6..5459af8b6 100644 --- a/rtengine/jpeg_memsrc.cc +++ b/rtengine/jpeg_memsrc.cc @@ -155,7 +155,7 @@ jpeg_memory_src (j_decompress_ptr cinfo, const JOCTET * buffer, size_t bufsize) * This makes it unsafe to use this manager and a different source * manager serially with the same JPEG object. Caveat programmer. */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ + if (cinfo->src == nullptr) { /* first time for this JPEG object? */ cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); diff --git a/rtengine/klt/klt.cc b/rtengine/klt/klt.cc index 831914754..54bb2f93a 100644 --- a/rtengine/klt/klt.cc +++ b/rtengine/klt/klt.cc @@ -73,7 +73,7 @@ static void** _createArray2D(int ncols, int nrows, int nbytes) tt = (char **) malloc(nrows * sizeof(void *) + ncols * nrows * nbytes); - if (tt == NULL) { + if (tt == nullptr) { KLTError("(createArray2D) Out of memory"); exit(1); } @@ -115,9 +115,9 @@ KLT_TrackingContext KLTCreateTrackingContext() tc->pyramid_sigma_fact = pyramid_sigma_fact; tc->step_factor = step_factor; tc->nSkippedPixels = nSkippedPixels; - tc->pyramid_last = NULL; - tc->pyramid_last_gradx = NULL; - tc->pyramid_last_grady = NULL; + tc->pyramid_last = nullptr; + tc->pyramid_last_gradx = nullptr; + tc->pyramid_last_grady = nullptr; /* for affine mapping */ tc->affineConsistencyCheck = affineConsistencyCheck; tc->affine_window_width = affine_window_size; @@ -164,9 +164,9 @@ KLT_FeatureList KLTCreateFeatureList( first = (KLT_Feature) (fl->feature + nFeatures); for (i = 0 ; i < nFeatures ; i++) { fl->feature[i] = first + i; - fl->feature[i]->aff_img = NULL; /* initialization fixed by Sinisa Segvic */ - fl->feature[i]->aff_img_gradx = NULL; - fl->feature[i]->aff_img_grady = NULL; + fl->feature[i]->aff_img = nullptr; /* initialization fixed by Sinisa Segvic */ + fl->feature[i]->aff_img_gradx = nullptr; + fl->feature[i]->aff_img_grady = nullptr; } /* Return feature list */ return(fl); @@ -272,13 +272,13 @@ void KLTPrintTrackingContext( fprintf(stderr, "\tnPyramidLevels = %d\n", tc->nPyramidLevels); fprintf(stderr, "\tsubsampling = %d\n", tc->subsampling); - fprintf(stderr, "\n\tpyramid_last = %s\n", (tc->pyramid_last!=NULL) ? + fprintf(stderr, "\n\tpyramid_last = %s\n", (tc->pyramid_last!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\tpyramid_last_gradx = %s\n", - (tc->pyramid_last_gradx!=NULL) ? + (tc->pyramid_last_gradx!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\tpyramid_last_grady = %s\n", - (tc->pyramid_last_grady!=NULL) ? + (tc->pyramid_last_grady!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\n\n"); } @@ -464,9 +464,9 @@ void KLTFreeFeatureList( _KLTFreeFloatImage(fl->feature[indx]->aff_img); _KLTFreeFloatImage(fl->feature[indx]->aff_img_gradx); _KLTFreeFloatImage(fl->feature[indx]->aff_img_grady); - fl->feature[indx]->aff_img = NULL; - fl->feature[indx]->aff_img_gradx = NULL; - fl->feature[indx]->aff_img_grady = NULL; + fl->feature[indx]->aff_img = nullptr; + fl->feature[indx]->aff_img_gradx = nullptr; + fl->feature[indx]->aff_img_grady = nullptr; } free(fl); @@ -498,9 +498,9 @@ void KLTStopSequentialMode( _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last); _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last_gradx); _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last_grady); - tc->pyramid_last = NULL; - tc->pyramid_last_gradx = NULL; - tc->pyramid_last_grady = NULL; + tc->pyramid_last = nullptr; + tc->pyramid_last_gradx = nullptr; + tc->pyramid_last_grady = nullptr; } diff --git a/rtengine/klt/klt_util.cc b/rtengine/klt/klt_util.cc index e1fc342f3..c01022445 100644 --- a/rtengine/klt/klt_util.cc +++ b/rtengine/klt/klt_util.cc @@ -40,7 +40,7 @@ _KLT_FloatImage _KLTCreateFloatImage( ncols * nrows * sizeof(float); floatimg = (_KLT_FloatImage) malloc(nbytes); - if (floatimg == NULL) { + if (floatimg == nullptr) { KLTError("(_KLTCreateFloatImage) Out of memory"); exit(1); } diff --git a/rtengine/klt/pnmio.cc b/rtengine/klt/pnmio.cc index de8a1b0d9..b25dc3ca8 100644 --- a/rtengine/klt/pnmio.cc +++ b/rtengine/klt/pnmio.cc @@ -130,7 +130,7 @@ void pgmReadHeaderFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(pgmReadHeaderFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -156,7 +156,7 @@ void ppmReadHeaderFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(ppmReadHeaderFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -188,9 +188,9 @@ unsigned char* pgmRead( pgmReadHeader(fp, &magic, ncols, nrows, &maxval); /* Allocate memory, if necessary, and set pointer */ - if (img == NULL) { + if (img == nullptr) { ptr = (unsigned char *) malloc(*ncols * *nrows * sizeof(char)); - if (ptr == NULL) { + if (ptr == nullptr) { KLTError("(pgmRead) Memory not allocated"); exit(1); } @@ -226,7 +226,7 @@ unsigned char* pgmReadFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(pgmReadFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -279,7 +279,7 @@ void pgmWriteFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "wb")) == NULL) { + if ( (fp = fopen(fname, "wb")) == nullptr) { KLTError("(pgmWriteFile) Can't open file named '%s' for writing\n", fname); exit(1); } @@ -338,7 +338,7 @@ void ppmWriteFileRGB( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "wb")) == NULL) { + if ( (fp = fopen(fname, "wb")) == nullptr) { KLTError("(ppmWriteFileRGB) Can't open file named '%s' for writing\n", fname); exit(1); } diff --git a/rtengine/klt/pyramid.cc b/rtengine/klt/pyramid.cc index e8b9f47ec..e72ffb237 100644 --- a/rtengine/klt/pyramid.cc +++ b/rtengine/klt/pyramid.cc @@ -43,7 +43,7 @@ _KLT_Pyramid _KLTCreatePyramid( /* Allocate memory for structure and set parameters */ pyramid = (_KLT_Pyramid) malloc(nbytes); - if (pyramid == NULL) { + if (pyramid == nullptr) { KLTError("(_KLTCreatePyramid) Out of memory"); exit(1); } diff --git a/rtengine/klt/selectGoodFeatures.cc b/rtengine/klt/selectGoodFeatures.cc index 176057f39..20e67fb2e 100644 --- a/rtengine/klt/selectGoodFeatures.cc +++ b/rtengine/klt/selectGoodFeatures.cc @@ -179,9 +179,9 @@ static void _enforceMinimumDistance( featurelist->feature[indx]->x = -1; featurelist->feature[indx]->y = -1; featurelist->feature[indx]->val = KLT_NOT_FOUND; - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; featurelist->feature[indx]->aff_x = -1.0; featurelist->feature[indx]->aff_y = -1.0; featurelist->feature[indx]->aff_Axx = 1.0; @@ -217,9 +217,9 @@ static void _enforceMinimumDistance( featurelist->feature[indx]->x = (KLT_locType) x; featurelist->feature[indx]->y = (KLT_locType) y; featurelist->feature[indx]->val = (int) val; - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; featurelist->feature[indx]->aff_x = -1.0; featurelist->feature[indx]->aff_y = -1.0; featurelist->feature[indx]->aff_Axx = 1.0; @@ -340,12 +340,12 @@ void _KLTSelectGoodFeatures( /* Create temporary images, etc. */ if (mode == REPLACING_SOME && - tc->sequentialMode && tc->pyramid_last != NULL) { + tc->sequentialMode && tc->pyramid_last != nullptr) { floatimg = ((_KLT_Pyramid) tc->pyramid_last)->img[0]; gradx = ((_KLT_Pyramid) tc->pyramid_last_gradx)->img[0]; grady = ((_KLT_Pyramid) tc->pyramid_last_grady)->img[0]; - assert(gradx != NULL); - assert(grady != NULL); + assert(gradx != nullptr); + assert(grady != nullptr); } else { floatimages_created = TRUE; floatimg = _KLTCreateFloatImage(ncols, nrows); diff --git a/rtengine/klt/trackFeatures.cc b/rtengine/klt/trackFeatures.cc index 3ade7264f..5930e2fcb 100644 --- a/rtengine/klt/trackFeatures.cc +++ b/rtengine/klt/trackFeatures.cc @@ -317,7 +317,7 @@ static _FloatWindow _allocateFloatWindow( _FloatWindow fw; fw = (_FloatWindow) malloc(width*height*sizeof(float)); - if (fw == NULL) { + if (fw == nullptr) { KLTError("(_allocateFloatWindow) Out of memory."); exit(1); } @@ -1291,7 +1291,7 @@ void KLTTrackFeatures( /* Process first image by converting to float, smoothing, computing */ /* pyramid, and computing gradient pyramids */ - if (tc->sequentialMode && tc->pyramid_last != NULL) { + if (tc->sequentialMode && tc->pyramid_last != nullptr) { pyramid1 = (_KLT_Pyramid) tc->pyramid_last; pyramid1_gradx = (_KLT_Pyramid) tc->pyramid_last_gradx; pyramid1_grady = (_KLT_Pyramid) tc->pyramid_last_grady; @@ -1301,8 +1301,8 @@ void KLTTrackFeatures( ncols, nrows, pyramid1->ncols[0], pyramid1->nrows[0]); exit(1); } - assert(pyramid1_gradx != NULL); - assert(pyramid1_grady != NULL); + assert(pyramid1_gradx != nullptr); + assert(pyramid1_grady != nullptr); } else { floatimg1_created = TRUE; floatimg1 = _KLTCreateFloatImage(ncols, nrows); @@ -1398,9 +1398,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (_outOfBounds(xlocout, ylocout, ncols, nrows, tc->borderx, tc->bordery)) { featurelist->feature[indx]->x = -1.0; @@ -1409,9 +1409,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_SMALL_DET) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1419,9 +1419,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_LARGE_RESIDUE) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1429,9 +1429,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_MAX_ITERATIONS) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1439,9 +1439,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else { featurelist->feature[indx]->x = xlocout; featurelist->feature[indx]->y = ylocout; @@ -1497,9 +1497,9 @@ void KLTTrackFeatures( _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; }else{ /*featurelist->feature[indx]->x = xlocout;*/ /*featurelist->feature[indx]->y = ylocout;*/ diff --git a/rtengine/klt/writeFeatures.cc b/rtengine/klt/writeFeatures.cc index d902778de..1bfe3f20f 100644 --- a/rtengine/klt/writeFeatures.cc +++ b/rtengine/klt/writeFeatures.cc @@ -56,7 +56,7 @@ void KLTWriteFeatureListToPPM( redimg = (uchar *) malloc(nbytes); grnimg = (uchar *) malloc(nbytes); bluimg = (uchar *) malloc(nbytes); - if (redimg == NULL || grnimg == NULL || bluimg == NULL) { + if (redimg == nullptr || grnimg == nullptr || bluimg == nullptr) { KLTError("(KLTWriteFeaturesToPPM) Out of memory\n"); exit(1); } @@ -104,9 +104,9 @@ static FILE* _printSetupTxt( int i; /* Either open file or use stderr */ - if (fname == NULL) fp = stderr; + if (fname == nullptr) fp = stderr; else fp = fopen(fname, "wb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTWriteFeatures) " "Can't open file '%s' for writing\n", fname); exit(1); @@ -134,12 +134,12 @@ static FILE* _printSetupBin( const char *fname) /* Input: filename */ { FILE *fp; - if (fname == NULL) { + if (fname == nullptr) { KLTError("(KLTWriteFeatures) Can't write binary data to stderr"); exit(1); } fp = fopen(fname, "wb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTWriteFeatures) " "Can't open file '%s' for writing", fname); exit(1); @@ -351,13 +351,13 @@ void KLTWriteFeatureList( char type; int i; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature list to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_LIST, 0, fl->nFeatures); @@ -389,13 +389,13 @@ void KLTWriteFeatureHistory( char type; int i; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature history to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_HISTORY, fh->nFrames, 0); @@ -428,13 +428,13 @@ void KLTWriteFeatureTable( char type; int i, j; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature table to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_TABLE, ft->nFrames, ft->nFeatures); @@ -475,18 +475,18 @@ static structureType _readHeader( fread(line, sizeof(char), BINHEADERLENGTH, fp); line[BINHEADERLENGTH] = 0; if (strcmp(line, binheader_fl) == 0) { - assert(nFeatures != NULL); + assert(nFeatures != nullptr); fread(nFeatures, sizeof(int), 1, fp); *binary = TRUE; return FEATURE_LIST; } else if (strcmp(line, binheader_fh) == 0) { - assert(nFrames != NULL); + assert(nFrames != nullptr); fread(nFrames, sizeof(int), 1, fp); *binary = TRUE; return FEATURE_HISTORY; } else if (strcmp(line, binheader_ft) == 0) { - assert(nFrames != NULL); - assert(nFeatures != NULL); + assert(nFrames != nullptr); + assert(nFeatures != nullptr); fread(nFrames, sizeof(int), 1, fp); fread(nFeatures, sizeof(int), 1, fp); *binary = TRUE; @@ -525,9 +525,9 @@ static structureType _readHeader( /* and the parameters passed, exit now before we attempt */ /* to write to non-allocated memory. Higher routine should */ /* detect and handle this error. */ - if ((id == FEATURE_LIST && nFeatures == NULL) || - (id == FEATURE_HISTORY && nFrames == NULL) || - (id == FEATURE_TABLE && (nFeatures == NULL || nFrames == NULL))) + if ((id == FEATURE_LIST && nFeatures == nullptr) || + (id == FEATURE_HISTORY && nFrames == nullptr) || + (id == FEATURE_TABLE && (nFeatures == nullptr || nFrames == nullptr))) return id; /* Read nFeatures and nFrames */ @@ -627,21 +627,21 @@ KLT_FeatureList KLTReadFeatureList( int i; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureList) Can't open file '%s' " "for reading", fname); exit(1); } if (KLT_verbose >= 1) fprintf(stderr, "(KLT) Reading feature list from '%s'\n", fname); - id = _readHeader(fp, NULL, &nFeatures, &binary); + id = _readHeader(fp, nullptr, &nFeatures, &binary); if (id != FEATURE_LIST) { KLTError("(KLTReadFeatureList) File '%s' does not contain " "a FeatureList", fname); exit(1); } - if (fl_in == NULL) { + if (fl_in == nullptr) { fl = KLTCreateFeatureList(nFeatures); fl->nFeatures = nFeatures; } @@ -690,20 +690,20 @@ KLT_FeatureHistory KLTReadFeatureHistory( int i; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureHistory) Can't open file '%s' " "for reading", fname); exit(1); } if (KLT_verbose >= 1) fprintf(stderr, "(KLT) Reading feature history from '%s'\n", fname); - id = _readHeader(fp, &nFrames, NULL, &binary); + id = _readHeader(fp, &nFrames, nullptr, &binary); if (id != FEATURE_HISTORY) { KLTError("(KLTReadFeatureHistory) File '%s' does not contain " "a FeatureHistory", fname); exit(1); } - if (fh_in == NULL) { + if (fh_in == nullptr) { fh = KLTCreateFeatureHistory(nFrames); fh->nFrames = nFrames; } @@ -753,7 +753,7 @@ KLT_FeatureTable KLTReadFeatureTable( int i, j; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureTable) Can't open file '%s' " "for reading", fname); exit(1); @@ -766,7 +766,7 @@ KLT_FeatureTable KLTReadFeatureTable( exit(1); } - if (ft_in == NULL) { + if (ft_in == nullptr) { ft = KLTCreateFeatureTable(nFrames, nFeatures); ft->nFrames = nFrames; ft->nFeatures = nFeatures; diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index 0f45e1270..ce1a6c67e 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -163,7 +163,7 @@ void LCPPersModel::print() const LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg) { - if (pProf == NULL) { + if (pProf == nullptr) { return; } @@ -182,7 +182,7 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm bool mirrorY = (rot == 180 || rot == 270); //printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); - pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, NULL, NULL); + pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, nullptr, nullptr); mc.prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); if (!vignette) { @@ -281,7 +281,7 @@ LCPProfile::LCPProfile(const Glib::ustring &fname) const int BufferSize = 8192; char buf[BufferSize]; - XML_Parser parser = XML_ParserCreate(NULL); + XML_Parser parser = XML_ParserCreate(nullptr); if (!parser) { throw "Couldn't allocate memory for XML parser"; @@ -296,7 +296,7 @@ LCPProfile::LCPProfile(const Glib::ustring &fname) sensorFormatFactor = 1; for (int i = 0; i < MaxPersModelCount; i++) { - aPersModel[i] = NULL; + aPersModel[i] = nullptr; } persModelCount = 0; @@ -400,7 +400,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float float euler = exp(1.0); // find the frames with the least distance, focal length wise - LCPPersModel *pLow = NULL, *pHigh = NULL; + LCPPersModel *pLow = nullptr, *pHigh = nullptr; float focalLengthLog = log(focalLength); //, apertureLog=aperture>0 ? log(aperture) : 0; float focusDistLog = focusDist > 0 ? log(focusDist) + euler : 0; @@ -410,11 +410,11 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float float f = aPersModel[pm]->focLen; if (aPersModel[pm]->hasModeData(mode)) { - if (f <= focalLength && (pLow == NULL || f > pLow->focLen || (focusDist == 0 && f == pLow->focLen && pLow->focDist > aPersModel[pm]->focDist))) { + if (f <= focalLength && (pLow == nullptr || f > pLow->focLen || (focusDist == 0 && f == pLow->focLen && pLow->focDist > aPersModel[pm]->focDist))) { pLow = aPersModel[pm]; } - if (f >= focalLength && (pHigh == NULL || f < pHigh->focLen || (focusDist == 0 && f == pHigh->focLen && pHigh->focDist < aPersModel[pm]->focDist))) { + if (f >= focalLength && (pHigh == nullptr || f < pHigh->focLen || (focusDist == 0 && f == pHigh->focLen && pHigh->focDist < aPersModel[pm]->focDist))) { pHigh = aPersModel[pm]; } } @@ -488,7 +488,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float } } - if (pLow != NULL && pHigh != NULL) { + if (pLow != nullptr && pHigh != nullptr) { // average out the factors, linear interpolation in logarithmic scale float facLow = 0.5; bool focLenOnSpot = false; // pretty often, since max/min are often as frames in LCP @@ -555,7 +555,7 @@ void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, cons // clean up tagname const char* src = strrchr(el, ':'); - if (src == NULL) { + if (src == nullptr) { src = const_cast(el); } else { src++; @@ -621,11 +621,11 @@ void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, cons // some profiles (espc. Pentax) have a different structure that is attributes based // simulate tags by feeding them in - if (parseAttr && attr != NULL) { + if (parseAttr && attr != nullptr) { for (int i = 0; attr[i]; i += 2) { const char* nameStart = strrchr(attr[i], ':'); - if (nameStart == NULL) { + if (nameStart == nullptr) { nameStart = const_cast(attr[i]); } else { nameStart++; @@ -772,7 +772,7 @@ void XMLCALL LCPProfile::XmlEndHandler(void *pLCPProfile, const char *el) pProf->inPerspect = false; } else if (strstr(el, ":li")) { pProf->aPersModel[pProf->persModelCount] = pProf->pCurPersModel; - pProf->pCurPersModel = NULL; + pProf->pCurPersModel = nullptr; pProf->persModelCount++; } } @@ -787,7 +787,7 @@ LCPStore* LCPStore::getInstance() LCPProfile* LCPStore::getProfile (Glib::ustring filename) { if (filename.length() == 0 || !isValidLCPFileName(filename)) { - return NULL; + return nullptr; } MyMutex::MyLock lock(mtx); diff --git a/rtengine/loadinitial.cc b/rtengine/loadinitial.cc index cd4c4e8d6..c29d60621 100644 --- a/rtengine/loadinitial.cc +++ b/rtengine/loadinitial.cc @@ -36,7 +36,7 @@ InitialImage* InitialImage::load (const Glib::ustring& fname, bool isRaw, int* e isrc->setProgressListener (pl); - if(isRaw && pl == NULL) { + if(isRaw && pl == nullptr) { *errorCode = isrc->load (fname, true); } else { *errorCode = isrc->load (fname); @@ -44,7 +44,7 @@ InitialImage* InitialImage::load (const Glib::ustring& fname, bool isRaw, int* e if (*errorCode) { delete isrc; - return NULL; + return nullptr; } return isrc; diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc index 0414cc1de..f9d0c3621 100644 --- a/rtengine/myfile.cc +++ b/rtengine/myfile.cc @@ -88,7 +88,7 @@ IMFILE* fopen (const char* fname) #endif if ( fd < 0 ) { - return 0; + return nullptr; } struct stat stat_buffer; @@ -96,15 +96,15 @@ IMFILE* fopen (const char* fname) if ( fstat(fd, &stat_buffer) < 0 ) { printf("no stat\n"); close (fd); - return 0; + return nullptr; } - void* data = mmap(0, stat_buffer.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + void* data = mmap(nullptr, stat_buffer.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if ( data == MAP_FAILED ) { printf("no mmap\n"); close(fd); - return 0; + return nullptr; } IMFILE* mf = new IMFILE; @@ -131,9 +131,9 @@ IMFILE* fopen (const char* fname) // initialize bzip stream structure bz_stream stream; - stream.bzalloc = 0; - stream.bzfree = 0; - stream.opaque = 0; + stream.bzalloc = nullptr; + stream.bzfree = nullptr; + stream.opaque = nullptr; ret = BZ2_bzDecompressInit(&stream, 0, 0); if (ret != BZ_OK) { @@ -142,7 +142,7 @@ IMFILE* fopen (const char* fname) // allocate initial buffer for decompressed data unsigned int buffer_out_count = 0; // bytes of decompressed data unsigned int buffer_size = 10 * 1024 * 1024; // 10 MB, extended dynamically if needed - char* buffer = 0; + char* buffer = nullptr; stream.next_in = mf->data; // input data address stream.avail_in = mf->size; @@ -404,7 +404,7 @@ char* fgets (char* s, int n, IMFILE* f) if (f->pos >= f->size) { f->eof = true; - return NULL; + return nullptr; } int i = 0; diff --git a/rtengine/pipettebuffer.cc b/rtengine/pipettebuffer.cc index d76589e99..6f6d9dcef 100644 --- a/rtengine/pipettebuffer.cc +++ b/rtengine/pipettebuffer.cc @@ -23,7 +23,7 @@ namespace rtengine { PipetteBuffer::PipetteBuffer(::EditDataProvider *dataProvider) : - dataProvider(dataProvider), imgFloatBuffer(NULL), LabBuffer(NULL), singlePlaneBuffer(), ready(false) {} + dataProvider(dataProvider), imgFloatBuffer(nullptr), LabBuffer(nullptr), singlePlaneBuffer(), ready(false) {} PipetteBuffer::~PipetteBuffer() { @@ -46,12 +46,12 @@ void PipetteBuffer::flush() { if (imgFloatBuffer) { delete imgFloatBuffer; - imgFloatBuffer = NULL; + imgFloatBuffer = nullptr; } if (LabBuffer) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } singlePlaneBuffer.flushData(); @@ -69,7 +69,7 @@ EditUniqueID PipetteBuffer::getEditID() void PipetteBuffer::resize(int newWidth, int newHeight) { - resize(newWidth, newHeight, dataProvider ? dataProvider->getCurrSubscriber() : NULL); + resize(newWidth, newHeight, dataProvider ? dataProvider->getCurrSubscriber() : nullptr); } // Resize buffers if they already exist @@ -85,13 +85,13 @@ void PipetteBuffer::resize(int newWidth, int newHeight, EditSubscriber* newSubsc } } else if (imgFloatBuffer) { delete imgFloatBuffer; - imgFloatBuffer = NULL; + imgFloatBuffer = nullptr; } if (newSubscriber->getPipetteBufferType() == BT_LABIMAGE) { if (LabBuffer && (LabBuffer->W != newWidth && LabBuffer->H != newHeight)) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } if (!LabBuffer) { @@ -99,7 +99,7 @@ void PipetteBuffer::resize(int newWidth, int newHeight, EditSubscriber* newSubsc } } else if (LabBuffer) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } if (newSubscriber->getPipetteBufferType() == BT_SINGLEPLANE_FLOAT) { @@ -124,11 +124,11 @@ bool PipetteBuffer::bufferCreated() if (subscriber->getEditingType() == ET_PIPETTE) { switch (dataProvider->getCurrSubscriber()->getPipetteBufferType()) { case (BT_IMAGEFLOAT): - return imgFloatBuffer != NULL; + return imgFloatBuffer != nullptr; case (BT_LABIMAGE): - return LabBuffer != NULL; + return LabBuffer != nullptr; case (BT_SINGLEPLANE_FLOAT): - return singlePlaneBuffer.data != NULL; + return singlePlaneBuffer.data != nullptr; } } else { return false; @@ -159,7 +159,7 @@ void PipetteBuffer::getPipetteData(float* v, int x, int y, int squareSize) break; case (BT_SINGLEPLANE_FLOAT): - if (singlePlaneBuffer.data != NULL) { + if (singlePlaneBuffer.data != nullptr) { singlePlaneBuffer.getPipetteData(v[0], x, y, squareSize, 0); v[1] = v[2] = -1.f; return; diff --git a/rtengine/previewimage.cc b/rtengine/previewimage.cc index 16355a8c0..891186d8a 100644 --- a/rtengine/previewimage.cc +++ b/rtengine/previewimage.cc @@ -29,11 +29,11 @@ using namespace procparams; PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext, const PreviewImageMode mode) { - rtengine::Thumbnail* tpp = NULL; + rtengine::Thumbnail* tpp = nullptr; if (mode == PIM_EmbeddedPreviewOnly || mode == PIM_EmbeddedOrRaw) { - const unsigned char *data = NULL; + const unsigned char *data = nullptr; int width = -1, height = -1; @@ -107,8 +107,8 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext int error = rawImage.load(fname, true); if (!error) { - rtengine::Image8 *output = NULL; - const unsigned char *data = NULL; + rtengine::Image8 *output = nullptr; + const unsigned char *data = nullptr; int fw, fh; procparams::ProcParams params; diff --git a/rtengine/processingjob.h b/rtengine/processingjob.h index fbf56234f..c4f3eba38 100644 --- a/rtengine/processingjob.h +++ b/rtengine/processingjob.h @@ -34,7 +34,7 @@ public: procparams::ProcParams pparams; ProcessingJobImpl (const Glib::ustring& fn, bool iR, const procparams::ProcParams& pp) - : fname(fn), isRaw(iR), initialImage(NULL), pparams(pp) {} + : fname(fn), isRaw(iR), initialImage(nullptr), pparams(pp) {} ProcessingJobImpl (InitialImage* iImage, const procparams::ProcParams& pp) : fname(""), initialImage(iImage), pparams(pp) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 0b4d2a5b6..903bda6c6 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3431,7 +3431,7 @@ int ProcParams::write (const Glib::ustring &fname, const Glib::ustring &content) FILE *f; f = g_fopen (fname.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { error = 1; } else { fprintf (f, "%s", content.c_str()); @@ -8010,8 +8010,8 @@ PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue) pparams = new ProcParams(); pedited = new ParamsEdited(paramsEditedValue); } else { - pparams = NULL; - pedited = NULL; + pparams = nullptr; + pedited = nullptr; } } @@ -8035,13 +8035,13 @@ PartialProfile::PartialProfile(const ProcParams* pp, const ParamsEdited* pe) if (pp) { pparams = new ProcParams(*pp); } else { - pparams = NULL; + pparams = nullptr; } if (pe) { pedited = new ParamsEdited(*pe); } else { - pedited = NULL; + pedited = nullptr; } } @@ -8066,12 +8066,12 @@ void PartialProfile::deleteInstance () { if (pparams) { delete pparams; - pparams = NULL; + pparams = nullptr; } if (pedited) { delete pedited; - pedited = NULL; + pedited = nullptr; } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index d51c032c0..3a1c4487b 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1318,14 +1318,14 @@ public: * @param pedited pointer to a ParamsEdited object (optional) to store which values has to be saved * @return Error code (=0 if all supplied filenames where created correctly) */ - int save (const Glib::ustring &fname, const Glib::ustring &fname2 = "", bool fnameAbsolute = true, ParamsEdited* pedited = NULL); + int save (const Glib::ustring &fname, const Glib::ustring &fname2 = "", bool fnameAbsolute = true, ParamsEdited* pedited = nullptr); /** * Loads the parameters from a file. * @param fname the name of the file * @params pedited pointer to a ParamsEdited object (optional) to store which values has been loaded * @return Error code (=0 if no error) */ - int load (const Glib::ustring &fname, ParamsEdited* pedited = NULL); + int load (const Glib::ustring &fname, ParamsEdited* pedited = nullptr); /** Creates a new instance of ProcParams. * @return a pointer to the new ProcParams instance. */ @@ -1373,8 +1373,8 @@ public: }; PartialProfile (bool createInstance = false, bool paramsEditedValue = false); - PartialProfile (ProcParams* pp, ParamsEdited* pe = NULL, bool fullCopy = false); - PartialProfile (const ProcParams* pp, const ParamsEdited* pe = NULL); + PartialProfile (ProcParams* pp, ParamsEdited* pe = nullptr, bool fullCopy = false); + PartialProfile (const ProcParams* pp, const ParamsEdited* pe = nullptr); void deleteInstance (); void clearGeneral (); int load (const Glib::ustring &fName); diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 8f91f8f4b..f631d4894 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -20,11 +20,11 @@ namespace rtengine extern const Settings* settings; RawImage::RawImage( const Glib::ustring &name ) - : data(NULL) + : data(nullptr) , prefilters(0) , filename(name) - , profile_data(NULL) - , allocation(NULL) + , profile_data(nullptr) + , allocation(nullptr) { memset(maximum_c4, 0, sizeof(maximum_c4)); RT_matrix_from_constant = 0; @@ -44,22 +44,22 @@ RawImage::~RawImage() if(allocation) { delete [] allocation; - allocation = NULL; + allocation = nullptr; } if(float_raw_image) { delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } if(data) { delete [] data; - data = NULL; + data = nullptr; } if(profile_data) { delete [] profile_data; - profile_data = NULL; + profile_data = nullptr; } } @@ -400,9 +400,9 @@ skip_block: int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistener, double progressRange) { ifname = filename.c_str(); - image = NULL; + image = nullptr; verbose = settings->verbose; - oprof = NULL; + oprof = nullptr; ifp = gfopen (ifname); // Maps to either file map or direct fopen @@ -414,18 +414,18 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene thumb_length = 0; thumb_offset = 0; - thumb_load_raw = 0; + thumb_load_raw = nullptr; use_camera_wb = 0; highlight = 1; half_size = 0; - raw_image = 0; + raw_image = nullptr; //***************** Read ALL raw file info identify (); if (!is_raw) { fclose(ifp); - ifp = NULL; + ifp = nullptr; if (plistener) { plistener->setProgress(1.0 * progressRange); @@ -531,7 +531,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene crop_masked_pixels(); free (raw_image); - raw_image = NULL; + raw_image = nullptr; } else { if (cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; @@ -643,7 +643,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if ( closeFile ) { fclose(ifp); - ifp = NULL; + ifp = nullptr; } if (plistener) { @@ -656,7 +656,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene float** RawImage::compress_image() { if( !image ) { - return NULL; + return nullptr; } if (isBayer() || isXtrans()) { @@ -699,7 +699,7 @@ float** RawImage::compress_image() } delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } else if (filters != 0 && !isXtrans()) { #pragma omp parallel for @@ -733,7 +733,7 @@ float** RawImage::compress_image() } free(image); // we don't need this anymore - image = NULL; + image = nullptr; return data; } diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 45e67cbac..88ef5d710 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -106,7 +106,7 @@ public: explicit RawImage( const Glib::ustring &name ); ~RawImage(); - int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = 0, double progressRange = 1.0); + int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = nullptr, double progressRange = 1.0); void get_colorsCoeff( float* pre_mul_, float* scale_mul_, float* cblack_, bool forceAutoWB ); void set_prefilters() { diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 31deac244..9e90764b2 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -423,22 +423,22 @@ extern const Settings* settings; RawImageSource::RawImageSource () : ImageSource() - , plistener(NULL) + , plistener(nullptr) , border(4) - , ri(NULL) - , cache(NULL) + , ri(nullptr) + , cache(nullptr) , rawData(0, 0) , green(0, 0) , red(0, 0) , blue(0, 0) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; + hrmap[0] = nullptr; + hrmap[1] = nullptr; + hrmap[2] = nullptr; //needhr = NULL; //hpmap = NULL; - camProfile = NULL; - embProfile = NULL; + camProfile = nullptr; + embProfile = nullptr; rgbSourceModified = false; hlmax[0] = hlmax[1] = hlmax[2] = hlmax[3] = 0.f; clmax[0] = clmax[1] = clmax[2] = clmax[3] = 0.f; @@ -462,7 +462,7 @@ RawImageSource::~RawImageSource () delete [] cache; } - if (hrmap[0] != NULL) { + if (hrmap[0] != nullptr) { int dh = H / HR_SCALE; freeJaggedArray(hrmap[0]); freeJaggedArray(hrmap[1]); @@ -872,12 +872,12 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - DCPProfile *dcpProf = NULL; + DCPProfile *dcpProf = nullptr; cmsHPROFILE dummy; - findInputProfile(cmp.input, NULL, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); + findInputProfile(cmp.input, nullptr, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); - if (dcpProf == NULL) { - return NULL; + if (dcpProf == nullptr) { + return nullptr; } dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset, as); @@ -1629,7 +1629,7 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) plistener->setProgress (1.0); } - plistener = NULL; // This must be reset, because only load() is called through progressConnector + plistener = nullptr; // This must be reset, because only load() is called through progressConnector t2.set(); if( settings->verbose ) { @@ -1648,7 +1648,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le t1.set(); Glib::ustring newDF = raw.dark_frame; - RawImage *rid = NULL; + RawImage *rid = nullptr; if (!raw.df_autoselect) { if( !raw.dark_frame.empty()) { @@ -1686,7 +1686,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } //FLATFIELD start - RawImage *rif = NULL; + RawImage *rif = nullptr; if (!raw.ff_AutoSelect) { if( !raw.ff_file.empty()) { @@ -1697,7 +1697,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } - bool hasFlatField = (rif != NULL); + bool hasFlatField = (rif != nullptr); if( hasFlatField && settings->verbose) { printf( "Flat Field Correction:%s\n", rif->get_filename().c_str()); @@ -1723,7 +1723,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } // If darkframe selected, correct hotpixels found on darkframe - bp = 0; + bp = nullptr; if( raw.df_autoselect ) { bp = dfm.getHotPixels(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS()); @@ -2305,7 +2305,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC dLcurve(32768); } - FlatCurve* chcurve = NULL;//curve c=f(H) + FlatCurve* chcurve = nullptr;//curve c=f(H) bool chutili = false; if (deh.enabled && deh.retinexMethod == "highli") { @@ -2314,7 +2314,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC if (!chcurve || chcurve->isIdentity()) { if (chcurve) { delete chcurve; - chcurve = NULL; + chcurve = nullptr; } } else { chutili = true; @@ -2629,7 +2629,7 @@ void RawImageSource::flushRawData() { if(cache) { delete [] cache; - cache = 0; + cache = nullptr; } if (rawData) { @@ -3696,9 +3696,9 @@ void RawImageSource::getProfilePreprocParams(cmsHPROFILE in, float& gammaFac, fl copyright[0] = 0; if (cmsGetProfileInfoASCII(in, cmsInfoCopyright, cmsNoLanguage, cmsNoCountry, copyright, 256) > 0) { - if (strstr(copyright, "Phase One") != NULL) { + if (strstr(copyright, "Phase One") != nullptr) { gammaFac = 0.55556; // 1.8 - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { gammaFac = 0.5; lineFac = -0.4; lineSum = 1.35; // determined in reverse by measuring NX an RT developed colorchecker PNGs @@ -3767,7 +3767,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (dcpProf != NULL) { + if (dcpProf != nullptr) { // DCP processing const DCPProfile::Triple pre_mul_row = { pre_mul[0], @@ -3784,7 +3784,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (in == NULL) { + if (in == nullptr) { // use default camprofile, supplied by dcraw // in this case we avoid using the slllllooooooowwww lcms @@ -3860,10 +3860,10 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam camera_icc_type = CAMERA_ICC_TYPE_GENERIC; // Note: order the identification with the most detailed matching first since the more general ones may also match the more detailed - if ((strstr(copyright, "Leaf") != NULL || - strstr(copyright, "Phase One A/S") != NULL || - strstr(copyright, "Kodak") != NULL || - strstr(copyright, "Creo") != NULL) && + if ((strstr(copyright, "Leaf") != nullptr || + strstr(copyright, "Phase One A/S") != nullptr || + strstr(copyright, "Kodak") != nullptr || + strstr(copyright, "Creo") != nullptr) && (strstr(description, "LF2 ") == description || strstr(description, "LF3 ") == description || strstr(description, "LeafLF2") == description || @@ -3872,9 +3872,9 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam strstr(description, "MamiyaLF2") == description || strstr(description, "MamiyaLF3") == description)) { camera_icc_type = CAMERA_ICC_TYPE_LEAF; - } else if (strstr(copyright, "Phase One A/S") != NULL) { + } else if (strstr(copyright, "Phase One A/S") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_PHASE_ONE; - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_NIKON; } } @@ -3893,7 +3893,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam transform_via_pcs_lab = true; separate_pcs_lab_highlights = true; // We transform to Lab because we can and that we avoid getting an unnecessary unmatched gamma conversion which we would need to revert. - hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, NULL, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); + hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, nullptr, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { @@ -3917,7 +3917,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam lcmsMutex->unlock (); - if (hTransform == NULL) { + if (hTransform == nullptr) { // Fallback: create transform from camera profile. Should not happen normally. lcmsMutex->lock (); hTransform = cmsCreateTransform (camprofile, TYPE_RGB_FLT, prophoto, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); @@ -4127,8 +4127,8 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam // Determine RAW input and output profiles. Returns TRUE on success bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in) { - in = NULL; // cam will be taken on NULL - *dcpProf = NULL; + in = nullptr; // cam will be taken on NULL + *dcpProf = nullptr; if (inProfile == "(none)") { return false; @@ -4140,7 +4140,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed // DCPs have higher quality, so use them first *dcpProf = DCPStore::getInstance()->getStdProfile(camName); - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getStdProfile(camName); } } else if (inProfile != "(camera)" && inProfile != "") { @@ -4154,7 +4154,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed *dcpProf = DCPStore::getInstance()->getProfile(normalName); } - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getProfile (inProfile); } } diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 60887d9cd..6dcc69360 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -138,7 +138,7 @@ public: void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw); eSensorType getSensorType () const { - return ri != NULL ? ri->getSensorType() : ST_NONE; + return ri != nullptr ? ri->getSensorType() : ST_NONE; } ColorTemp getWB () const { diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 42e06406e..10a42a0d5 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -176,7 +176,7 @@ public: * @param errorCode is a pointer to a variable that is set to nonzero if an error happened (output) * @param pl is a pointer pointing to an object implementing a progress listener. It can be NULL, in this case progress is not reported. * @return an object representing the loaded and pre-processed image */ - static InitialImage* load (const Glib::ustring& fname, bool isRaw, int* errorCode, ProgressListener* pl = NULL); + static InitialImage* load (const Glib::ustring& fname, bool isRaw, int* errorCode, ProgressListener* pl = nullptr); }; /** When the preview image is ready for display during staged processing (thus the changes have been updated), @@ -482,7 +482,7 @@ public: * @param pl is an optional ProgressListener if you want to keep track of the progress * @param tunnelMetaData tunnels IPTC and XMP to output without change * @return the resulting image, with the output profile applied, exif and iptc data set. You have to save it or you can access the pixel data directly. */ -IImage16* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = NULL, bool tunnelMetaData = false, bool flush = false); +IImage16* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = nullptr, bool tunnelMetaData = false, bool flush = false); /** This class is used to control the batch processing. The class implementing this interface will be called when the full processing of an * image is ready and the next job to process is needed. */ diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index c16960041..acdeb5133 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -54,7 +54,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (errorCode) { delete job; - return NULL; + return nullptr; } } @@ -165,7 +165,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; - Imagefloat *calclum = NULL ; + Imagefloat *calclum = nullptr ; params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// @@ -754,7 +754,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } // update blurmap - SHMap* shmap = NULL; + SHMap* shmap = nullptr; if (params.sh.enabled) { shmap = new SHMap (fw, fh, true); @@ -858,7 +858,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); if (settings->verbose) { printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); @@ -881,13 +881,13 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // Freeing baseImg because not used anymore delete baseImg; - baseImg = NULL; + baseImg = nullptr; if (shmap) { delete shmap; } - shmap = NULL; + shmap = nullptr; if (pl) { pl->setProgress (0.55); @@ -933,7 +933,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); - ipf.chromiLuminanceCurve (NULL, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); + ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { ipf.EPDToneMap(labView, 5, 1); @@ -1071,7 +1071,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete cieView; - cieView = NULL; + cieView = nullptr; @@ -1147,8 +1147,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } - Image16* readyImg = NULL; - cmsHPROFILE jprof = NULL; + Image16* readyImg = nullptr; + cmsHPROFILE jprof = nullptr; bool customGamma = false; bool useLCMS = false; @@ -1249,14 +1249,14 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p jprof = iccStore->getProfile(outProfile); //get output profile - if (jprof == NULL) { + if (jprof == nullptr) { useLCMS = true; if (settings->verbose) { printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); } } else { - cmsToneCurve* GammaTRC[3] = { NULL, NULL, NULL }; + cmsToneCurve* GammaTRC[3] = { nullptr, nullptr, nullptr }; cmsFloat64Number Parameters[7]; @@ -1279,7 +1279,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // instruction with //ICC are used for generate icc profile - if (DescriptionMLU == NULL) { + if (DescriptionMLU == nullptr) { printf("Description error\n"); } @@ -1331,7 +1331,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // cmsWriteTag(jprof, cmsSigDeviceModelDescTag, DmddMLU); // Calculate output profile's rTRC bTRC gTRC - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); cmsWriteTag(jprof, cmsSigGreenTRCTag, (void*)GammaTRC[1] ); cmsWriteTag(jprof, cmsSigRedTRCTag, (void*)GammaTRC[0] ); cmsWriteTag(jprof, cmsSigBlueTRCTag, (void*)GammaTRC[2] ); @@ -1365,7 +1365,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete labView; - labView = NULL; + labView = nullptr; @@ -1426,7 +1426,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // if iccStore->getProfile send back an object, then iccStore->getContent will do too cmsHPROFILE jprof = iccStore->getProfile(outputProfile); //get outProfile - if (jprof == NULL) { + if (jprof == nullptr) { if (settings->verbose) { printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", outputProfile.c_str()); } @@ -1440,7 +1440,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } else { // No ICM - readyImg->setOutputProfile (NULL, 0); + readyImg->setOutputProfile (nullptr, 0); } } @@ -1483,13 +1483,13 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo if (errorCode) { bpl->error (M("MAIN_MSG_CANNOTLOAD")); - currentJob = NULL; + currentJob = nullptr; } else { try { currentJob = bpl->imageReady (img); } catch (Glib::Exception& ex) { bpl->error (ex.what()); - currentJob = NULL; + currentJob = nullptr; } } } diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index e422d23b2..128bfdfa9 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -51,15 +51,15 @@ template T** allocArray (int W, int H) } #define HR_SCALE 2 -StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL) +StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; - needhr = NULL; - embProfile = NULL; - idata = NULL; + hrmap[0] = nullptr; + hrmap[1] = nullptr; + hrmap[2] = nullptr; + needhr = nullptr; + embProfile = nullptr; + idata = nullptr; } StdImageSource::~StdImageSource () @@ -67,7 +67,7 @@ StdImageSource::~StdImageSource () delete idata; - if (hrmap[0] != NULL) { + if (hrmap[0] != nullptr) { int dh = img->getH() / HR_SCALE; freeArray(hrmap[0], dh); freeArray(hrmap[1], dh); @@ -178,7 +178,7 @@ int StdImageSource::load (const Glib::ustring &fname, bool batch) if (error) { delete img; - img = NULL; + img = nullptr; return error; } @@ -243,7 +243,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement { bool skipTransform = false; - cmsHPROFILE in = NULL; + cmsHPROFILE in = nullptr; cmsHPROFILE out = iccStore->workingSpace (cmp.working); if (cmp.input == "(embedded)" || cmp.input == "" || cmp.input == "(camera)" || cmp.input == "(cameraICC)") { @@ -260,9 +260,9 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (cmp.input != "(none)") { in = iccStore->getProfile (cmp.input); - if (in == NULL && embedded) { + if (in == nullptr && embedded) { in = embedded; - } else if (in == NULL) { + } else if (in == nullptr) { if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { skipTransform = true; } else { diff --git a/rtengine/stdimagesource.h b/rtengine/stdimagesource.h index 048f3b3c0..e6ecf80a7 100644 --- a/rtengine/stdimagesource.h +++ b/rtengine/stdimagesource.h @@ -78,7 +78,7 @@ public: } ImageMatrices* getImageMatrices () { - return (ImageMatrices*)NULL; + return (ImageMatrices*)nullptr; } bool isRAW() const { diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index 41ab468cb..7fa01f624 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -1780,205 +1780,205 @@ public: CAAspectRatioInterpreter caAspectRatioInterpreter; const TagAttrib canonCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "MacroMode", &caMacroModeInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "SelfTimer", &caSelfTimerInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "Quality", &caQualityInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "CanonFlashMode", &caFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "ContinuousDrive", &caContinuousDriveInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "FocusMode", &caFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "RecordMode", &caRecordModeInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "CanonImageSize", &caImageSizeInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "EasyMode", &caEasyModeInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "DigitalZoom", &caDigitalZoomInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "CameraISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "MeteringMode", &caMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "FocusRange", &caFocusRangeInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "AFPoint", &caAFPointInterpreter}, - {0, AC_WRITE, 0, 0, 20, AUTO, "CanonExposureMode", &caExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "LensID", &caLensInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "LongFocal", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "ShortFocal", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FocalUnits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "MaxAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "MinAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "FlashActivity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "FlashBits", &caFlashBitsInterpreter}, - {0, AC_WRITE, 0, 0, 32, AUTO, "FocusContinuous", &caFocusContinuousInterpreter}, - {0, AC_WRITE, 0, 0, 33, AUTO, "AESetting", &caAESettingsInterpreter}, - {0, AC_WRITE, 0, 0, 34, AUTO, "ImageStabilization", &caStabilizationInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "DisplayAperture", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 36, AUTO, "ZoomSourceWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 37, AUTO, "ZoomTargetWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 39, AUTO, "SpotMeteringMode", &caSpotMeteringInterpreter}, - {0, AC_WRITE, 0, 0, 40, AUTO, "PhotoEffect", &caPhotoEffectInterpreter}, - {0, AC_WRITE, 0, 0, 41, AUTO, "ManualFlashOutput", &caManualFlashInterpreter}, - {0, AC_WRITE, 0, 0, 42, AUTO, "ColorTone", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 46, AUTO, "SRAWQuality", &caRAWQualityInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 1, AUTO, "MacroMode", &caMacroModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "SelfTimer", &caSelfTimerInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "Quality", &caQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "CanonFlashMode", &caFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "ContinuousDrive", &caContinuousDriveInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "FocusMode", &caFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "RecordMode", &caRecordModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "CanonImageSize", &caImageSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "EasyMode", &caEasyModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "DigitalZoom", &caDigitalZoomInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "CameraISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "MeteringMode", &caMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "FocusRange", &caFocusRangeInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "AFPoint", &caAFPointInterpreter}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "CanonExposureMode", &caExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "LensID", &caLensInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "LongFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "ShortFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FocalUnits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "MaxAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "MinAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "FlashActivity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "FlashBits", &caFlashBitsInterpreter}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "FocusContinuous", &caFocusContinuousInterpreter}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "AESetting", &caAESettingsInterpreter}, + {0, AC_WRITE, 0, nullptr, 34, AUTO, "ImageStabilization", &caStabilizationInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "DisplayAperture", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 36, AUTO, "ZoomSourceWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 37, AUTO, "ZoomTargetWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 39, AUTO, "SpotMeteringMode", &caSpotMeteringInterpreter}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "PhotoEffect", &caPhotoEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 41, AUTO, "ManualFlashOutput", &caManualFlashInterpreter}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "ColorTone", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 46, AUTO, "SRAWQuality", &caRAWQualityInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib canonFocalLengthAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "FocalType", &caFocalTypeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FocalLength", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "FocalPlaneXSize", &caFocalPlaneInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "FocalPlaneYSize", &caFocalPlaneInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "FocalType", &caFocalTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FocalLength", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "FocalPlaneXSize", &caFocalPlaneInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "FocalPlaneYSize", &caFocalPlaneInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib canonShotInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "AutoISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "BaseISO" , &caBaseISOInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "MeasuredEV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "TargetAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "TargetExposureTime", &caExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "ExposureCompensation", &caEVInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "SlowShutter", &caSlowShutterInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "OpticalZoomCode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AutoExposureBracketing", &caAutoExposureBracketingInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEBBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "ControlMode", &caControModeInterpreter}, - {0, AC_WRITE, 0, 0, 21, AUTO, "FNumber" , &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "ExposureTime", &caExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "BulbDuration", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "CameraType", &caCameraTypeInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "AutoRotate", &caAutoRotateInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "NDFilter", &caOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "Self-timer2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 33, AUTO, "FlashOutput", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AutoISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "BaseISO" , &caBaseISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "MeasuredEV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "TargetAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "TargetExposureTime", &caExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "ExposureCompensation", &caEVInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "SlowShutter", &caSlowShutterInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "OpticalZoomCode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AutoExposureBracketing", &caAutoExposureBracketingInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEBBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "ControlMode", &caControModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "FNumber" , &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "ExposureTime", &caExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "BulbDuration", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "CameraType", &caCameraTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "AutoRotate", &caAutoRotateInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "NDFilter", &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "Self-timer2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "FlashOutput", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonFileInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "FileNumber", &caFileNumberInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "BracketMode", &caBracketModeInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "BracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "BracketShotNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "RawJpgQuality", &caRAWJpegQualityInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "RawJpgSize", &caJpegSizeInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "NoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "WBBracketMode" , &caWBBracketModeInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "WBBracketValueAB", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "WBBracketValueGM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "FilterEffect" , &caFilterEffectInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "ToningEffect" , &caToningEffectInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "LiveViewShooting" , &caOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 20, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, - {0, AC_WRITE, 0, 0, 21, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FlashExposureLock" , &caOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FileNumber", &caFileNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "BracketMode", &caBracketModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "BracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "RawJpgQuality", &caRAWJpegQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "RawJpgSize", &caJpegSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "WBBracketMode" , &caWBBracketModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "WBBracketValueAB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "WBBracketValueGM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "FilterEffect" , &caFilterEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "ToningEffect" , &caToningEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "LiveViewShooting" , &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FlashExposureLock" , &caOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonProcessingInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "ToneCurve", &caToneCurveInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "SharpnessFrequency", &caSharpnessFrequencyInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "SensorRedLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "SensorBlueLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceRed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalanceBlue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "PictureStyle", &caPictureStyleInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "DigitalGain", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "WBShiftAB", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "WBShiftGM", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ToneCurve", &caToneCurveInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "SharpnessFrequency", &caSharpnessFrequencyInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "SensorRedLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "SensorBlueLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "WhiteBalanceRed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "WhiteBalanceBlue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "PictureStyle", &caPictureStyleInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "DigitalGain", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "WBShiftAB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "WBShiftGM", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonPanoramaInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 2, AUTO, "PanoramaFrameNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "PanoramaDirection", &caPanoramaDirectionInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "PanoramaFrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "PanoramaDirection", &caPanoramaDirectionInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonCropInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "CropLeftMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "CropRightMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "CropTopMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "CropBottomMargin", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 0, AUTO, "CropLeftMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "CropRightMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "CropTopMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "CropBottomMargin", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonAspectInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "AspectRatio", &caAspectRatioInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "CroppedImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "CroppedImageHeight", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 0, AUTO, "AspectRatio", &caAspectRatioInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "CroppedImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "CroppedImageHeight", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonMicroAdjustAttrib[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "AFMicroAdjActive", &caOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 2, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AFMicroAdjActive", &caOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 2, AUTO, "", nullptr}, }; const TagAttrib canonAttribs[] = { {0, AC_WRITE, 0, canonCameraSettingsAttribs, 0x0001, AUTO, "CanonCameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, canonFocalLengthAttribs, 0x0002, AUTO, "CanonFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "CanonFlashInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "CanonFlashInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonShotInfoAttribs, 0x0004, AUTO, "CanonShotInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonPanoramaInfoAttribs, 0x0005, AUTO, "CanonPanorama", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "CanonImageType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "CanonFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FileNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "OwnerName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "ColorInfoD30", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "CanonCameraInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "CanonFileLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "CustomFunctions", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "CanonModelID", &caModelIDInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "CanonAFInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "SerialNumberFormat", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "DateStampMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "MyColors", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "FirmwareRevision", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0024, AUTO, "FaceDetect1", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0025, AUTO, "FaceDetect2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0026, AUTO, "CanonAFInfo2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0083, AUTO, "OriginalDecisionData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0090, AUTO, "CustomFunctions1D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0091, AUTO, "PersonalFunctions", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0092, AUTO, "PersonalFunctionValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "CanonImageType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "CanonFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "FileNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "OwnerName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "ColorInfoD30", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "CanonCameraInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "CanonFileLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "CustomFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "CanonModelID", &caModelIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "CanonAFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "SerialNumberFormat", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "DateStampMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "MyColors", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "FirmwareRevision", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0024, AUTO, "FaceDetect1", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0025, AUTO, "FaceDetect2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "CanonAFInfo2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0083, AUTO, "OriginalDecisionData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0090, AUTO, "CustomFunctions1D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0091, AUTO, "PersonalFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0092, AUTO, "PersonalFunctionValues", &stdInterpreter}, {0, AC_WRITE, 0, canonFileInfoAttribs, 0x0093, AUTO, "CanonFileInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0094, AUTO, "AFPointsInFocus1D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0095, AUTO, "LensType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0096, AUTO, "InternalSerialNumber", &caIntSerNumInterpreter}, - {0, AC_WRITE, 0, 0, 0x0097, AUTO, "DustRemovalData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0094, AUTO, "AFPointsInFocus1D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0095, AUTO, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0096, AUTO, "InternalSerialNumber", &caIntSerNumInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0097, AUTO, "DustRemovalData", &stdInterpreter}, {0, AC_WRITE, 0, canonCropInfoAttribs, 0x0098, AUTO, "CropInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0099, AUTO, "CustomFunctions2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0099, AUTO, "CustomFunctions2", &stdInterpreter}, {0, AC_WRITE, 0, canonAspectInfoAttribs, 0x009a, AUTO, "AspectInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonProcessingInfoAttribs, 0x00a0, AUTO, "ProcessingInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a1, AUTO, "ToneCurveTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "SharpnessTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a3, AUTO, "SharpnessFreqTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a4, AUTO, "WhiteBalanceTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_NEW , 0, 0, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b4, AUTO, "ColorSpace", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x00b6, AUTO, "PreviewImageInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00d0, AUTO, "VRDOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00e0, AUTO, "SensorInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4001, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4002, AUTO, "UnknownBlock1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4003, AUTO, "ColorInfo", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x4008, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a1, AUTO, "ToneCurveTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a2, AUTO, "SharpnessTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a3, AUTO, "SharpnessFreqTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a4, AUTO, "WhiteBalanceTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_NEW , 0, nullptr, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b4, AUTO, "ColorSpace", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x00b6, AUTO, "PreviewImageInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00d0, AUTO, "VRDOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00e0, AUTO, "SensorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4001, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4002, AUTO, "UnknownBlock1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4003, AUTO, "ColorInfo", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x4008, AUTO, "BlackLevel", &stdInterpreter}, {1, AC_WRITE, 0, canonMicroAdjustAttrib, 0x4013, AUTO, "AFMicroAdj", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/fujiattribs.cc b/rtexif/fujiattribs.cc index 311e47ad6..aabd88859 100644 --- a/rtexif/fujiattribs.cc +++ b/rtexif/fujiattribs.cc @@ -268,44 +268,44 @@ FAPictureModeInterpreter faPictureModeInterpreter; const TagAttrib fujiAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "Version", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "Saturation", &faSaturationInterpreter}, - {0, AC_WRITE, 0, 0, 0x1004, AUTO, "Contrast", &faContrastInterpreter}, - {0, AC_WRITE, 0, 0, 0x1005, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter}, - {0, AC_WRITE, 0, 0, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1020, AUTO, "Macro", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FocusPixel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1101, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter}, - {0, AC_WRITE, 0, 0, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1404, AUTO, "MinFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4100, AUTO, "FacesDetected", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8000, AUTO, "FileSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8002, AUTO, "OrderNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8003, AUTO, "FrameNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "Version", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "Saturation", &faSaturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1004, AUTO, "Contrast", &faContrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1005, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1020, AUTO, "Macro", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1023, AUTO, "FocusPixel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1101, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1404, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4100, AUTO, "FacesDetected", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8000, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8002, AUTO, "OrderNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8003, AUTO, "FrameNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/kodakattribs.cc b/rtexif/kodakattribs.cc index 678dae114..c92be3a84 100644 --- a/rtexif/kodakattribs.cc +++ b/rtexif/kodakattribs.cc @@ -25,7 +25,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) char *p = value; char *pc, *plf; - while ((pc = strchr(p, ':')) != NULL && (plf = strchr(pc, '\n')) != NULL) { + while ((pc = strchr(p, ':')) != nullptr && (plf = strchr(pc, '\n')) != nullptr) { while (*p == ' ') { p++; } @@ -98,7 +98,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) const char *p1 = strchr(val.c_str(), '/'); int a, b; - if (p1 == NULL) { + if (p1 == nullptr) { a = atoi(val.c_str()); b = 1; } else { @@ -135,31 +135,31 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) // table not complete, not all proprietary Kodak tags are known const TagAttrib kodakIfdAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "UnknownEV?", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "ExposureValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03e9, AUTO, "OriginalFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03eb, AUTO, "SensorLeftBorder", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ec, AUTO, "SensorTopBorder", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ed, AUTO, "SensorImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ee, AUTO, "SensorImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03f1, AUTO, "TextualInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fc, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fd, AUTO, "Processing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0401, AUTO, "Time", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0414, AUTO, "NCDFileInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0846, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0852, AUTO, "WB_RGBMul0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0853, AUTO, "WB_RGBMul1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0854, AUTO, "WB_RGBMul2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0855, AUTO, "WB_RGBMul3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085c, AUTO, "WB_RGBCoeffs0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085d, AUTO, "WB_RGBCoeffs1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085e, AUTO, "WB_RGBCoeffs2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085f, AUTO, "WB_RGBCoeffs3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0ce5, AUTO, "FirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1391, AUTO, "ToneCurveFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1784, AUTO, "ISO", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "UnknownEV?", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "ExposureValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03e9, AUTO, "OriginalFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03eb, AUTO, "SensorLeftBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ec, AUTO, "SensorTopBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ed, AUTO, "SensorImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ee, AUTO, "SensorImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03f1, AUTO, "TextualInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03fc, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03fd, AUTO, "Processing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0401, AUTO, "Time", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0414, AUTO, "NCDFileInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0846, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0852, AUTO, "WB_RGBMul0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0853, AUTO, "WB_RGBMul1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0854, AUTO, "WB_RGBMul2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0855, AUTO, "WB_RGBMul3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085c, AUTO, "WB_RGBCoeffs0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085d, AUTO, "WB_RGBCoeffs1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085e, AUTO, "WB_RGBCoeffs2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085f, AUTO, "WB_RGBCoeffs3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0ce5, AUTO, "FirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1391, AUTO, "ToneCurveFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1784, AUTO, "ISO", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; } diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index a827eb1fe..01b825882 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -1085,99 +1085,99 @@ public: NALensDataInterpreter naLensDataInterpreter; const TagAttrib nikonISOInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib nikon2Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "Unknown", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "ColorMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Focus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "Unknown", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "Unknown", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "Focus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "Unknown", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib nikon3Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "ColorMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "FocusMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FlashSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "FlashType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x000c, AUTO, "ColorBalance1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "ProgramShift", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "ExposureDifference", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "ISOSelection", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "DataDump", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0011, AUTO, "NikonPreview", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "ISOSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ImageBoundary", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "ImageProcessing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "ColorSpace", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "FlashSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "FlashType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x000c, AUTO, "ColorBalance1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "ProgramShift", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "ExposureDifference", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "ISOSelection", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "DataDump", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0011, AUTO, "NikonPreview", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "ISOSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "ImageBoundary", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "ColorSpace", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter}, {0, AC_WRITE, 0, nikonISOInfoAttribs, 0x0025, AUTO, "ISOInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0081, AUTO, "ToneComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0083, AUTO, "LensType", &naLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0084, AUTO, "Lens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0086, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter}, - {0, AC_WRITE, 0, 0, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008b, AUTO, "LensFStops", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008c, AUTO, "NEFCurve1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008d, AUTO, "ColorHue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008f, AUTO, "SceneMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0090, AUTO, "LightSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0091, AUTO, "ShotInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0092, AUTO, "HueAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0094, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0095, AUTO, "NoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0096, AUTO, "NEFCurve2", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0097, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0098, AUTO, "LensData", &naLensDataInterpreter}, - {0, AC_WRITE, 0, 0, 0x0099, AUTO, "RawImageCenter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a0, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a5, AUTO, "ImageCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a7, AUTO, "ShutterCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ab, AUTO, "VariProgram", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ad, AUTO, "AFResponse", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b0, AUTO, "MultiExposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter}, - {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0081, AUTO, "ToneComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0083, AUTO, "LensType", &naLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0084, AUTO, "Lens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0086, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008b, AUTO, "LensFStops", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008c, AUTO, "NEFCurve1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008d, AUTO, "ColorHue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008f, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0090, AUTO, "LightSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0091, AUTO, "ShotInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0092, AUTO, "HueAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0094, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0095, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0096, AUTO, "NEFCurve2", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0097, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0098, AUTO, "LensData", &naLensDataInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0099, AUTO, "RawImageCenter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a0, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a5, AUTO, "ImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a7, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00aa, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ab, AUTO, "VariProgram", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ad, AUTO, "AFResponse", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b0, AUTO, "MultiExposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtexif/olympusattribs.cc b/rtexif/olympusattribs.cc index 35e390b88..4b61225a0 100644 --- a/rtexif/olympusattribs.cc +++ b/rtexif/olympusattribs.cc @@ -535,304 +535,304 @@ public: OLFlashModelInterpreter olFlashModelInterpreter; const TagAttrib olyFocusInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0210, AUTO, "SceneDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0211, AUTO, "SceneArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0212, AUTO, "SceneDetectData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "FocusStepNear", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0305, AUTO, "FocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0308, AUTO, "AFPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1500, AUTO, "SensorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1600, AUTO, "ImageStabilization", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0210, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0211, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0212, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "FocusStepNear", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0305, AUTO, "FocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0308, AUTO, "AFPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1500, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1600, AUTO, "ImageStabilization", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyImageProcessingAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011f, AUTO, "WB_GLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ColorMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "Enhancer", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "EnhancerValues", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0310, AUTO, "CoringFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0311, AUTO, "CoringValues", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0600, AUTO, "BlackLevel2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0610, AUTO, "GainBase", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0611, AUTO, "ValidBits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0612, AUTO, "CropLeft", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0613, AUTO, "CropTop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0614, AUTO, "CropWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0615, AUTO, "CropHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter}, - {1, AC_WRITE, 0, 0, 0x1103, AUTO, "UnknownBlock", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011f, AUTO, "WB_GLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "Enhancer", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "EnhancerValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0310, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0311, AUTO, "CoringValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0600, AUTO, "BlackLevel2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0610, AUTO, "GainBase", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0611, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0612, AUTO, "CropLeft", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0613, AUTO, "CropTop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0614, AUTO, "CropWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0615, AUTO, "CropHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1103, AUTO, "UnknownBlock", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyRawDevelopmentAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevSettings", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "RawDevSettings", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyRawDevelopment2Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, - {0, AC_WRITE, 0, 0, 0x0112, AUTO, "RawDevGradation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0112, AUTO, "RawDevGradation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter}, - {1, AC_WRITE, 0, 0, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "AELock", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "FocusProcess", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "AFSearch", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "AFAreas", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0400, AUTO, "FlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter}, - {0, AC_WRITE, 0, 0, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0503, AUTO, "CustomSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0505, AUTO, "ContrastSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x050d, AUTO, "CompressionFactor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x050f, AUTO, "Gradation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0522, AUTO, "PictureModeHue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter}, - {0, AC_WRITE, 0, 0, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0600, AUTO, "DriveMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0601, AUTO, "PanoramaMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter}, - {0, AC_WRITE, 0, 0, 0x0900, AUTO, "ManometerPressure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0901, AUTO, "ManometerReading", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "AELock", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "FocusProcess", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "AFSearch", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "AFAreas", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0400, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0503, AUTO, "CustomSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0505, AUTO, "ContrastSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050d, AUTO, "CompressionFactor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050f, AUTO, "Gradation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0522, AUTO, "PictureModeHue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0600, AUTO, "DriveMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0601, AUTO, "PanoramaMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x0900, AUTO, "ManometerPressure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0901, AUTO, "ManometerReading", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyEquipmentAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "CameraType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "LensType", &olLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x0207, AUTO, "MinFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "LensProperties", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "Extender", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "ExtenderModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "CameraType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "LensType", &olLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0207, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "LensProperties", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "Extender", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "ExtenderModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olympusAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "SpecialMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "Macro", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0203, AUTO, "BWMode", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0207, AUTO, "CameraType", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0208, AUTO, "TextInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "CameraID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0280, AUTO, "PreviewImage", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "WhiteBoard", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0403, AUTO, "SceneMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0404, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0405, AUTO, "Firmware", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "DataDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f01, AUTO, "DataDump2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "ISOValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "ApertureValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "BrightnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1004, AUTO, "FlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1005, AUTO, "FlashDevice", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1007, AUTO, "SensorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1008, AUTO, "LensTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1009, AUTO, "LightCondition", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100a, AUTO, "FocusRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100b, AUTO, "FocusMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100e, AUTO, "FocusStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100f, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "ColorMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1012, AUTO, "BlackLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1015, AUTO, "WBMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1017, AUTO, "RedBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1018, AUTO, "BlueBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101a, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter}, - {0, AC_WRITE, 0, 0, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1029, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102b, AUTO, "ColorControl", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102c, AUTO, "ValidBits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102d, AUTO, "CoringFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SceneDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1031, AUTO, "SceneArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1033, AUTO, "SceneDetectData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1034, AUTO, "CompressionRatio", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter}, - {1, AC_WRITE, 0, 0, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1038, AUTO, "AFResult", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1039, AUTO, "CCDScanMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103c, AUTO, "NearLensStep", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103d, AUTO, "LightValueCenter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103f, AUTO, "FieldCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "SpecialMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "Macro", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0203, AUTO, "BWMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0207, AUTO, "CameraType", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0208, AUTO, "TextInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "CameraID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0280, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "WhiteBoard", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0403, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0404, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0405, AUTO, "Firmware", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f01, AUTO, "DataDump2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "ISOValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "ApertureValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1004, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1005, AUTO, "FlashDevice", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1007, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1008, AUTO, "LensTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1009, AUTO, "LightCondition", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100a, AUTO, "FocusRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100b, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100e, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100f, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1012, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1015, AUTO, "WBMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1017, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1018, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101a, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1029, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102b, AUTO, "ColorControl", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102c, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102d, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1030, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1031, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1033, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1034, AUTO, "CompressionRatio", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1038, AUTO, "AFResult", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1039, AUTO, "CCDScanMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103c, AUTO, "NearLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103d, AUTO, "LightValueCenter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103f, AUTO, "FieldCount", &stdInterpreter}, {0, AC_WRITE, 0, olyEquipmentAttribs, 0x2010, AUTO, "Equipment", &stdInterpreter}, {0, AC_WRITE, 0, olyCameraSettingsAttribs, 0x2020, AUTO, "CameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, olyRawDevelopmentAttribs, 0x2030, AUTO, "RawDevelopment", &stdInterpreter}, {0, AC_WRITE, 0, olyRawDevelopment2Attribs, 0x2031, AUTO, "RawDev2", &stdInterpreter}, {0, AC_WRITE, 0, olyImageProcessingAttribs, 0x2040, AUTO, "ImageProcessing", &stdInterpreter}, {0, AC_WRITE, 0, olyFocusInfoAttribs, 0x2050, AUTO, "FocusInfo", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2100, AUTO, "Olympus2100", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2300, AUTO, "Olympus2300", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2400, AUTO, "Olympus2400", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2500, AUTO, "Olympus2500", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2600, AUTO, "Olympus2600", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2700, AUTO, "Olympus2700", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2800, AUTO, "Olympus2800", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2900, AUTO, "Olympus2900", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x3000, AUTO, "RawInfo", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {1, AC_WRITE, 0, nullptr, 0x2100, AUTO, "Olympus2100", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2300, AUTO, "Olympus2300", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2400, AUTO, "Olympus2400", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2500, AUTO, "Olympus2500", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2600, AUTO, "Olympus2600", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2700, AUTO, "Olympus2700", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2800, AUTO, "Olympus2800", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2900, AUTO, "Olympus2900", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x3000, AUTO, "RawInfo", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index 4d3cef90d..9fc6b6fb6 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -980,7 +980,7 @@ public: } virtual std::string toString (Tag* t) { - double *liArray = NULL; + double *liArray = nullptr; double maxApertureAtFocal = 0.; double focalLength = 0.; int lensID = 256 * t->toInt(0, BYTE) + t->toInt(1, BYTE); @@ -1962,236 +1962,236 @@ public: PADriveMode2Interpreter paDriveMode2Interpreter; const TagAttrib pentaxAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "PentaxVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "PentaxModelType", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0002, AUTO, "PreviewImageSize", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0003, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0004, AUTO, "PreviewImageStart", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "PentaxModelID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Date", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "Time", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Quality", &paQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "PentaxImageSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "PictureMode", &paPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "FlashMode", &paFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "FocusMode", &paFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "AFPointSelected", &paAFPointInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "AFPointsInFocus", &paAFFocusInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "FocusPosition", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "ExposureTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "FNumber", &paFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 0x0014, AUTO, "ISO", &paISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "LightReading", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ExposureCompensation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0017, AUTO, "MeteringMode", &paMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "AutoBracketing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "WhiteBalance", &paWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "BlueBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "RedBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "FocalLength", &paFocalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001f, AUTO, "Saturation", &paSaturationInterpreter}, - {0, AC_WRITE, 0, 0, 0x0020, AUTO, "Contrast", &paContrastInterpreter}, - {0, AC_WRITE, 0, 0, 0x0021, AUTO, "Sharpness", &paSharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0x0022, AUTO, "WorldTimeLocation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0023, AUTO, "HometownCity", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0024, AUTO, "DestinationCity", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0025, AUTO, "HometownDST", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0026, AUTO, "DestinationDST", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0027, AUTO, "DSPFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0028, AUTO, "CPUFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0029, AUTO, "FrameNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x002d, AUTO, "EffectiveLV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0032, AUTO, "ImageProcessing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0033, AUTO, "PictureMode", &paPictureModeInterpreter2}, - {0, AC_WRITE, 0, 0, 0x0034, AUTO, "DriveMode", &paDriveModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0037, AUTO, "ColorSpace", &paColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0038, AUTO, "ImageAreaOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0039, AUTO, "RawImageSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003c, AUTO, "AFPointsInFocus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003e, AUTO, "PreviewImageBorders", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003f, AUTO, "LensType", &paLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0040, AUTO, "SensitivityAdjust", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0041, AUTO, "ImageProcessingCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0047, AUTO, "CameraTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0048, AUTO, "AELock", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0049, AUTO, "NoiseReduction", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x004d, AUTO, "FlashExposureComp", &paFlashExposureCompInterpreter}, - {0, AC_WRITE, 0, 0, 0x004f, AUTO, "ImageTone", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0050, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "PentaxVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "PentaxModelType", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0002, AUTO, "PreviewImageSize", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0003, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0004, AUTO, "PreviewImageStart", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "Date", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "Time", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "Quality", &paQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "PentaxImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "PictureMode", &paPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "FlashMode", &paFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "FocusMode", &paFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "AFPointSelected", &paAFPointInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "AFPointsInFocus", &paAFFocusInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "FocusPosition", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "ExposureTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "FNumber", &paFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0014, AUTO, "ISO", &paISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "LightReading", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0017, AUTO, "MeteringMode", &paMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "AutoBracketing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "WhiteBalance", &paWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "FocalLength", &paFocalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001f, AUTO, "Saturation", &paSaturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0020, AUTO, "Contrast", &paContrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0021, AUTO, "Sharpness", &paSharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0022, AUTO, "WorldTimeLocation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0023, AUTO, "HometownCity", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0024, AUTO, "DestinationCity", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0025, AUTO, "HometownDST", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "DestinationDST", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0027, AUTO, "DSPFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0028, AUTO, "CPUFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0029, AUTO, "FrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002d, AUTO, "EffectiveLV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0032, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0033, AUTO, "PictureMode", &paPictureModeInterpreter2}, + {0, AC_WRITE, 0, nullptr, 0x0034, AUTO, "DriveMode", &paDriveModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0037, AUTO, "ColorSpace", &paColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0038, AUTO, "ImageAreaOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0039, AUTO, "RawImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003c, AUTO, "AFPointsInFocus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003e, AUTO, "PreviewImageBorders", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003f, AUTO, "LensType", &paLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0040, AUTO, "SensitivityAdjust", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0041, AUTO, "ImageProcessingCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0047, AUTO, "CameraTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0048, AUTO, "AELock", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0049, AUTO, "NoiseReduction", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004d, AUTO, "FlashExposureComp", &paFlashExposureCompInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004f, AUTO, "ImageTone", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0050, AUTO, "ColorTemperature", &stdInterpreter}, {0, AC_WRITE, 0, pentaxSRInfoAttribs, 0x005c, AUTO, "ShakeReductionInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x005d, AUTO, "ShutterCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0069, AUTO, "DynamicRangeExpansion", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0071, AUTO, "HighISONoiseReduction", &paHighISONoiseInterpreter}, - {0, AC_WRITE, 0, 0, 0x0072, AUTO, "AFAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0073, AUTO, "MonochromeFilterEffect", &paMonochromeFilterEffectInterpreter}, - {0, AC_WRITE, 0, 0, 0x0074, AUTO, "MonochromeToning", &paMonochromeToningInterpreter}, - {0, AC_WRITE, 0, 0, 0x0076, AUTO, "FaceDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0077, AUTO, "FaceDetectFrameSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0079, AUTO, "ShadowCorrection", &paShadowCorrectionInterpreter}, - {0, AC_WRITE, 0, 0, 0x007a, AUTO, "ISOAutoParameters", &paISOAutoParametersInterpreter}, - {0, AC_WRITE, 0, 0, 0x007b, AUTO, "CrossProcess", &paCrossProcessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x005d, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0069, AUTO, "DynamicRangeExpansion", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0071, AUTO, "HighISONoiseReduction", &paHighISONoiseInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0072, AUTO, "AFAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0073, AUTO, "MonochromeFilterEffect", &paMonochromeFilterEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0074, AUTO, "MonochromeToning", &paMonochromeToningInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0076, AUTO, "FaceDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0077, AUTO, "FaceDetectFrameSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0079, AUTO, "ShadowCorrection", &paShadowCorrectionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007a, AUTO, "ISOAutoParameters", &paISOAutoParametersInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007b, AUTO, "CrossProcess", &paCrossProcessInterpreter}, {0, AC_WRITE, 0, pentaxLensCorrAttribs, 0x007d, AUTO, "LensCorr", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x007f, AUTO, "BleachBypassToning", &paBleachBypassToningInterpreter}, - {0, AC_WRITE, 0, 0, 0x0082, AUTO, "BlurControl", &paBlurControlInterpreter}, - {0, AC_WRITE, 0, 0, 0x0085, AUTO, "HDR", &paHDRInterpreter}, - {0, AC_WRITE, 0, 0, 0x0088, AUTO, "NeutralDensityFilter", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x008b, AUTO, "ISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "BlackPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "WhitePoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0203, AUTO, "ColorMatrixA", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "ColorMatrixB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007f, AUTO, "BleachBypassToning", &paBleachBypassToningInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0082, AUTO, "BlurControl", &paBlurControlInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0085, AUTO, "HDR", &paHDRInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0088, AUTO, "NeutralDensityFilter", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008b, AUTO, "ISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "BlackPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0203, AUTO, "ColorMatrixA", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "ColorMatrixB", &stdInterpreter}, {0, AC_WRITE, 0, pentaxCameraSettingsAttribs, 0x0205, AUTO, "CameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, pentaxAEInfoAttribs, 0x0206, AUTO, "AEInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxLensDataAttribs, 0x0207, AUTO, "LensInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxFlashInfoAttribs, 0x0208, AUTO, "FlashInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AEMeteringSegments", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020a, AUTO, "FlashADump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "FlashBDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020d, AUTO, "WB_RGGBLevelsDaylight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020e, AUTO, "WB_RGGBLevelsShade", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020f, AUTO, "WB_RGGBLevelsCloudy", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0210, AUTO, "WB_RGGBLevelsTungsten", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0211, AUTO, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0212, AUTO, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0213, AUTO, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0214, AUTO, "WB_RGGBLevelsFlash", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "AEMeteringSegments", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020a, AUTO, "FlashADump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "FlashBDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020d, AUTO, "WB_RGGBLevelsDaylight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020e, AUTO, "WB_RGGBLevelsShade", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020f, AUTO, "WB_RGGBLevelsCloudy", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0210, AUTO, "WB_RGGBLevelsTungsten", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0211, AUTO, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0212, AUTO, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0213, AUTO, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0214, AUTO, "WB_RGGBLevelsFlash", &stdInterpreter}, {0, AC_WRITE, 0, pentaxCameraInfoAttribs, 0x0215, AUTO, "CameraInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxBatteryInfoAttribs, 0x0216, AUTO, "BatteryInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x021f, AUTO, "AFInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0222, AUTO, "ColorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x021f, AUTO, "AFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0222, AUTO, "ColorInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxLensInfoQAttribs, 0x0239, AUTO, "LensInfoQ", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fe, AUTO, "DataDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ff, AUTO, "UnknownInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0402, AUTO, "ToneCurve", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0403, AUTO, "ToneCurves", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x03fe, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ff, AUTO, "UnknownInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0402, AUTO, "ToneCurve", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0403, AUTO, "ToneCurves", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxSRInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "SRResult", &paSRResultInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ShakeReduction", &paShakeReductionInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "SRHalfPressTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "SRFocalLength", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "SRResult", &paSRResultInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ShakeReduction", &paShakeReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "SRHalfPressTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "SRFocalLength", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxSRInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "SRResult", &paSRResultInterpreter}, // assuming it's the same interpreter, but that's not sure - {0, AC_WRITE, 0, 0, 1, AUTO, "ShakeReduction", &paShakeReduction2Interpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "SRResult", &paSRResultInterpreter}, // assuming it's the same interpreter, but that's not sure + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ShakeReduction", &paShakeReduction2Interpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensDataAttribs[] = { - {0, AC_WRITE, 0, 0, 9, AUTO, "FocalLength", &paLensDataFocalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMaxAperture", &paNominalMaxApertureInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMinAperture", &paNominalMinApertureInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "MaxAperture", &paMaxApertureInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 9, AUTO, "FocalLength", &paLensDataFocalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "NominalMaxAperture", &paNominalMaxApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "NominalMinAperture", &paNominalMinApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "MaxAperture", &paMaxApertureInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensInfoQAttribs[] = { - {0, AC_WRITE, 0, 0, 12, AUTO, "LensModel", &paLensModelQInterpreter}, - {0, AC_WRITE, 0, 0, 42, AUTO, "LensInfo", &paLensInfoQInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 12, AUTO, "LensModel", &paLensModelQInterpreter}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "LensInfo", &paLensInfoQInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensCorrAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "DistortionCorrection", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ChromaticAberrationCorrection", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "VignettingCorrection", &paOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "DistortionCorrection", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ChromaticAberrationCorrection", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "VignettingCorrection", &paOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PictureMode2", &paPictureMode2Interpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ProgramLine", &paProgramLineInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "EVSteps", &paEVStepsInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "E-DialinProgram", &paEDialinInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureRing", &paApertureRingUseInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "FlashOptions", &paFlashOptionInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "MeteringMode2", &paMeteringMode2Interpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AFMode", &paAFModeInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "AFPointSelected2", &paAFPointSelectedInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "DriveMode2", &paDriveMode2Interpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "BracketShotNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "WhiteBalanceSet", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PictureMode2", &paPictureMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ProgramLine", &paProgramLineInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "EVSteps", &paEVStepsInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "E-DialinProgram", &paEDialinInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ApertureRing", &paApertureRingUseInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "FlashOptions", &paFlashOptionInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "MeteringMode2", &paMeteringMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AFMode", &paAFModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "AFPointSelected2", &paAFPointSelectedInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "DriveMode2", &paDriveMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "WhiteBalanceSet", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AEXv", &paAEXvInterpreter}, - {0, AC_WRITE, 0, 0, 4, SBYTE, "AEBXv", &paAEBXvInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "AEProgramMode", &paAEProgramModeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "AEMeteringMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, SBYTE, "FlashExposureCompSet", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AEXv", &paAEXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, SBYTE, "AEBXv", &paAEBXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "AEProgramMode", &paAEProgramModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "AEMeteringMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, SBYTE, "FlashExposureCompSet", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 2, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "AEXv", &paAEXvInterpreter}, - {0, AC_WRITE, 0, 0, 6, SBYTE, "AEBXv", &paAEBXvInterpreter}, - {0, AC_WRITE, 0, 0, 8, SBYTE, "AEError", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "AEXv", &paAEXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, SBYTE, "AEBXv", &paAEBXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, SBYTE, "AEError", &stdInterpreter}, //{0, AC_WRITE, 0, 0, 11, AUTO, "AEApertureSteps", &}, - {0, AC_WRITE, 0, 0, 15, AUTO, "SceneMode", &paSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 15, AUTO, "SceneMode", &paSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfo3Attribs[] = { - {0, AC_WRITE, 0, 0, 16, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 30, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 31, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 30, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 31, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxFlashInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "FlashStatus", &paFlashStatusInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "InternalFlashMode", &paInternalFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ExternalFlashMode", &paExternalFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "InternalFlashStrength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "FlashStatus", &paFlashStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "InternalFlashMode", &paInternalFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ExternalFlashMode", &paExternalFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "InternalFlashStrength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxBatteryInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PowerSource", &paPowerSourceInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "BatteryStates", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "BatteryADBodyNoLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "BatteryADBodyLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "BatteryADGripNoLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "BatteryADGripLoad", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PowerSource", &paPowerSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "BatteryStates", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "BatteryADBodyNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "BatteryADBodyLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "BatteryADGripNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "BatteryADGripLoad", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxCameraInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PentaxModelID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ManufactureDate", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ProductionCode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "InternalSerialNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ManufactureDate", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ProductionCode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "InternalSerialNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index a13e9cae8..64ddd0ee3 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -47,7 +47,7 @@ Interpreter stdInterpreter; #define TAG_SUBFILETYPE 0x00fe TagDirectory::TagDirectory () - : attribs(ifdAttribs), order(HOSTORDER), parent(NULL) {} + : attribs(ifdAttribs), order(HOSTORDER), parent(nullptr) {} TagDirectory::TagDirectory (TagDirectory* p, const TagAttrib* ta, ByteOrder border) : attribs(ta), order(border), parent(p) {} @@ -141,7 +141,7 @@ const TagAttrib* TagDirectory::getAttrib (int id) return &attribs[i]; } - return NULL; + return nullptr; } const TagAttrib* TagDirectory::getAttrib (const char* name) @@ -153,7 +153,7 @@ const TagAttrib* TagDirectory::getAttrib (const char* name) return &attribs[i]; } - return NULL; + return nullptr; } const TagAttrib* TagDirectory::getAttribP (const char* name) @@ -179,7 +179,7 @@ const TagAttrib* TagDirectory::getAttribP (const char* name) if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { return tagDir->getAttribP(n + 1); } else { - return NULL; + return nullptr; } } else { return &attribs[i]; @@ -187,7 +187,7 @@ const TagAttrib* TagDirectory::getAttribP (const char* name) } } - return NULL; + return nullptr; } void TagDirectory::printAll (unsigned int level) const @@ -263,13 +263,13 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring std::vector tagDirList; std::vector tagDirPaths; - FILE *f = NULL; + FILE *f = nullptr; if (!keyFile) { // open the file in write mode f = g_fopen (commFName.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { printf("TagDirectory::keyFileDump(\"%s\") >>> Error: unable to open file with write access!\n", commFName.c_str()); delete kf; return false; @@ -396,7 +396,7 @@ Tag* TagDirectory::getTag (int ID) const return tags[i]; } - return NULL; + return nullptr; } Tag* TagDirectory::getTag (const char* name) const @@ -409,7 +409,7 @@ Tag* TagDirectory::getTag (const char* name) const } } - return NULL; + return nullptr; } Tag* TagDirectory::getTagP (const char* name) const @@ -435,7 +435,7 @@ Tag* TagDirectory::getTagP (const char* name) const if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { return tagDir->getTagP(n + 1); } else { - return NULL; + return nullptr; } } else { return getTag (attribs[i].ID); @@ -443,7 +443,7 @@ Tag* TagDirectory::getTagP (const char* name) const } } - return NULL; + return nullptr; } Tag* TagDirectory::findTag (const char* name) const @@ -471,7 +471,7 @@ Tag* TagDirectory::findTag (const char* name) const } } - return NULL; + return nullptr; } // Searches a simple value, as either attribute or element @@ -615,7 +615,7 @@ void TagDirectory::applyChange (std::string name, std::string value) // this is a final segment: apply change if (dp == std::string::npos) { - Tag* t = NULL; + Tag* t = nullptr; for (size_t i = 0; i < tags.size(); i++) if (tags[i]->nameToString() == fseg) { @@ -630,7 +630,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } else if (t && !t->isDirectory()) { t->valueFromString (value); } else { - const TagAttrib* attrib = NULL; + const TagAttrib* attrib = nullptr; for (int i = 0; attribs[i].ignore != -1; i++) if (!strcmp (attribs[i].name, fseg.c_str())) { @@ -650,7 +650,7 @@ void TagDirectory::applyChange (std::string name, std::string value) // try to find it std::string::size_type dp1 = fseg.find_first_of ('['); std::string basename = fseg.substr (0, dp1); - Tag* t = NULL; + Tag* t = nullptr; int dirnum = -1; for (size_t i = 0; i < tags.size(); i++) @@ -670,7 +670,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } if (!t && value != "#keep" && value != "#delete") { - const TagAttrib* attrib = NULL; + const TagAttrib* attrib = nullptr; for (int i = 0; attribs[i].ignore != -1; i++) if (!strcmp (attribs[i].name, fseg.c_str())) { @@ -760,7 +760,7 @@ int TagDirectoryTable::write (int start, unsigned char* buffer) //----------------------------------------------------------------------------- Tag::Tag (TagDirectory* p, FILE* f, int base) - : type(INVALID), count(0), value(NULL), allocOwnMemory(true), attrib(NULL), parent(p), directory(NULL) + : type(INVALID), count(0), value(nullptr), allocOwnMemory(true), attrib(nullptr), parent(p), directory(nullptr) { ByteOrder order = getOrder(); @@ -830,7 +830,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) fread (buffer, 1, 2, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, currPos, pentaxAttribs, strncmp(buffer, "MM", 2) ? INTEL : MOTOROLA); - directory[1] = NULL; + directory[1] = nullptr; } else /* SONY uses this tag to write hidden info and pointer to private encrypted tags { @@ -876,7 +876,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) switch( tag ) { case 0x0010: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 15360) { directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , sonyCameraInfoAttribs, order); @@ -888,7 +888,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0114: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 280 || count == 364) { directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , sonyCameraSettingsAttribs, MOTOROLA); @@ -899,7 +899,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown CameraSettings delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -908,7 +908,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x9405: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -923,21 +923,21 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0208: case 0x0216: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; case 0x0215: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; case 0x005c: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 4) { // SRInfo directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxSRInfoAttribs, order); @@ -946,7 +946,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown SRInfo delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -955,7 +955,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0206: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 21) { // AEInfo2 directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxAEInfo2Attribs, order); @@ -966,7 +966,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown AEInfo delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -990,7 +990,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, offsetFirst, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; } @@ -998,7 +998,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0239: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1016,7 +1016,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0098: case 0x00a0: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SSHORT , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1024,7 +1024,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x009a: case 0x4013: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1036,7 +1036,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) switch (tag) { case 0x0025: { directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1050,7 +1050,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) type = LONG; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, attrib->subdirAttribs, order); - directory[1] = NULL; + directory[1] = nullptr; } else { goto defsubdirs; } @@ -1090,7 +1090,7 @@ defsubdirs: } // set the terminating NULL - directory[sdcount] = NULL; + directory[sdcount] = nullptr; } else { type = INVALID; } @@ -1103,7 +1103,7 @@ defsubdirs: bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) { - value = NULL; + value = nullptr; Tag* tmake = parent->getRoot()->findTag("Make"); std::string make( tmake ? tmake->valueToString() : ""); @@ -1123,13 +1123,13 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 8, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon2Attribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( model.find("NIKON E990") != std::string::npos || (model.find("NIKON D1") != std::string::npos && model.size() > 8 && model.at(8) != '0')) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon3Attribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else { // needs refinement! (embedded tiff header parsing) makerNoteKind = NIKON3; @@ -1145,13 +1145,13 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) else MakerNoteOrder = rtexif::INTEL; directory[0] = new TagDirectory (parent, f, basepos + 10, nikon3Attribs, MakerNoteOrder); - directory[1] = NULL; + directory[1] = nullptr; } } else if ( make.find( "Canon" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, canonAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "PENTAX" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 6; @@ -1159,7 +1159,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 6, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, pentaxAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( (make.find( "RICOH" ) != std::string::npos ) && (model.find("PENTAX") != std::string::npos) ) { makerNoteKind = HEADERIFD; valuesize = 10; @@ -1167,7 +1167,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 10, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell (f) - 10, pentaxAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "FUJIFILM" ) != std::string::npos ) { makerNoteKind = FUJI; valuesize = 12; @@ -1175,12 +1175,12 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 12, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell(f) - 12, fujiAttribs, INTEL); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "KONICA MINOLTA" ) != std::string::npos || make.find( "Minolta" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, minoltaAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "SONY" ) != std::string::npos ) { valuesize = 12; value = new unsigned char[12]; @@ -1195,14 +1195,14 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, sonyAttribs, bom ); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "OLYMPUS" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 8; value = new unsigned char[12]; fread (value, 1, 8, f); directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (!strncmp((char*)value, "OLYMPUS", 7)) { makerNoteKind = OLYMPUS2; @@ -1234,7 +1234,7 @@ Tag* Tag::clone (TagDirectory* parent) t->value = new unsigned char [valuesize]; memcpy (t->value, value, valuesize); } else { - value = NULL; + value = nullptr; } t->makerNoteKind = makerNoteKind; @@ -1250,9 +1250,9 @@ Tag* Tag::clone (TagDirectory* parent) t->directory[i] = directory[i]->clone (parent); } - t->directory[ds] = NULL; + t->directory[ds] = nullptr; } else { - t->directory = NULL; + t->directory = nullptr; } return t; @@ -1719,26 +1719,26 @@ int Tag::write (int offs, int dataOffs, unsigned char* buffer) } Tag::Tag (TagDirectory* p, const TagAttrib* attr) - : tag(attr ? attr->ID : -1), type(INVALID), count(0), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(INVALID), count(0), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { } Tag::Tag (TagDirectory* p, const TagAttrib* attr, int data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initInt (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, unsigned char *data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(false), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(false), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initType (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, const char* text) - : tag(attr ? attr->ID : -1), type(ASCII), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(ASCII), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initString (text); @@ -1795,8 +1795,8 @@ void Tag::initSubDir () value = new unsigned char[4]; setInt (0); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, attrib ? attrib->subdirAttribs : NULL, parent->getOrder()); - directory[1] = NULL; + directory[0] = new TagDirectory (parent, attrib ? attrib->subdirAttribs : nullptr, parent->getOrder()); + directory[1] = nullptr; } void Tag::initSubDir (TagDirectory* dir) @@ -1808,7 +1808,7 @@ void Tag::initSubDir (TagDirectory* dir) setInt (0); directory = new TagDirectory*[2]; directory[0] = dir; - directory[1] = NULL; + directory[1] = nullptr; } void Tag::initMakerNote (MNKind mnk, const TagAttrib* ta) @@ -1820,7 +1820,7 @@ void Tag::initMakerNote (MNKind mnk, const TagAttrib* ta) setInt (0); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, ta, parent->getOrder()); - directory[1] = NULL; + directory[1] = nullptr; makerNoteKind = mnk; } @@ -1864,14 +1864,14 @@ const TagAttrib* lookupAttrib (const TagAttrib* dir, const char* field) return &dir[i]; } - return 0; + return nullptr; } TagDirectory* ExifManager::parseCIFF (FILE* f, int base, int length) { - TagDirectory* root = new TagDirectory (NULL, ifdAttribs, INTEL); + TagDirectory* root = new TagDirectory (nullptr, ifdAttribs, INTEL); Tag* exif = new Tag (root, lookupAttrib(ifdAttribs, "Exif")); exif->initSubDir (); Tag* mn = new Tag (exif->getDirectory(), lookupAttrib(exifAttribs, "MakerNote")); @@ -1920,7 +1920,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) TagDirectory* exif = root->getTag("Exif")->getDirectory(); - time_t timestamp = time (NULL); + time_t timestamp = time (nullptr); for (int i = 0; i < numOfTags; i++) { @@ -2149,7 +2149,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) exif->addTag (t); } - if (timestamp != time(NULL)) { + if (timestamp != time(nullptr)) { struct tm* tim = localtime (×tamp); strftime (buffer, 20, "%Y:%m:%d %H:%M:%S", tim); t = new Tag (exif, lookupAttrib(exifAttribs, "DateTimeOriginal")); @@ -2301,21 +2301,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) // Quick-and-dirty value extractor, no real xml parsing. // We could make it more generic, but we just get most important // values we know use to be in there. - if ((p = strstr(xmp, "xmlns:tiff")) != NULL && - (end = strstr(p, "")) != NULL) { + if ((p = strstr(xmp, "xmlns:tiff")) != nullptr && + (end = strstr(p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == NULL) { + if ((tagend = strchr(tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "initString (val); } - if (p1 != NULL) { + if (p1 != nullptr) { *p1 = '('; } } else { @@ -2365,21 +2365,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) *end = '<'; } - if ((p = strstr(xmp, "xmlns:exif")) != NULL && - (end = strstr(p, "")) != NULL) { + if ((p = strstr(xmp, "xmlns:exif")) != nullptr && + (end = strstr(p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == NULL) { + if ((tagend = strchr(tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "getTag ("Make"); @@ -2548,7 +2548,7 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) if (!exif) { // old Kodak cameras may have exif tags in IFD0, reparse and create an exif subdir fseek (f, base + firstifd, SEEK_SET); - TagDirectory* exifdir = new TagDirectory (NULL, f, base, exifAttribs, order, true); + TagDirectory* exifdir = new TagDirectory (nullptr, f, base, exifAttribs, order, true); exif = new Tag (root, root->getAttrib ("Exif")); exif->initSubDir(exifdir); @@ -2591,7 +2591,7 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) tethered. In single-shot mode they should be exactly the same as the single-shot models. */ Tag *subd = root->getTag(0x14a); - Tag *iw = (subd) ? subd->getDirectory()->getTag("ImageWidth") : 0; + Tag *iw = (subd) ? subd->getDirectory()->getTag("ImageWidth") : nullptr; int sensorWidth = (iw) ? iw->toInt() : 0; Tag* tmodel = root->getTag ("Model"); const char *model = (tmodel) ? (const char *)tmodel->getValue() : ""; @@ -2767,7 +2767,7 @@ TagDirectory* ExifManager::parseJPEG (FILE* f) if (fread (&c, 1, 1, f) && c == 0xe1) { // APP1 marker found if (fread (idbuff, 1, 8, f) < 8) { - return NULL; + return nullptr; } if (!memcmp(idbuff + 2, exifid, 6)) { // Exif info found @@ -2777,7 +2777,7 @@ TagDirectory* ExifManager::parseJPEG (FILE* f) } } - return NULL; + return nullptr; } TagDirectory* ExifManager::parseTIFF (FILE* f, bool skipIgnored) @@ -2831,9 +2831,9 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (NULL); + cl = (const_cast(root))->clone (nullptr); } else { - cl = new TagDirectory (NULL, ifdAttribs, INTEL); + cl = new TagDirectory (nullptr, ifdAttribs, INTEL); } for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); ++i) { @@ -2874,7 +2874,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (NULL); + cl = (const_cast(root))->clone (nullptr); // remove some unknown top level tags which produce warnings when opening a tiff Tag *removeTag = cl->getTag(0x9003); if(removeTag) @@ -2883,7 +2883,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro if(removeTag) removeTag->setKeep(false); } else { - cl = new TagDirectory (NULL, ifdAttribs, HOSTORDER); + cl = new TagDirectory (nullptr, ifdAttribs, HOSTORDER); } // add tiff strip data diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 02d357a5d..e1d8ede6e 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -157,7 +157,7 @@ public: virtual void printAll (unsigned int level = 0) const; // reentrant debug function, keep level=0 on first call ! virtual bool CPBDump (const Glib::ustring &commFName, const Glib::ustring &imageFName, const Glib::ustring &profileFName, const Glib::ustring &defaultPParams, - const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = NULL, Glib::ustring tagDirName = "") const; + const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = nullptr, Glib::ustring tagDirName = "") const; virtual void sort (); }; @@ -293,11 +293,11 @@ public: // get subdirectory (there can be several, the last is NULL) bool isDirectory () { - return directory != NULL; + return directory != nullptr; } TagDirectory* getDirectory (int i = 0) { - return (directory) ? directory[i] : 0; + return (directory) ? directory[i] : nullptr; } MNKind getMakerNoteFormat () diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 80db5018f..adb19c969 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -1067,7 +1067,7 @@ public: focalLength = focalLengthTag->toDouble(); } - double *liArray = NULL; + double *liArray = nullptr; if (lensInfoTag) { liArray = lensInfoTag->toDoubleArray(); @@ -1173,7 +1173,7 @@ public: focalLength = focalLengthTag->toDouble(); } - double *liArray = NULL; + double *liArray = nullptr; if (lensInfoTag) { liArray = lensInfoTag->toDoubleArray(); @@ -2253,226 +2253,226 @@ public: SAColorTemperatureSettingInterpreter saColorTemperatureSettingInterpreter; const TagAttrib minoltaAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "MakerNoteVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MinoltaCameraSettingsOld", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "MinoltaCameraSettings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "MinoltaCameraSettings7D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "ImageStabilization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0040, AUTO, "CompressedImageSize", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0081, AUTO, "PreviewImage", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0088, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0089, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "SceneMode", &saSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "ColorMode", &saColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "MinoltaQuality", &maQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "MinoltaImageSize", &maImageSizeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "Teleconverter", &maTeleconverterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "LensID", &saLensIDInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0114, AUTO, "MinoltaCameraSettings", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "MinoltaCameraSettings2", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "MinoltaCameraSettingsOld", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "MinoltaCameraSettings7D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0040, AUTO, "CompressedImageSize", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0081, AUTO, "PreviewImage", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0088, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0089, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "MinoltaQuality", &maQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "MinoltaImageSize", &maImageSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "Teleconverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0114, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "MinoltaCameraSettings2", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyAttribs[] = { {0, AC_WRITE, 0, sonyCameraInfoAttribs, 0x0010, AUTO, "CameraInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "Quality", &maQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "TeleConverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "Quality", &maQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "TeleConverter", &maTeleconverterInterpreter}, {0, AC_WRITE, 0, sonyCameraSettingsAttribs, 0x0114, AUTO, "SonyCameraSettings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WhiteBalance", &saWhiteBalanceInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2001, AUTO, "PreviewImage", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2009, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction}, - {0, AC_WRITE, 0, 0, 0x200a, AUTO, "AutoHDR", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x200b, AUTO, "MultiFrameNoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x200e, AUTO, "PictureEffect", &saPictureEffectInterpreter}, - {0, AC_WRITE, 0, 0, 0x2011, AUTO, "VignettingCorrection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2012, AUTO, "LateralChromaticAberration", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2013, AUTO, "DistortionCorrection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb020, AUTO, "ColorReproduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb021, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb022, AUTO, "ColorCompensationFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb023, AUTO, "SceneMode", &saSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb024, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, AC_WRITE, 0, 0, 0xb025, AUTO, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, - {0, AC_WRITE, 0, 0, 0xb026, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb027, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0115, AUTO, "WhiteBalance", &saWhiteBalanceInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2001, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2009, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction}, + {0, AC_WRITE, 0, nullptr, 0x200a, AUTO, "AutoHDR", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x200b, AUTO, "MultiFrameNoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x200e, AUTO, "PictureEffect", &saPictureEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2011, AUTO, "VignettingCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2012, AUTO, "LateralChromaticAberration", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2013, AUTO, "DistortionCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb020, AUTO, "ColorReproduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb021, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb022, AUTO, "ColorCompensationFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb023, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb024, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb025, AUTO, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb026, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb027, AUTO, "LensID", &saLensIDInterpreter}, {0, AC_WRITE, 0, minoltaAttribs, 0xb028, AUTO, "MinoltaMakerNote", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb029, AUTO, "ColorMode", &saColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb040, AUTO, "Macro", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb041, AUTO, "ExposureMode", &saExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb042, AUTO, "FocusMode", &saFocusMode}, - {0, AC_WRITE, 0, 0, 0xb043, AUTO, "AFMode", &saAFMode}, - {0, AC_WRITE, 0, 0, 0xb044, AUTO, "AFIlluminator", &saAFIlluminator}, - {0, AC_WRITE, 0, 0, 0xb047, AUTO, "Quality", &saQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0xb048, AUTO, "FlashLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb049, AUTO, "ReleaseMode", &saReleaseModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04a, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04b, AUTO, "AntiBlur", &saAntiBlurInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04e, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04f, AUTO, "DynamicRangeOptimizer", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb050, AUTO, "HighISONoiseReduction2", &saHighISONoiseReduction2}, - {0, AC_WRITE, 0, 0, 0xb052, AUTO, "IntelligentAuto", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb029, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb040, AUTO, "Macro", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb041, AUTO, "ExposureMode", &saExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb042, AUTO, "FocusMode", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 0xb043, AUTO, "AFMode", &saAFMode}, + {0, AC_WRITE, 0, nullptr, 0xb044, AUTO, "AFIlluminator", &saAFIlluminator}, + {0, AC_WRITE, 0, nullptr, 0xb047, AUTO, "Quality", &saQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb048, AUTO, "FlashLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb049, AUTO, "ReleaseMode", &saReleaseModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04a, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04b, AUTO, "AntiBlur", &saAntiBlurInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04e, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04f, AUTO, "DynamicRangeOptimizer", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb050, AUTO, "HighISONoiseReduction2", &saHighISONoiseReduction2}, + {0, AC_WRITE, 0, nullptr, 0xb052, AUTO, "IntelligentAuto", &stdInterpreter}, {0, AC_WRITE, 0, sonyTag9405Attribs, 0x9405, AUTO, "Tag9405", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyTag9405Attribs[] = { - {0, AC_WRITE, 0, 0, 0x005d, AUTO, "LensFormat", &stdInterpreter}, // 9405b start here - {0, AC_WRITE, 0, 0, 0x005e, AUTO, "LensMount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0060, SHORT, "LensType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0062, SHORT, "LensType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0603, AUTO, "LensFormat", &stdInterpreter}, // 9405a start here - {0, AC_WRITE, 0, 0, 0x0604, AUTO, "LensMount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0605, SHORT, "LensType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0608, SHORT, "LensType", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x005d, AUTO, "LensFormat", &stdInterpreter}, // 9405b start here + {0, AC_WRITE, 0, nullptr, 0x005e, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0060, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0062, SHORT, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0603, AUTO, "LensFormat", &stdInterpreter}, // 9405a start here + {0, AC_WRITE, 0, nullptr, 0x0604, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0605, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0608, SHORT, "LensType", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 14, SHORT, "FocalLength", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 16, SHORT, "FocalLengthTeleZoom", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FocusStatus", &saCameraInfoFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "AFPointSelected", &saCameraInfoAFPointSelected}, - {0, AC_WRITE, 0, 0, 29, AUTO, "FocusMode", &saFocusMode2}, - {0, AC_WRITE, 0, 0, 32, AUTO, "AFPoint", &saCameraInfoAFPoint}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 14, SHORT, "FocalLength", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, SHORT, "FocalLengthTeleZoom", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FocusStatus", &saCameraInfoFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "AFPointSelected", &saCameraInfoAFPointSelected}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "FocusMode", &saFocusMode2}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "AFPoint", &saCameraInfoAFPoint}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 304, AUTO, "AFMicroAdjValue", &saAFMicroAdjValueInterpreter}, - {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjMode", &saAFMicroAdjModeInterpreter}, - {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjRegisteredLenses", &saAFMicroAdjRegisteredLensesInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 304, AUTO, "AFMicroAdjValue", &saAFMicroAdjValueInterpreter}, + {0, AC_WRITE, 0, nullptr, 305, AUTO, "AFMicroAdjMode", &saAFMicroAdjModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 305, AUTO, "AFMicroAdjRegisteredLenses", &saAFMicroAdjRegisteredLensesInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "DriveMode", &saDriveMode}, - {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "FocusModeSetting", &saFocusMode}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AFAreaMode", &saAFAreaMode}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AFPointSelected", &saAFPointSelected}, - {0, AC_WRITE, 0, 0, 21, AUTO, "MeteringMode", &saMeteringMode1_4}, - {0, AC_WRITE, 0, 0, 22, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, - {0, AC_WRITE, 0, 0, 25, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "CreativeStyle", &saCreativeStyle}, - {0, AC_WRITE, 0, 0, 28, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 30, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 31, AUTO, "ZoneMatchingValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 34, AUTO, "Brightness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode", &saFlashMode}, - {0, AC_WRITE, 0, 0, 40, AUTO, "PrioritySetupShutterRelease", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 41, AUTO, "AFIlluminator", &saAFIlluminator}, - {0, AC_WRITE, 0, 0, 42, AUTO, "AFWithShutter", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 43, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 44, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction3}, - {0, AC_WRITE, 0, 0, 45, AUTO, "ImageStyle", &saImageStyleInterpreter}, - {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram", &saExposureProgram}, - {0, AC_WRITE, 0, 0, 61, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation", &saRotation}, - {0, AC_WRITE, 0, 0, 77, AUTO, "FocusMode", &saFocusMode}, - {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize", &saSonyImageSize}, - {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio", &saAspectRatio}, - {0, AC_WRITE, 0, 0, 86, AUTO, "Quality", &saQualityInterpreter2}, - {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "DriveMode", &saDriveMode}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "FocusModeSetting", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AFAreaMode", &saAFAreaMode}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AFPointSelected", &saAFPointSelected}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "MeteringMode", &saMeteringMode1_4}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "CreativeStyle", &saCreativeStyle}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 30, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 31, AUTO, "ZoneMatchingValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 34, AUTO, "Brightness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashMode", &saFlashMode}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "PrioritySetupShutterRelease", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 41, AUTO, "AFIlluminator", &saAFIlluminator}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "AFWithShutter", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 43, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 44, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction3}, + {0, AC_WRITE, 0, nullptr, 45, AUTO, "ImageStyle", &saImageStyleInterpreter}, + {0, AC_WRITE, 0, nullptr, 60, AUTO, "ExposureProgram", &saExposureProgram}, + {0, AC_WRITE, 0, nullptr, 61, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 63, AUTO, "Rotation", &saRotation}, + {0, AC_WRITE, 0, nullptr, 77, AUTO, "FocusMode", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 84, AUTO, "SonyImageSize", &saSonyImageSize}, + {0, AC_WRITE, 0, nullptr, 85, AUTO, "AspectRatio", &saAspectRatio}, + {0, AC_WRITE, 0, nullptr, 86, AUTO, "Quality", &saQualityInterpreter2}, + {0, AC_WRITE, 0, nullptr, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs2[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "FocusMode", &saFocusMode2}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AFAreaMode", &saAFAreaMode}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AFPointSelected", &saAFPointSelected2}, - {0, AC_WRITE, 0, 0, 19, AUTO, "MeteringMode", &saMeteringMode1_4}, - {0, AC_WRITE, 0, 0, 20, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, - {0, AC_WRITE, 0, 0, 23, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "CreativeStyle", &saCreativeStyle2}, - {0, AC_WRITE, 0, 0, 25, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode", &saFlashMode}, - {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction4}, - {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram", &saExposureProgram}, - {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation", &saRotation}, - {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize", &saSonyImageSize}, - {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio", &saAspectRatio}, - {0, AC_WRITE, 0, 0, 86, AUTO, "Quality", &saQualityInterpreter2}, - {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, - {0, AC_WRITE, 0, 0, 126, AUTO, "DriveMode", &saDriveMode2}, - {0, AC_WRITE, 0, 0, 131, AUTO, "ColorSpace", &saColorSpace5_6}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "FocusMode", &saFocusMode2}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AFAreaMode", &saAFAreaMode}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AFPointSelected", &saAFPointSelected2}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "MeteringMode", &saMeteringMode1_4}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "CreativeStyle", &saCreativeStyle2}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashMode", &saFlashMode}, + {0, AC_WRITE, 0, nullptr, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction4}, + {0, AC_WRITE, 0, nullptr, 60, AUTO, "ExposureProgram", &saExposureProgram}, + {0, AC_WRITE, 0, nullptr, 63, AUTO, "Rotation", &saRotation}, + {0, AC_WRITE, 0, nullptr, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 84, AUTO, "SonyImageSize", &saSonyImageSize}, + {0, AC_WRITE, 0, nullptr, 85, AUTO, "AspectRatio", &saAspectRatio}, + {0, AC_WRITE, 0, nullptr, 86, AUTO, "Quality", &saQualityInterpreter2}, + {0, AC_WRITE, 0, nullptr, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, + {0, AC_WRITE, 0, nullptr, 126, AUTO, "DriveMode", &saDriveMode2}, + {0, AC_WRITE, 0, nullptr, 131, AUTO, "ColorSpace", &saColorSpace5_6}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs3[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ShutterSpeedSetting", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureSetting", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "ExposureCompensationSet", &saExposureCompSetInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "DriveModeSetting", &saDriveMode3}, - {0, AC_WRITE, 0, 0, 5, AUTO, "ExposureProgram", &saExposureProgram2}, - {0, AC_WRITE, 0, 0, 6, AUTO, "FocusModeSetting", &saFocusModeSetting3}, - {0, AC_WRITE, 0, 0, 7, AUTO, "MeteringMode", &saMeteringMode1_3}, - {0, AC_WRITE, 0, 0, 9, AUTO, "SonyImageSize", &saSonyImageSize3}, - {0, AC_WRITE, 0, 0, 10, AUTO, "AspectRatio", &saAspectRatio2}, - {0, AC_WRITE, 0, 0, 11, AUTO, "Quality", &saQualityInterpreter3}, - {0, AC_WRITE, 0, 0, 12, AUTO, "DynamicRangeOptimizerSetting", &saDynamicRangeOptimizerSetting}, - {0, AC_WRITE, 0, 0, 14, AUTO, "ColorSpace", &saColorSpace1_2}, - {0, AC_WRITE, 0, 0, 15, AUTO, "CreativeStyleSetting", &saCreativeStyleSetting}, - {0, AC_WRITE, 0, 0, 16, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "WhiteBalance", &saWhiteBalanceSettingInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "ColorCompensationFilterSet", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 32, AUTO, "FlashMode", &saFlashMode2}, - {0, AC_WRITE, 0, 0, 33, AUTO, "FlashControl", &saFlashControl}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashExposureCompSet", &saExposureCompSetInterpreter}, - {0, AC_WRITE, 0, 0, 36, AUTO, "AFAreaMode", &saAFAreaMode2}, - {0, AC_WRITE, 0, 0, 37, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction5}, - {0, AC_WRITE, 0, 0, 39, AUTO, "SmileShutterMode", &saSmileShutterMode}, - {0, AC_WRITE, 0, 0, 40, AUTO, "RedEyeReduction", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 45, AUTO, "HDRSetting", &saOnOffInterpreter3}, - {0, AC_WRITE, 0, 0, 46, AUTO, "HDRLevel", &saHDRLevel}, - {0, AC_WRITE, 0, 0, 47, AUTO, "ViewingMode", &saViewingMode}, - {0, AC_WRITE, 0, 0, 48, AUTO, "FaceDetection", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 49, AUTO, "SmileShutter", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 50, AUTO, "SweepPanoramaSize", &saSweepPanoramaSize}, - {0, AC_WRITE, 0, 0, 51, AUTO, "SweepPanoramaDirection", &saSweepPanoramaDirection}, - {0, AC_WRITE, 0, 0, 52, AUTO, "DriveMode", &saDriveMode3}, - {0, AC_WRITE, 0, 0, 53, AUTO, "MultiFrameNoiseReduction", &saOnOffInterpreter4}, - {0, AC_WRITE, 0, 0, 54, AUTO, "LiveViewAFSetting", &saLiveViewAFSetting}, - {0, AC_WRITE, 0, 0, 56, AUTO, "PanoramaSize3D", &saPanoramaSize3D}, - {0, AC_WRITE, 0, 0, 131, AUTO, "AFButtonPressed", &saNoYesInterpreter}, - {0, AC_WRITE, 0, 0, 132, AUTO, "LiveViewMetering", &saLiveViewMetering}, - {0, AC_WRITE, 0, 0, 133, AUTO, "ViewingMode2", &saViewingMode}, - {0, AC_WRITE, 0, 0, 134, AUTO, "AELock", &saOnOffInterpreter5}, - {0, AC_WRITE, 0, 0, 135, AUTO, "FlashAction", &saFlashAction}, - {0, AC_WRITE, 0, 0, 139, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, - {0, AC_WRITE, 0, 0, 153, AUTO, "LensMount", &saLensMount}, - {0, AC_WRITE, 0, 0, 643, AUTO, "AFButtonPressed", &saNoYesInterpreter}, - {0, AC_WRITE, 0, 0, 644, AUTO, "LiveViewMetering", &saLiveViewMetering}, - {0, AC_WRITE, 0, 0, 645, AUTO, "ViewingMode2", &saViewingMode}, - {0, AC_WRITE, 0, 0, 646, AUTO, "AELock", &saOnOffInterpreter5}, - {0, AC_WRITE, 0, 0, 647, AUTO, "FlashAction", &saFlashAction}, - {0, AC_WRITE, 0, 0, 651, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, - {0, AC_WRITE, 0, 0, 1015, SHORT, "LensType2", &saLensID2Interpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ShutterSpeedSetting", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ApertureSetting", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "ExposureCompensationSet", &saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "DriveModeSetting", &saDriveMode3}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "ExposureProgram", &saExposureProgram2}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "FocusModeSetting", &saFocusModeSetting3}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "MeteringMode", &saMeteringMode1_3}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "SonyImageSize", &saSonyImageSize3}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "AspectRatio", &saAspectRatio2}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "Quality", &saQualityInterpreter3}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "DynamicRangeOptimizerSetting", &saDynamicRangeOptimizerSetting}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "ColorSpace", &saColorSpace1_2}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "CreativeStyleSetting", &saCreativeStyleSetting}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "WhiteBalance", &saWhiteBalanceSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "ColorCompensationFilterSet", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "FlashMode", &saFlashMode2}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "FlashControl", &saFlashControl}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashExposureCompSet", &saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, nullptr, 36, AUTO, "AFAreaMode", &saAFAreaMode2}, + {0, AC_WRITE, 0, nullptr, 37, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction5}, + {0, AC_WRITE, 0, nullptr, 39, AUTO, "SmileShutterMode", &saSmileShutterMode}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "RedEyeReduction", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 45, AUTO, "HDRSetting", &saOnOffInterpreter3}, + {0, AC_WRITE, 0, nullptr, 46, AUTO, "HDRLevel", &saHDRLevel}, + {0, AC_WRITE, 0, nullptr, 47, AUTO, "ViewingMode", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 48, AUTO, "FaceDetection", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 49, AUTO, "SmileShutter", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 50, AUTO, "SweepPanoramaSize", &saSweepPanoramaSize}, + {0, AC_WRITE, 0, nullptr, 51, AUTO, "SweepPanoramaDirection", &saSweepPanoramaDirection}, + {0, AC_WRITE, 0, nullptr, 52, AUTO, "DriveMode", &saDriveMode3}, + {0, AC_WRITE, 0, nullptr, 53, AUTO, "MultiFrameNoiseReduction", &saOnOffInterpreter4}, + {0, AC_WRITE, 0, nullptr, 54, AUTO, "LiveViewAFSetting", &saLiveViewAFSetting}, + {0, AC_WRITE, 0, nullptr, 56, AUTO, "PanoramaSize3D", &saPanoramaSize3D}, + {0, AC_WRITE, 0, nullptr, 131, AUTO, "AFButtonPressed", &saNoYesInterpreter}, + {0, AC_WRITE, 0, nullptr, 132, AUTO, "LiveViewMetering", &saLiveViewMetering}, + {0, AC_WRITE, 0, nullptr, 133, AUTO, "ViewingMode2", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 134, AUTO, "AELock", &saOnOffInterpreter5}, + {0, AC_WRITE, 0, nullptr, 135, AUTO, "FlashAction", &saFlashAction}, + {0, AC_WRITE, 0, nullptr, 139, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, + {0, AC_WRITE, 0, nullptr, 153, AUTO, "LensMount", &saLensMount}, + {0, AC_WRITE, 0, nullptr, 643, AUTO, "AFButtonPressed", &saNoYesInterpreter}, + {0, AC_WRITE, 0, nullptr, 644, AUTO, "LiveViewMetering", &saLiveViewMetering}, + {0, AC_WRITE, 0, nullptr, 645, AUTO, "ViewingMode2", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 646, AUTO, "AELock", &saOnOffInterpreter5}, + {0, AC_WRITE, 0, nullptr, 647, AUTO, "FlashAction", &saFlashAction}, + {0, AC_WRITE, 0, nullptr, 651, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, + {0, AC_WRITE, 0, nullptr, 1015, SHORT, "LensType2", &saLensID2Interpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; /*const TagAttrib sonyDNGMakerNote[]={ diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index 98594e64c..2bd7a60f7 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -528,282 +528,282 @@ public: UTF8BinInterpreter utf8BinInterpreter; const TagAttrib exifAttribs[] = { - {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, - {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, - {0, AC_WRITE, 0, 0, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 0x829D, AUTO, "FNumber", &fNumberInterpreter}, - {0, AC_WRITE, 0, 0, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter}, - {0, AC_WRITE, 0, 0, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8828, AUTO, "OECF", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8832, AUTO, "RecommendedExposureIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9000, AUTO, "ExifVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter}, - {0, AC_WRITE, 0, 0, 0x9202, AUTO, "ApertureValue", &apertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x9203, AUTO, "BrightnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter}, - {0, AC_WRITE, 0, 0, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x9206, AUTO, "SubjectDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x9208, AUTO, "LightSource", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0x9209, AUTO, "Flash", &flashInterpreter}, - {0, AC_WRITE, 0, 0, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 0x9214, AUTO, "SubjectArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9215, AUTO, "ExposureIndex", &stdInterpreter}, // Note: exists as 0xA215 too, it should be that way - {0, AC_DONTWRITE, 0, 0, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9217, AUTO, "SensingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x927C, AUTO, "MakerNote", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x9286, AUTO, "UserComment", &userCommentInterpreter}, - {0, AC_WRITE, 0, 0, 0x9290, AUTO, "SubSecTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA002, AUTO, "PixelXDimension", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA003, AUTO, "PixelYDimension", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x829D, AUTO, "FNumber", &fNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8828, AUTO, "OECF", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8832, AUTO, "RecommendedExposureIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9000, AUTO, "ExifVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9202, AUTO, "ApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9203, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9206, AUTO, "SubjectDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9208, AUTO, "LightSource", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9209, AUTO, "Flash", &flashInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9214, AUTO, "SubjectArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9215, AUTO, "ExposureIndex", &stdInterpreter}, // Note: exists as 0xA215 too, it should be that way + {0, AC_DONTWRITE, 0, nullptr, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x927C, AUTO, "MakerNote", &stdInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x9286, AUTO, "UserComment", &userCommentInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9290, AUTO, "SubSecTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA002, AUTO, "PixelXDimension", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA003, AUTO, "PixelYDimension", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter}, {0, AC_SYSTEM, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, // do not enable, as it causes trouble with FUJI files - {0, AC_WRITE, 0, 0, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA214, AUTO, "SubjectLocation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA215, AUTO, "ExposureIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA217, AUTO, "SensingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA300, AUTO, "FileSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA301, AUTO, "SceneType", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xA302, AUTO, "CFAPattern", &cfaInterpreter}, - {0, AC_WRITE, 0, 0, 0xA401, AUTO, "CustomRendered", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter}, - {0, AC_WRITE, 0, 0, 0xA407, AUTO, "GainControl", &gainControlInterpreter}, - {0, AC_WRITE, 0, 0, 0xA408, AUTO, "Contrast", &contrastInterpreter}, - {0, AC_WRITE, 0, 0, 0xA409, AUTO, "Saturation", &saturationInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA431, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA432, AUTO, "LensInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA433, AUTO, "LensMake", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA434, AUTO, "LensModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA500, AUTO, "Gamma", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC618, AUTO, "LinearizationTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC619, AUTO, "BlackLevelRepeatDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61A, AUTO, "BlackLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61B, AUTO, "BlackLevelDeltaH", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61C, AUTO, "BlackLevelDeltaV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61D, AUTO, "WhiteLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61E, AUTO, "DefaultScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61F, AUTO, "DefaultCropOrigin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC620, AUTO, "DefaultCropSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC621, AUTO, "ColorMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC622, AUTO, "ColorMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC623, AUTO, "CameraCalibration1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC624, AUTO, "CameraCalibration2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC625, AUTO, "ReductionMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC626, AUTO, "ReductionMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC627, AUTO, "AnalogBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC628, AUTO, "AsShotNeutral", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC629, AUTO, "AsShotWhiteXY", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62A, AUTO, "BaselineExposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62B, AUTO, "BaselineNoise", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62C, AUTO, "BaselineSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62D, AUTO, "BayerGreenSplit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62E, AUTO, "LinearResponseLimit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62F, AUTO, "CameraSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC630, AUTO, "DNGLensInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC631, AUTO, "ChromaBlurRadius", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC632, AUTO, "AntiAliasStrength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC633, AUTO, "ShadowScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65A, AUTO, "CalibrationIlluminant1", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65B, AUTO, "CalibrationIlluminant2", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65C, AUTO, "BestQualityScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65D, AUTO, "RawDataUniqueID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68B, AUTO, "OriginalRawFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68D, AUTO, "ActiveArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68E, AUTO, "MaskedAreas", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA214, AUTO, "SubjectLocation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA215, AUTO, "ExposureIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA300, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA301, AUTO, "SceneType", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xA302, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA401, AUTO, "CustomRendered", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA407, AUTO, "GainControl", &gainControlInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA408, AUTO, "Contrast", &contrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA409, AUTO, "Saturation", &saturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA431, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA432, AUTO, "LensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA433, AUTO, "LensMake", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA434, AUTO, "LensModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA500, AUTO, "Gamma", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC618, AUTO, "LinearizationTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC619, AUTO, "BlackLevelRepeatDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61A, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61B, AUTO, "BlackLevelDeltaH", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61C, AUTO, "BlackLevelDeltaV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61D, AUTO, "WhiteLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61E, AUTO, "DefaultScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61F, AUTO, "DefaultCropOrigin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC620, AUTO, "DefaultCropSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC621, AUTO, "ColorMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC622, AUTO, "ColorMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC623, AUTO, "CameraCalibration1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC624, AUTO, "CameraCalibration2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC625, AUTO, "ReductionMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC626, AUTO, "ReductionMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC627, AUTO, "AnalogBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC628, AUTO, "AsShotNeutral", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC629, AUTO, "AsShotWhiteXY", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62A, AUTO, "BaselineExposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62B, AUTO, "BaselineNoise", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62C, AUTO, "BaselineSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62D, AUTO, "BayerGreenSplit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62E, AUTO, "LinearResponseLimit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62F, AUTO, "CameraSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC630, AUTO, "DNGLensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC631, AUTO, "ChromaBlurRadius", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC632, AUTO, "AntiAliasStrength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC633, AUTO, "ShadowScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65A, AUTO, "CalibrationIlluminant1", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65B, AUTO, "CalibrationIlluminant2", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65C, AUTO, "BestQualityScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65D, AUTO, "RawDataUniqueID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68B, AUTO, "OriginalRawFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68D, AUTO, "ActiveArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68E, AUTO, "MaskedAreas", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC68F, AUTO, "AsShotICCProfile", & ???}, - {0, AC_WRITE, 0, 0, 0xC690, AUTO, "AsShotPreProfileMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC690, AUTO, "AsShotPreProfileMatrix", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC691, AUTO, "CurrentICCProfile", & ???}, - {0, AC_WRITE, 0, 0, 0xC692, AUTO, "CurrentPreProfileMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6BF, AUTO, "ColorimetricReference", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F3, AUTO, "CameraCalibrationSig", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F4, AUTO, "ProfileCalibrationSig", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F5, AUTO, "ProfileIFD", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F6, AUTO, "AsShotProfileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F7, AUTO, "NoiseReductionApplied", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F8, AUTO, "ProfileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F9, AUTO, "ProfileHueSatMapDims", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FA, AUTO, "ProfileHueSatMapData1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FB, AUTO, "ProfileHueSatMapData2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FC, AUTO, "ProfileToneCurve", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FD, AUTO, "ProfileEmbedPolicy", &profileEmbedPolicyInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FE, AUTO, "ProfileCopyright", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC714, AUTO, "ForwardMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC715, AUTO, "ForwardMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC716, AUTO, "PreviewApplicationName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC717, AUTO, "PreviewApplicationVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC718, AUTO, "PreviewSettingsName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC719, AUTO, "PreviewSettingsDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71A, AUTO, "PreviewColorSpace", &previewColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71B, AUTO, "PreviewDateTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71C, AUTO, "RawImageDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71D, AUTO, "OriginalRawFileDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC692, AUTO, "CurrentPreProfileMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6BF, AUTO, "ColorimetricReference", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F3, AUTO, "CameraCalibrationSig", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F4, AUTO, "ProfileCalibrationSig", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F5, AUTO, "ProfileIFD", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F6, AUTO, "AsShotProfileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F7, AUTO, "NoiseReductionApplied", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F8, AUTO, "ProfileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F9, AUTO, "ProfileHueSatMapDims", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FA, AUTO, "ProfileHueSatMapData1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FB, AUTO, "ProfileHueSatMapData2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FC, AUTO, "ProfileToneCurve", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FD, AUTO, "ProfileEmbedPolicy", &profileEmbedPolicyInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FE, AUTO, "ProfileCopyright", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC714, AUTO, "ForwardMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC715, AUTO, "ForwardMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC716, AUTO, "PreviewApplicationName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC717, AUTO, "PreviewApplicationVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC718, AUTO, "PreviewSettingsName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC719, AUTO, "PreviewSettingsDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71A, AUTO, "PreviewColorSpace", &previewColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71B, AUTO, "PreviewDateTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71C, AUTO, "RawImageDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71D, AUTO, "OriginalRawFileDigest", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC71E, AUTO, "SubTileBlockSize", & ???}, // {0, AC_WRITE, 0, 0, 0xC71F, AUTO, "RowInterleaveFactor", & ???}, - {0, AC_WRITE, 0, 0, 0xC725, AUTO, "ProfileLookTableDims", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC726, AUTO, "ProfileLookTableData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC725, AUTO, "ProfileLookTableDims", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC726, AUTO, "ProfileLookTableData", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC740, AUTO, "OpcodeList1", & ???}, // {0, AC_WRITE, 0, 0, 0xC741, AUTO, "OpcodeList2", & ???}, // {0, AC_WRITE, 0, 0, 0xC74E, AUTO, "OpcodeList3", & ???}, - {0, AC_WRITE, 0, 0, 0xC761, AUTO, "NoiseProfile", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC763, AUTO, "TimeCodes", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC764, AUTO, "FrameRate", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC772, AUTO, "TStop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC789, AUTO, "ReelName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC791, AUTO, "OriginalDefaultFinalSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC792, AUTO, "OriginalBestQualitySize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC793, AUTO, "OriginalDefaultCropSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A1, AUTO, "CameraLabel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A3, AUTO, "ProfileHueSatMapEncoding", &linearSRGBInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A4, AUTO, "ProfileLookTableEncoding", &linearSRGBInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A5, AUTO, "BaselineExposureOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A6, AUTO, "DefaultBlackRender", &defaultBlackRenderInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A7, AUTO, "NewRawImageDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A8, AUTO, "RawToPreviewGain", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7B5, AUTO, "DefaultUserCrop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFDE9, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFDEA, AUTO, "Lens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4C, AUTO, "RawFile", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4D, AUTO, "Converter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4E, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE51, AUTO, "Exposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE52, AUTO, "Shadows", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE53, AUTO, "Brightness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE54, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE55, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE56, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE57, AUTO, "Smoothness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE58, AUTO, "MoireFilter", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0xC761, AUTO, "NoiseProfile", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC763, AUTO, "TimeCodes", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC764, AUTO, "FrameRate", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC772, AUTO, "TStop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC789, AUTO, "ReelName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC791, AUTO, "OriginalDefaultFinalSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC792, AUTO, "OriginalBestQualitySize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC793, AUTO, "OriginalDefaultCropSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A1, AUTO, "CameraLabel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A3, AUTO, "ProfileHueSatMapEncoding", &linearSRGBInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A4, AUTO, "ProfileLookTableEncoding", &linearSRGBInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A5, AUTO, "BaselineExposureOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A6, AUTO, "DefaultBlackRender", &defaultBlackRenderInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A7, AUTO, "NewRawImageDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A8, AUTO, "RawToPreviewGain", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7B5, AUTO, "DefaultUserCrop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFDE9, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFDEA, AUTO, "Lens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4C, AUTO, "RawFile", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4D, AUTO, "Converter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4E, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE51, AUTO, "Exposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE52, AUTO, "Shadows", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE53, AUTO, "Brightness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE54, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE55, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE56, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE57, AUTO, "Smoothness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE58, AUTO, "MoireFilter", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib gpsAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "GPSVersionID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "GPSLatitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "GPSLongitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "GPSAltitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "GPSSatelites", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "GPSStatus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "GPSDOP", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "GPSSpeed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "GPSTrack", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "GPSDifferential", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "GPSVersionID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "GPSLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "GPSLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "GPSAltitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "GPSSatelites", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "GPSStatus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "GPSDOP", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "GPSSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "GPSTrack", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "GPSDifferential", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib iopAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib ifdAttribs[] = { - {0, AC_SYSTEM, 0, 0, 0x0017, AUTO, "PanaISO", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter}, - {0, AC_WRITE, 1, 0, 0x010E, AUTO, "ImageDescription", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010F, AUTO, "Make", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "Model", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0112, AUTO, "Orientation", &orientationInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011A, AUTO, "XResolution", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011B, AUTO, "YResolution", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x012D, AUTO, "TransferFunction", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0131, AUTO, "Software", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0132, AUTO, "DateTime", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x013B, AUTO, "Artist", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x013E, AUTO, "WhitePoint", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0017, AUTO, "PanaISO", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x010E, AUTO, "ImageDescription", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010F, AUTO, "Make", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "Model", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0112, AUTO, "Orientation", &orientationInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011A, AUTO, "XResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011B, AUTO, "YResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x012D, AUTO, "TransferFunction", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0131, AUTO, "Software", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0132, AUTO, "DateTime", &stdInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x013B, AUTO, "Artist", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x013E, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter}, {0, AC_WRITE, 0, ifdAttribs, 0x014A, AUTO, "SubIFD", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP - {0, AC_WRITE, 0, 0, 0x4746, AUTO, "Rating", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4749, AUTO, "RatingPercent", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP + {0, AC_WRITE, 0, nullptr, 0x4746, AUTO, "Rating", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4749, AUTO, "RatingPercent", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, {0, AC_WRITE, 0, kodakIfdAttribs, 0x8290, AUTO, "KodakIFD", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x8298, AUTO, "Copyright", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format + {0, AC_WRITE, 1, nullptr, 0x8298, AUTO, "Copyright", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format {0, AC_WRITE, 0, exifAttribs, 0x8769, AUTO, "Exif", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x8773, AUTO, "ICCProfile", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x83BB, AUTO, "IPTCData", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x8773, AUTO, "ICCProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x83BB, AUTO, "IPTCData", &stdInterpreter}, {0, AC_WRITE, 0, gpsAttribs, 0x8825, AUTO, "GPSInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9211, AUTO, "ImageNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9211, AUTO, "ImageNumber", &stdInterpreter}, {0, AC_WRITE, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC612, AUTO, "DNGVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC615, AUTO, "LocalizedCameraModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData - {0, AC_WRITE, 0, 0, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xc761, AUTO, "NoiseProfile", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_DONTWRITE, 0, nullptr, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC612, AUTO, "DNGVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC615, AUTO, "LocalizedCameraModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData + {0, AC_WRITE, 0, nullptr, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xc761, AUTO, "NoiseProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index b481f4ebe..aba977d0d 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -35,11 +35,11 @@ static double one2one(double val) Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1, Gtk::Image *imgIcon2, double2double_fun slider2value_, double2double_fun value2slider_) { - label = NULL; - adjusterListener = NULL; + label = nullptr; + adjusterListener = nullptr; afterReset = false; blocked = false; - automatic = NULL; + automatic = nullptr; eventPending = false; slider2value = slider2value_ ? slider2value_ : one2one; @@ -58,7 +58,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep hbox->set_border_width(0); hbox->set_spacing(2); - editedCheckBox = NULL; + editedCheckBox = nullptr; if (!vlabel.empty()) { adjustmentName = vlabel; @@ -106,7 +106,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep if (!imgIcon1 || !imgIcon2) { pack_start (*slider, true, true); } else { - Gtk::HBox *hbox2 = NULL; + Gtk::HBox *hbox2 = nullptr; // A second HBox is necessary hbox2 = Gtk::manage (new Gtk::HBox()); @@ -146,7 +146,7 @@ Adjuster::~Adjuster () sliderChange.block (true); spinChange.block (true); delayConnection.block (true); - adjusterListener = NULL; + adjusterListener = nullptr; if (automatic) { delete automatic; @@ -172,7 +172,7 @@ void Adjuster::delAutoButton () if (automatic) { removeIfThere(hbox, automatic); delete automatic; - automatic = NULL; + automatic = nullptr; } } @@ -228,7 +228,7 @@ void Adjuster::autoToggled () } } - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { adjusterListener->adjusterAutoToggled(this, automatic->get_active()); } } @@ -236,7 +236,7 @@ void Adjuster::autoToggled () void Adjuster::sliderReleased (GdkEventButton* event) { - if ((event != NULL) && (event->button == 1)) { + if ((event != nullptr) && (event->button == 1)) { if (delayConnection.connected()) { delayConnection.disconnect (); } @@ -248,7 +248,7 @@ void Adjuster::sliderReleased (GdkEventButton* event) void Adjuster::spinReleased (GdkEventButton* event) { - if ((event != NULL) && delay == 0) { + if ((event != nullptr) && delay == 0) { if (delayConnection.connected()) { delayConnection.disconnect (); } @@ -290,7 +290,7 @@ void Adjuster::resetValue (bool toInitial) void Adjuster::resetPressed (GdkEventButton* event) { - if ((event != NULL) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) { + if ((event != nullptr) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) { resetValue(true); } else { resetValue(false); @@ -464,7 +464,7 @@ void Adjuster::setAutoValue (bool a) bool Adjuster::notifyListener () { - if (eventPending && adjusterListener != NULL && !blocked) { + if (eventPending && adjusterListener != nullptr && !blocked) { adjusterListener->adjusterChanged (this, spin->get_value ()); } @@ -476,7 +476,7 @@ bool Adjuster::notifyListener () bool Adjuster::notifyListenerAutoToggled () { - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { adjusterListener->adjusterAutoToggled(this, automatic->get_active()); } diff --git a/rtgui/adjuster.h b/rtgui/adjuster.h index 4b9ad36a4..782139f05 100644 --- a/rtgui/adjuster.h +++ b/rtgui/adjuster.h @@ -79,7 +79,7 @@ public: int delay; - Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1 = NULL, Gtk::Image *imgIcon2 = NULL, double2double_fun slider2value = NULL, double2double_fun value2slider = NULL); + Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1 = nullptr, Gtk::Image *imgIcon2 = nullptr, double2double_fun slider2value = nullptr, double2double_fun value2slider = nullptr); virtual ~Adjuster (); // Add an "Automatic" checkbox next to the reset button. @@ -89,7 +89,7 @@ public: // Send back the value of og the Auto checkbox bool getAutoValue () { - return automatic != NULL ? automatic->get_active () : false; + return automatic != nullptr ? automatic->get_active () : false; } void setAutoValue (bool a); bool notifyListenerAutoToggled (); diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 333ad8d4f..b4a2ad37f 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -38,7 +38,7 @@ using namespace std; using namespace rtengine; -BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(NULL), fileCatalog(aFileCatalog), sequence(0), listener(NULL) +BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCatalog(aFileCatalog), sequence(0), listener(nullptr) { location = THLOC_BATCHQUEUE; @@ -368,7 +368,7 @@ bool BatchQueue::loadBatchQueue () Glib::ustring BatchQueue::getTempFilenameForParams( const Glib::ustring &filename ) { timeval tv; - gettimeofday(&tv, 0); + gettimeofday(&tv, nullptr); char mseconds[4]; sprintf(mseconds, "%d", (int)(tv.tv_usec / 1000)); time_t rawtime; @@ -501,7 +501,7 @@ void BatchQueue::selectAll () { MYWRITERLOCK(l, entryRW); - lastClicked = NULL; + lastClicked = nullptr; selected.clear (); for (size_t i = 0; i < fd.size(); i++) { @@ -642,7 +642,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img) MYWRITERLOCK(l, entryRW); delete processing; - processing = NULL; + processing = nullptr; fd.erase (fd.begin()); @@ -709,7 +709,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img) redraw (); notifyListener (queueEmptied); - return processing ? processing->job : NULL; + return processing ? processing->job : nullptr; } // Calculates automatic filename of processed batch entry, but just the base name @@ -962,7 +962,7 @@ void BatchQueue::error (Glib::ustring msg) processing->addButtonSet (bqbs); processing->processing = false; processing->job = rtengine::ProcessingJob::create(processing->filename, processing->thumbnail->getType() == FT_Raw, processing->params); - processing = NULL; + processing = nullptr; redraw (); } diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc index b8bc45601..f8f9e4627 100644 --- a/rtgui/batchqueueentry.cc +++ b/rtgui/batchqueueentry.cc @@ -31,7 +31,7 @@ Glib::RefPtr BatchQueueEntry::savedAsIcon; BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm) : ThumbBrowserEntryBase(fname), - opreview(NULL), origpw(prevw), origph(prevh), opreviewDone(false), + opreview(nullptr), origpw(prevw), origph(prevh), opreviewDone(false), job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false), params(pparams) { @@ -64,7 +64,7 @@ BatchQueueEntry::~BatchQueueEntry () delete [] opreview; } - opreview = NULL; + opreview = nullptr; if (thumbnail) { thumbnail->decreaseRef (); @@ -84,7 +84,7 @@ void BatchQueueEntry::refreshThumbnailImage () // creating the image buffer first //if (!opreview) opreview = new guint8[(origpw+1) * origph * 3]; // this will asynchronously compute the original preview and land at this.updateImage - batchQueueEntryUpdater.process (NULL, origpw, origph, preh, this, ¶ms, thumbnail); + batchQueueEntryUpdater.process (nullptr, origpw, origph, preh, this, ¶ms, thumbnail); } else { // this will asynchronously land at this.updateImage batchQueueEntryUpdater.process (opreview, origpw, origph, preh, this); @@ -133,7 +133,7 @@ void BatchQueueEntry::removeButtonSet () { delete buttonSet; - buttonSet = NULL; + buttonSet = nullptr; } std::vector > BatchQueueEntry::getIconsOnImageArea () @@ -247,7 +247,7 @@ void BatchQueueEntry::_updateImage (guint8* img, int w, int h) MYWRITERLOCK(l, lockRW); prew = w; - assert (preview == NULL); + assert (preview == nullptr); preview = new guint8 [prew * preh * 3]; memcpy (preview, img, prew * preh * 3); diff --git a/rtgui/batchqueueentry.h b/rtgui/batchqueueentry.h index 4ee3eb1a3..c2651a3ca 100644 --- a/rtgui/batchqueueentry.h +++ b/rtgui/batchqueueentry.h @@ -54,7 +54,7 @@ public: SaveFormat saveFormat; bool forceFormatOpts; - BatchQueueEntry (rtengine::ProcessingJob* job, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm = NULL); + BatchQueueEntry (rtengine::ProcessingJob* job, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm = nullptr); ~BatchQueueEntry (); void refreshThumbnailImage (); diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index e1def62ec..15f0b88ad 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -103,7 +103,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) Gtk::Image* folderImg = Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)); folderImg->show (); outdirFolderButton->set_image (*folderImg); - outdirFolder = 0; + outdirFolder = nullptr; #else outdirFolder = Gtk::manage (new MyFileChooserButton (M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); hb3->pack_start (*outdirFolder); @@ -180,7 +180,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) show_all (); if (batchQueue->loadBatchQueue ()) { - g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, NULL); + g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, nullptr); } } diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 004a2c812..2caa61187 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -47,8 +47,8 @@ BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolP } toolPanelNotebook->remove_page (*metadataPanel); - metadataPanel = 0; - toiM = 0; + metadataPanel = nullptr; + toiM = nullptr; for (size_t i = 0; i < toolPanels.size(); i++) { toolPanels[i]->setBatchMode (true); @@ -99,7 +99,7 @@ void BatchToolPanelCoordinator::closeSession (bool save) toolPanels[j]->trimValues (&newParams); } - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, true); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, true); } } @@ -848,7 +848,7 @@ void BatchToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const G toolPanels[j]->trimValues (&newParams); } - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, false); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, false); } for (size_t i = 0; i < paramcListeners.size(); i++) { @@ -950,7 +950,7 @@ void BatchToolPanelCoordinator::profileChange (const rtengine::procparams::Part for (size_t i = 0; i < selected.size(); i++) { newParams = initialPP[i]; pparamsEdited.combine (newParams, pparams, selected.size() == 1); - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, false); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, false); } for (size_t i = 0; i < paramcListeners.size(); i++) { diff --git a/rtgui/batchtoolpanelcoord.h b/rtgui/batchtoolpanelcoord.h index 0c12aa311..c96a1a329 100644 --- a/rtgui/batchtoolpanelcoord.h +++ b/rtgui/batchtoolpanelcoord.h @@ -57,7 +57,7 @@ public: void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); // profilechangelistener interface - void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL); + void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); // wbprovider interface void getAutoWB (double& temp, double& green, double equal); @@ -71,10 +71,10 @@ public: void endBatchPParamsChange(); // imageareatoollistener interface - void spotWBselected (int x, int y, Thumbnail* thm = NULL); + void spotWBselected (int x, int y, Thumbnail* thm = nullptr); void cropSelectionReady (); - void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL); - CropGUIListener* startCropEditing (Thumbnail* thm = NULL); + void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr); + CropGUIListener* startCropEditing (Thumbnail* thm = nullptr); void optionsChanged (); }; diff --git a/rtgui/bayerpreprocess.h b/rtgui/bayerpreprocess.h index 3b7dce4dc..15b2ef7e5 100644 --- a/rtgui/bayerpreprocess.h +++ b/rtgui/bayerpreprocess.h @@ -36,10 +36,10 @@ public: BayerPreProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void hotDeadPixelChanged(); diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h index 35b1cf084..b78002ea3 100644 --- a/rtgui/bayerprocess.h +++ b/rtgui/bayerprocess.h @@ -48,10 +48,10 @@ public: BayerProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void methodChanged (); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/bayerrawexposure.h b/rtgui/bayerrawexposure.h index 94987ba1f..733aafc25 100644 --- a/rtgui/bayerrawexposure.h +++ b/rtgui/bayerrawexposure.h @@ -42,10 +42,10 @@ public: BayerRAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void GreenChanged() ; void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexblackadd); diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc index 69891b237..832c4c8ef 100644 --- a/rtgui/blackwhite.cc +++ b/rtgui/blackwhite.cc @@ -1196,7 +1196,7 @@ void BlackWhite::setBatchMode (bool batchMode) removeIfThere (mixerVBox, RGBLabels, false); delete RGBLabels; - RGBLabels = NULL; + RGBLabels = nullptr; ToolPanel::setBatchMode (batchMode); mixerRed->showEditedCB (); diff --git a/rtgui/blackwhite.h b/rtgui/blackwhite.h index d5e7c0a4f..e38258b04 100644 --- a/rtgui/blackwhite.h +++ b/rtgui/blackwhite.h @@ -101,9 +101,9 @@ public: BlackWhite (); ~BlackWhite (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/bqentryupdater.cc b/rtgui/bqentryupdater.cc index 596811c58..37ce4c0ef 100644 --- a/rtgui/bqentryupdater.cc +++ b/rtgui/bqentryupdater.cc @@ -23,7 +23,7 @@ BatchQueueEntryUpdater batchQueueEntryUpdater; BatchQueueEntryUpdater::BatchQueueEntryUpdater () - : tostop(false), stopped(true), thread(NULL), qMutex(NULL) + : tostop(false), stopped(true), thread(nullptr), qMutex(nullptr) { } @@ -106,7 +106,7 @@ void BatchQueueEntryUpdater::processThread () break; } - rtengine::IImage8* img = NULL; + rtengine::IImage8* img = nullptr; bool newBuffer = false; if (current.thumbnail && current.pparams) { @@ -143,12 +143,12 @@ void BatchQueueEntryUpdater::processThread () int neww = current.newh * current.ow / current.oh; guint8* img = new guint8 [current.newh * neww * 3]; thumbInterp (current.oimg, current.ow, current.oh, img, neww, current.newh); - current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : NULL); + current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : nullptr); } if(current.oimg) { delete[] current.oimg; - current.oimg = NULL; + current.oimg = nullptr; } } diff --git a/rtgui/bqentryupdater.h b/rtgui/bqentryupdater.h index 4052649cf..75040b109 100644 --- a/rtgui/bqentryupdater.h +++ b/rtgui/bqentryupdater.h @@ -53,7 +53,7 @@ protected: public: BatchQueueEntryUpdater (); - void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams = NULL, Thumbnail* thumbnail = NULL); + void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams = nullptr, Thumbnail* thumbnail = nullptr); void removeJobs (BQEntryUpdateListener* listener); void terminate (); diff --git a/rtgui/cacorrection.h b/rtgui/cacorrection.h index 736242232..fd34bc942 100644 --- a/rtgui/cacorrection.h +++ b/rtgui/cacorrection.h @@ -34,9 +34,9 @@ public: CACorrection (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/chmixer.h b/rtgui/chmixer.h index 0bf65736a..bd85517de 100644 --- a/rtgui/chmixer.h +++ b/rtgui/chmixer.h @@ -36,9 +36,9 @@ public: ChMixer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/clipboard.cc b/rtgui/clipboard.cc index e7a5b7b2c..a1b94a615 100644 --- a/rtgui/clipboard.cc +++ b/rtgui/clipboard.cc @@ -41,7 +41,7 @@ void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& } else { if (partProfile.pparams) { delete partProfile.pparams; - partProfile.pparams = NULL; + partProfile.pparams = nullptr; } } @@ -54,7 +54,7 @@ void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& } else { if (partProfile.pedited) { delete partProfile.pedited; - partProfile.pedited = NULL; + partProfile.pedited = nullptr; } } } @@ -74,6 +74,6 @@ void Clipboard::setProcParams (const rtengine::procparams::ProcParams& pparams) // delete pedited if (partProfile.pedited) { delete partProfile.pedited; - partProfile.pedited = NULL; + partProfile.pedited = nullptr; } } diff --git a/rtgui/coarsepanel.h b/rtgui/coarsepanel.h index abe31d518..7ac1bccc5 100644 --- a/rtgui/coarsepanel.h +++ b/rtgui/coarsepanel.h @@ -37,8 +37,8 @@ public: CoarsePanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void initBatchBehavior (); void rotateLeft (); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 04fe2a3bb..1560e275e 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -95,9 +95,9 @@ public: ColorAppearance (); ~ColorAppearance (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); void adjusterAutoToggled (Adjuster* a, bool newval); diff --git a/rtgui/coloredbar.cc b/rtgui/coloredbar.cc index 64e60b136..c6a8ec730 100644 --- a/rtgui/coloredbar.cc +++ b/rtgui/coloredbar.cc @@ -201,5 +201,5 @@ void ColoredBar::clearBgGradient () bool ColoredBar::canGetColors() { - return colorProvider != NULL || bgGradient.size() > 0; + return colorProvider != nullptr || bgGradient.size() > 0; } diff --git a/rtgui/colorprovider.h b/rtgui/colorprovider.h index ce0c25247..ab6fb2865 100644 --- a/rtgui/colorprovider.h +++ b/rtgui/colorprovider.h @@ -45,7 +45,7 @@ public: double ccGreen; double ccBlue; - ColorCaller() : colorCallerId(-1), colorProvider(NULL), ccRed(0.), ccGreen(0.), ccBlue(0.) {} + ColorCaller() : colorCallerId(-1), colorProvider(nullptr), ccRed(0.), ccGreen(0.), ccBlue(0.) {} void setColorProvider (ColorProvider* p, int id) { colorProvider = p; diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index 99ad03e9f..e2122f79e 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -40,7 +40,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR")); colorCurveEditorG->setCurveListener (this); - colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); colorShape->setCurveColorProvider(this, 1); std::vector milestones; @@ -89,7 +89,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR opacityCurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultOpacityCurve(defaultCurve); - opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShape->setBottomBarBgGradient(milestones); @@ -156,14 +156,14 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //----------- Sliders + balance ------------------------------ - hlColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_HIGHLIGHT"), 0., 100., 60., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 80., M("TP_COLORTONING_HUE"), 1., NULL, false)); + hlColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_HIGHLIGHT"), 0., 100., 60., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 80., M("TP_COLORTONING_HUE"), 1., nullptr, false)); hlColSat->setAdjusterListener (this); hlColSat->setBgColorProvider(this, 2); hlColSat->setUpdatePolicy(RTUP_DYNAMIC); pack_start( *hlColSat, Gtk::PACK_SHRINK, 0); - shadowsColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_SHADOWS"), 0., 100., 80., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 208., M("TP_COLORTONING_HUE"), 1., NULL, false)); + shadowsColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_SHADOWS"), 0., 100., 80., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 208., M("TP_COLORTONING_HUE"), 1., nullptr, false)); shadowsColSat->setAdjusterListener (this); shadowsColSat->setBgColorProvider(this, 3); shadowsColSat->setUpdatePolicy(RTUP_DYNAMIC); diff --git a/rtgui/colortoning.h b/rtgui/colortoning.h index e55ff36e8..e34447301 100644 --- a/rtgui/colortoning.h +++ b/rtgui/colortoning.h @@ -78,10 +78,10 @@ protected: public: ColorToning (); ~ColorToning(); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void trimValues (rtengine::procparams::ProcParams* pp); void adjusterChanged (Adjuster* a, double newval); void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop); diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index 469013800..a9c0d2f2d 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -125,7 +125,7 @@ void CoordinateAdjuster::createWidgets(const std::vector &axis) set_spacing(3); for (unsigned int i = 0; i < count; ++i) { - AxisAdjuster *currAdjuster = NULL; + AxisAdjuster *currAdjuster = nullptr; const Axis *currAxis = &(axis.at(i)); axisAdjusters.at(i) = new AxisAdjuster(this, currAxis, i); currAdjuster = axisAdjusters.at(i); diff --git a/rtgui/coordinateadjuster.h b/rtgui/coordinateadjuster.h index 8f00f8ae7..bcb5b6bf1 100644 --- a/rtgui/coordinateadjuster.h +++ b/rtgui/coordinateadjuster.h @@ -47,7 +47,7 @@ class CoordinateProvider protected: CoordinateAdjuster *coordinateAdjuster; public: - CoordinateProvider() : coordinateAdjuster(NULL) {} + CoordinateProvider() : coordinateAdjuster(nullptr) {} virtual ~CoordinateProvider() {} void setListener(CoordinateAdjuster *adjuster) { diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 609ab9e64..9e8522463 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -38,7 +38,7 @@ public: Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true) { - clistener = NULL; + clistener = nullptr; maxw = 3000; maxh = 2000; diff --git a/rtgui/crop.h b/rtgui/crop.h index 2b29e46aa..61eff4bd7 100644 --- a/rtgui/crop.h +++ b/rtgui/crop.h @@ -73,8 +73,8 @@ public: Crop (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void ratioChanged (); diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index d3c73bfdb..961b83c7c 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -32,10 +32,10 @@ using namespace rtengine; CropHandler::CropHandler () : zoom(10), ww(0), wh(0), imx(-1), imy(-1), imw(0), imh(0), cax(-1), cay(-1), cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false), - cropimg(NULL), cropimgtrue(NULL), cropimg_width(0), cropimg_height(0), + cropimg(nullptr), cropimgtrue(nullptr), cropimg_width(0), cropimg_height(0), cix(0), ciy(0), ciw(0), cih(0), cis(1), - initial(false), isLowUpdatePriority(false), ipc(NULL), crop(NULL), - displayHandler(NULL) + initial(false), isLowUpdatePriority(false), ipc(nullptr), crop(nullptr), + displayHandler(nullptr) { chi = new CropHandlerIdleHelper; @@ -56,7 +56,7 @@ CropHandler::~CropHandler () if (crop) { //crop->destroy (); delete crop; // will do the same than destroy, plus delete the object - crop = NULL; + crop = nullptr; } cimg.lock (); @@ -86,8 +86,8 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow) return; } - EditDataProvider *editDataProvider = NULL; - CropWindow *cropWin = displayHandler ? static_cast(displayHandler) : NULL; + EditDataProvider *editDataProvider = nullptr; + CropWindow *cropWin = displayHandler ? static_cast(displayHandler) : nullptr; if (cropWin) { editDataProvider = cropWin->getImageArea(); @@ -95,7 +95,7 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow) crop = ipc->createCrop (editDataProvider, isDetailWindow); ipc->setSizeListener (this); - crop->setListener (enabled ? this : NULL); + crop->setListener (enabled ? this : nullptr); initial = true; } @@ -306,9 +306,9 @@ int createpixbufs (void* data) if (!ch->enabled) { delete [] ch->cropimg; - ch->cropimg = NULL; + ch->cropimg = nullptr; delete [] ch->cropimgtrue; - ch->cropimgtrue = NULL; + ch->cropimgtrue = nullptr; ch->cimg.unlock (); return 0; } @@ -340,9 +340,9 @@ int createpixbufs (void* data) } delete [] ch->cropimg; - ch->cropimg = NULL; + ch->cropimg = nullptr; delete [] ch->cropimgtrue; - ch->cropimgtrue = NULL; + ch->cropimgtrue = nullptr; } ch->cimg.unlock (); @@ -380,13 +380,13 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp delete [] cropimg; } - cropimg = NULL; + cropimg = nullptr; if (cropimgtrue) { delete [] cropimgtrue; } - cropimgtrue = NULL; + cropimgtrue = nullptr; if (ax == cropX && ay == cropY && aw == cropW && ah == cropH && askip == (zoom >= 1000 ? 1 : zoom)) { cropimg_width = im->getWidth (); @@ -455,14 +455,14 @@ void CropHandler::setEnabled (bool e) if (!enabled) { if (crop) { - crop->setListener (NULL); + crop->setListener (nullptr); } cimg.lock (); delete [] cropimg; - cropimg = NULL; + cropimg = nullptr; delete [] cropimgtrue; - cropimgtrue = NULL; + cropimgtrue = nullptr; cropPixbuf.clear (); cimg.unlock (); } else { diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index a4d7ded47..2bf446842 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -71,8 +71,8 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3), upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0), - imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(NULL), - pmlistener(NULL), pmhlistener(NULL), observedCropWin(NULL) + imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr), + pmlistener(nullptr), pmhlistener(nullptr), observedCropWin(nullptr) { Glib::RefPtr context = parent->get_pango_context () ; Pango::FontDescription fontd = context->get_font_description (); @@ -86,11 +86,11 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet titleHeight = ih; - bZoomOut = new LWButton (RTImage::createFromPng ("gtk-zoom-out-small.png"), 0, NULL, LWButton::Left, LWButton::Center, "Zoom Out"); - bZoomIn = new LWButton (RTImage::createFromPng ("gtk-zoom-in-small.png"), 1, NULL, LWButton::Left, LWButton::Center, "Zoom In"); - bZoom100 = new LWButton (RTImage::createFromPng ("gtk-zoom-100-small.png"), 2, NULL, LWButton::Left, LWButton::Center, "Zoom 100/%"); + bZoomOut = new LWButton (RTImage::createFromPng ("gtk-zoom-out-small.png"), 0, nullptr, LWButton::Left, LWButton::Center, "Zoom Out"); + bZoomIn = new LWButton (RTImage::createFromPng ("gtk-zoom-in-small.png"), 1, nullptr, LWButton::Left, LWButton::Center, "Zoom In"); + bZoom100 = new LWButton (RTImage::createFromPng ("gtk-zoom-100-small.png"), 2, nullptr, LWButton::Left, LWButton::Center, "Zoom 100/%"); //bZoomFit = new LWButton (RTImage::createFromPng ("gtk-zoom-fit.png"), 3, NULL, LWButton::Left, LWButton::Center, "Zoom Fit"); - bClose = new LWButton (RTImage::createFromPng ("gtk-close-small.png"), 4, NULL, LWButton::Right, LWButton::Center, "Close"); + bClose = new LWButton (RTImage::createFromPng ("gtk-close-small.png"), 4, nullptr, LWButton::Right, LWButton::Center, "Close"); buttonSet.add (bZoomOut); buttonSet.add (bZoomIn); @@ -730,7 +730,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } if (deleted) { - iarea->flawnOverWindow = NULL; + iarea->flawnOverWindow = nullptr; delete this; return; } @@ -752,7 +752,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } state = SNormal; - iarea->grabFocus (NULL); + iarea->grabFocus (nullptr); if (needRedraw) { iarea->redraw (); diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc index c9d02d9a3..5428677c3 100644 --- a/rtgui/curveeditor.cc +++ b/rtgui/curveeditor.cc @@ -196,10 +196,10 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd bgHistValid = false; remoteDrag = false; selected = DCT_Linear; - bottomBarCP = NULL; - leftBarCP = NULL; - curveCP = NULL; - relatedWidget = NULL; + bottomBarCP = nullptr; + leftBarCP = nullptr; + curveCP = nullptr; + relatedWidget = nullptr; group = ceGroup; subGroup = ceSubGroup; diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index 2638ac29e..71f94db4b 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -26,8 +26,8 @@ #include "multilangmgr.h" #include "rtimage.h" -CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(NULL), - displayedCurve(0), flatSubGroup(0), diagonalSubGroup(0), cl(NULL), numberOfPackedCurve(0) +CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(nullptr), + displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0) { // We set the label to the one provided as parameter, even if it's an empty string @@ -101,11 +101,11 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe } default: - return (static_cast(NULL)); + return (static_cast(nullptr)); break; } - return NULL; // to avoid complains from Gcc + return nullptr; // to avoid complains from Gcc } /* @@ -134,13 +134,13 @@ void CurveEditorGroup::newLine() bool hasRelatedWidget = false; for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { - if (curveEditors[i]->relatedWidget != NULL) { + if (curveEditors[i]->relatedWidget != nullptr) { hasRelatedWidget = true; } } for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { - if (curveEditors[i]->relatedWidget != NULL) { + if (curveEditors[i]->relatedWidget != nullptr) { headerBox->pack_end (*curveEditors[i]->relatedWidget, Gtk::PACK_EXPAND_WIDGET, 2); } @@ -257,7 +257,7 @@ void CurveEditorGroup::curveTypeToggled(CurveEditor* ce) } } else { // The button is now released, so we have to hide this CurveEditor - displayedCurve = 0; + displayedCurve = nullptr; } ce->subGroup->switchGUI(); @@ -382,8 +382,8 @@ void CurveEditorGroup::setUnChanged (bool uc, CurveEditor* ce) CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr), curveBBoxPos(0) { - leftBar = NULL; - bottomBar = NULL; + leftBar = nullptr; + bottomBar = nullptr; } CurveEditorSubGroup::~CurveEditorSubGroup() diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index f4ca3e8ed..caf08b4a4 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -85,7 +85,7 @@ public: return displayedCurve; } //void on_realize (); - CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = NULL, bool periodic = true); + CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool periodic = true); protected: //void curveTypeToggled (); diff --git a/rtgui/darkframe.h b/rtgui/darkframe.h index fd0dc9fde..0660c953d 100644 --- a/rtgui/darkframe.h +++ b/rtgui/darkframe.h @@ -55,8 +55,8 @@ public: DarkFrame (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void darkFrameChanged (); void darkFrameReset (); diff --git a/rtgui/defringe.h b/rtgui/defringe.h index 1d076ed4b..ef0bfd2aa 100644 --- a/rtgui/defringe.h +++ b/rtgui/defringe.h @@ -42,9 +42,9 @@ public: Defringe (); ~Defringe (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void curveChanged (); diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index a806a710d..e3e83e153 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -35,7 +35,7 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, Glib::ustring& curveDir) : CurveEditorSubGroup(curveDir) { - editedAdjuster = NULL; + editedAdjuster = nullptr; editedAdjusterValue = 0; curveBBoxPos = options.curvebboxpos; @@ -370,7 +370,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () bool prevState; prevState = editCustomConn.block(true); editCustom->set_active(false); - customCurve->pipetteMouseOver(NULL, NULL, 0); + customCurve->pipetteMouseOver(nullptr, nullptr, 0); customCurve->setDirty(true); if (!prevState) { @@ -379,7 +379,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () prevState = editNURBSConn.block(true); editNURBS->set_active(false); - NURBSCurve->pipetteMouseOver(NULL, NULL, 0); + NURBSCurve->pipetteMouseOver(nullptr, nullptr, 0); NURBSCurve->setDirty(true); if (!prevState) { @@ -388,7 +388,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () prevState = editParamConn.block(true); editParam->set_active(false); - paramCurve->pipetteMouseOver(NULL, NULL, 0); + paramCurve->pipetteMouseOver(nullptr, nullptr, 0); paramCurve->setDirty(true); if (!prevState) { @@ -410,7 +410,7 @@ void DiagonalCurveEditorSubGroup::pipetteMouseOver(EditDataProvider *provider, i paramCurve->pipetteMouseOver(curveEditor, provider, modifierKey); paramCurve->setDirty(true); float pipetteVal = 0.f; - editedAdjuster = NULL; + editedAdjuster = nullptr; int n = 0; if (provider->pipetteVal[0] != -1.f) { @@ -508,7 +508,7 @@ void DiagonalCurveEditorSubGroup::pipetteButton1Released(EditDataProvider *provi break; case (DCT_Parametric): - editedAdjuster = NULL; + editedAdjuster = nullptr; break; case (DCT_NURBS): @@ -576,7 +576,7 @@ void DiagonalCurveEditorSubGroup::stopNumericalAdjustment() */ void DiagonalCurveEditorSubGroup::refresh(CurveEditor *curveToRefresh) { - if (curveToRefresh != NULL && curveToRefresh == static_cast(parent->displayedCurve)) { + if (curveToRefresh != nullptr && curveToRefresh == static_cast(parent->displayedCurve)) { switch((DiagonalCurveType)(curveToRefresh->curveType->getSelected())) { case (DCT_Spline): customCurve->refresh(); @@ -618,11 +618,11 @@ void DiagonalCurveEditorSubGroup::switchGUI() ColorProvider *barColorProvider = dCurve->getLeftBarColorProvider(); std::vector bgGradient = dCurve->getLeftBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no left colored bar, so we delete the object if (leftBar) { delete leftBar; - leftBar = NULL; + leftBar = nullptr; } } else { // dCurve ave a ColorProvider or a background gradient defined, so we create/update the object @@ -635,7 +635,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() leftBar->setColorProvider(barColorProvider, dCurve->getLeftBarCallerId()); leftBar->setBgGradient (bgGradient); } else { - leftBar->setColorProvider(NULL, -1); + leftBar->setColorProvider(nullptr, -1); leftBar->setBgGradient (bgGradient); } } @@ -643,11 +643,11 @@ void DiagonalCurveEditorSubGroup::switchGUI() barColorProvider = dCurve->getBottomBarColorProvider(); bgGradient = dCurve->getBottomBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no bottom colored bar, so we delete the object if (bottomBar) { delete bottomBar; - bottomBar = NULL; + bottomBar = nullptr; } } else { // dCurve has a ColorProvider or a background gradient defined, so we create/update the object @@ -660,7 +660,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() bottomBar->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); bottomBar->setBgGradient (bgGradient); } else { - bottomBar->setColorProvider(NULL, -1); + bottomBar->setColorProvider(nullptr, -1); bottomBar->setBgGradient (bgGradient); } } @@ -700,7 +700,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() shcSelector->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); shcSelector->setBgGradient(bgGradient); shcSelector->setMargins( (leftBar ? MyCurve::getBarWidth() + CBAR_MARGIN : RADIUS), RADIUS ); - paramCurve->setColoredBar(leftBar, NULL); + paramCurve->setColoredBar(leftBar, nullptr); paramCurve->forceResize(); updateEditButton(dCurve, editParam, editParamConn); parent->pack_start (*paramCurveBox); @@ -1127,10 +1127,10 @@ bool DiagonalCurveEditorSubGroup::curveReset(CurveEditor *ce) double mileStone[3]; dCurve->getRangeDefaultMilestones(mileStone[0], mileStone[1], mileStone[2]); - highlights->resetPressed(NULL); - lights->resetPressed(NULL); - darks->resetPressed(NULL); - shadows->resetPressed(NULL); + highlights->resetPressed(nullptr); + lights->resetPressed(nullptr); + darks->resetPressed(nullptr); + shadows->resetPressed(nullptr); shcSelector->setDefaults(mileStone[0], mileStone[1], mileStone[2]); shcSelector->reset(); paramCurve->reset (dce->paramResetCurve, dce->getIdentityValue()); diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 9eaf38587..8d220e452 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -436,7 +436,7 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath) } count++; - dir = strtok(NULL, "/\\"); + dir = strtok(nullptr, "/\\"); } free(dcpy); diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 5bff14ef2..ee747269a 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -67,7 +67,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP //curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir); NoiscurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultNoisCurve(defaultCurve); - lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", NULL, false)); + lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", nullptr, false)); lshape->setIdentityValue(0.); lshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -157,7 +157,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP CCcurveEditorG = new CurveEditorGroup (options.lastDenoiseCurvesDir, M("TP_DIRPYRDENOISE_CCCURVE")); CCcurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultCCCurve(defaultCurve); - ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", NULL, false)); + ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", nullptr, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); diff --git a/rtgui/dirpyrdenoise.h b/rtgui/dirpyrdenoise.h index 0a5a00e3f..e81bf263e 100644 --- a/rtgui/dirpyrdenoise.h +++ b/rtgui/dirpyrdenoise.h @@ -97,9 +97,9 @@ public: DirPyrDenoise (); ~DirPyrDenoise (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void curveChanged (CurveEditor* ce); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/dirpyrequalizer.h b/rtgui/dirpyrequalizer.h index d30e4d307..9a3517166 100644 --- a/rtgui/dirpyrequalizer.h +++ b/rtgui/dirpyrequalizer.h @@ -57,9 +57,9 @@ public: DirPyrEqualizer (); virtual ~DirPyrEqualizer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool skinadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/distortion.cc b/rtgui/distortion.cc index d63868e85..91ad00ae9 100644 --- a/rtgui/distortion.cc +++ b/rtgui/distortion.cc @@ -26,7 +26,7 @@ using namespace rtengine::procparams; Distortion::Distortion (): FoldableToolPanel(this, "distortion", M("TP_DISTORTION_LABEL")) { - rlistener = NULL; + rlistener = nullptr; autoDistor = Gtk::manage (new Gtk::Button (M("TP_DISTORTION_AUTO"))); autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto.png"))); autoDistor->set_tooltip_text (M("TP_DISTORTION_AUTO_TIP")); diff --git a/rtgui/distortion.h b/rtgui/distortion.h index 304f9dcd7..c2856323d 100644 --- a/rtgui/distortion.h +++ b/rtgui/distortion.h @@ -37,9 +37,9 @@ public: Distortion (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/edit.cc b/rtgui/edit.cc index 95831db7a..58d856bb5 100644 --- a/rtgui/edit.cc +++ b/rtgui/edit.cc @@ -20,7 +20,7 @@ #include "edit.h" #include "rtimage.h" -ObjectMOBuffer::ObjectMOBuffer(EditDataProvider *dataProvider) : objectMap(NULL), objectMode(OM_255), dataProvider(dataProvider) {} +ObjectMOBuffer::ObjectMOBuffer(EditDataProvider *dataProvider) : objectMap(nullptr), objectMode(OM_255), dataProvider(dataProvider) {} ObjectMOBuffer::~ObjectMOBuffer() { @@ -69,7 +69,7 @@ EditSubscriber *ObjectMOBuffer::getEditSubscriber () { if (dataProvider) { return dataProvider->getCurrSubscriber(); } else { - return NULL; + return nullptr; } } @@ -1035,7 +1035,7 @@ void OPIcon::drawToMOChannel(Cairo::RefPtr &cr, unsigned short i } } -EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(NULL), action(ES_ACTION_NONE) {} +EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(nullptr), action(ES_ACTION_NONE) {} void EditSubscriber::setEditProvider(EditDataProvider *provider) { @@ -1107,7 +1107,7 @@ bool EditSubscriber::isPicking() //-------------------------------------------------------------------------------------------------- -EditDataProvider::EditDataProvider() : currSubscriber(NULL), object(0), posScreen(-1, -1), posImage(-1, -1), +EditDataProvider::EditDataProvider() : currSubscriber(nullptr), object(0), posScreen(-1, -1), posImage(-1, -1), deltaScreen(0, 0), deltaImage(0, 0), deltaPrevScreen(0, 0), deltaPrevImage(0, 0) { pipetteVal[0] = pipetteVal[1] = pipetteVal[2] = 0.f; @@ -1124,7 +1124,7 @@ void EditDataProvider::subscribe(EditSubscriber *subscriber) void EditDataProvider::unsubscribe() { - currSubscriber = NULL; + currSubscriber = nullptr; } void EditDataProvider::switchOffEditMode() diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 7c77e3f0a..f1d4d5661 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -210,7 +210,7 @@ public: }; EditorPanel::EditorPanel (FilePanel* filePanel) - : realized(false), iHistoryShow(NULL), iHistoryHide(NULL), iTopPanel_1_Show(NULL), iTopPanel_1_Hide(NULL), iRightPanel_1_Show(NULL), iRightPanel_1_Hide(NULL), iBeforeLockON(NULL), iBeforeLockOFF(NULL), beforePreviewHandler(NULL), beforeIarea(NULL), beforeBox(NULL), afterBox(NULL), afterHeaderBox(NULL), parent(NULL), openThm(NULL), ipc(NULL), beforeIpc(NULL), isProcessing(false), catalogPane(NULL) + : realized(false), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), openThm(nullptr), ipc(nullptr), beforeIpc(nullptr), isProcessing(false), catalogPane(nullptr) { epih = new EditorPanelIdleHelper; @@ -231,7 +231,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) leftbox->set_border_width (2); leftbox->set_size_request(100, 250); - histogramPanel = NULL; + histogramPanel = nullptr; profilep = Gtk::manage (new ProfilePanel ()); ppframe = new Gtk::Frame (); @@ -286,7 +286,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) hidehp->set_image (*iHistoryShow); } - tbTopPanel_1 = NULL; + tbTopPanel_1 = nullptr; if (!simpleEditor && filePanel) { tbTopPanel_1 = new Gtk::ToggleButton (); @@ -411,7 +411,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iops->pack_end (*iareapanel->imageArea->zoomPanel, Gtk::PACK_SHRINK, 1); iops->pack_end (*vsepz3, Gtk::PACK_SHRINK, 2); - navPrev = navNext = navSync = NULL; + navPrev = navNext = navSync = nullptr; if (!simpleEditor && !options.tabbedUI) { // Navigation buttons @@ -545,31 +545,31 @@ EditorPanel::EditorPanel (FilePanel* filePanel) EditorPanel::~EditorPanel () { - history->setHistoryBeforeLineListener (NULL); + history->setHistoryBeforeLineListener (nullptr); // the order is important! - iareapanel->setBeforeAfterViews (NULL, iareapanel); + iareapanel->setBeforeAfterViews (nullptr, iareapanel); delete iareapanel; - iareapanel = NULL; + iareapanel = nullptr; if (beforeIpc) { beforeIpc->stopProcessing (); } delete beforeIarea; - beforeIarea = NULL; + beforeIarea = nullptr; if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete beforePreviewHandler; - beforePreviewHandler = NULL; + beforePreviewHandler = nullptr; if (beforeIpc) { rtengine::StagedImageProcessor::destroy (beforeIpc); } - beforeIpc = NULL; + beforeIpc = nullptr; close (); @@ -766,28 +766,28 @@ void EditorPanel::close () tpc->closeImage (); // this call stops image processing tpc->writeOptions (); rtengine::ImageSource* is = isrc->getImageSource(); - is->setProgressListener( NULL ); + is->setProgressListener( nullptr ); if (ipc) { - ipc->setPreviewImageListener (NULL); + ipc->setPreviewImageListener (nullptr); } if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete previewHandler; - previewHandler = NULL; + previewHandler = nullptr; if(iareapanel) { - iareapanel->imageArea->setPreviewHandler (NULL); - iareapanel->imageArea->setImProcCoordinator (NULL); + iareapanel->imageArea->setPreviewHandler (nullptr); + iareapanel->imageArea->setImProcCoordinator (nullptr); iareapanel->imageArea->unsubscribe(); } rtengine::StagedImageProcessor::destroy (ipc); - ipc = NULL; - navigator->previewWindow->setPreviewHandler (NULL); + ipc = nullptr; + navigator->previewWindow->setPreviewHandler (nullptr); // If the file was deleted somewhere, the openThm.descreaseRef delete the object, but we don't know here if (Glib::file_test(fname, Glib::FILE_TEST_EXISTS)) { @@ -809,7 +809,7 @@ void EditorPanel::saveProfile () ipc->getParams (¶ms); // Will call updateCache, which will update both the cached and sidecar files if necessary - openThm->setProcParams (params, NULL, EDITOR); + openThm->setProcParams (params, nullptr, EDITOR); } } @@ -933,7 +933,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (inProcessingP) { if (processingStartedTime == 0) { - processingStartedTime = ::time(NULL); + processingStartedTime = ::time(nullptr); } s->str = "PROGRESSBAR_PROCESSING"; @@ -943,12 +943,12 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (ipc && openThm && tpc->getChangedState()) { rtengine::procparams::ProcParams pparams; ipc->getParams (&pparams); - openThm->setProcParams (pparams, NULL, EDITOR, false); + openThm->setProcParams (pparams, nullptr, EDITOR, false); } // Ring a sound if it was a long event if (processingStartedTime != 0) { - time_t curTime = ::time(NULL); + time_t curTime = ::time(nullptr); if (::difftime(curTime, processingStartedTime) > options.sndLngEditProcDoneSecs) { SoundManager::playSoundAsync(options.sndLngEditProcDone); @@ -985,7 +985,7 @@ struct errparams { void EditorPanel::displayError (Glib::ustring title, Glib::ustring descr) { - GtkWidget* msgd = gtk_message_dialog_new_with_markup (NULL, + GtkWidget* msgd = gtk_message_dialog_new_with_markup (nullptr, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, @@ -1786,29 +1786,29 @@ void EditorPanel::beforeAfterToggled () beforeIpc->stopProcessing (); } - iareapanel->setBeforeAfterViews (NULL, iareapanel); - iareapanel->imageArea->iLinkedImageArea = NULL; + iareapanel->setBeforeAfterViews (nullptr, iareapanel); + iareapanel->imageArea->iLinkedImageArea = nullptr; delete beforeIarea; - beforeIarea = NULL; + beforeIarea = nullptr; if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete beforePreviewHandler; - beforePreviewHandler = NULL; + beforePreviewHandler = nullptr; if (beforeIpc) { rtengine::StagedImageProcessor::destroy (beforeIpc); } - beforeIpc = NULL; + beforeIpc = nullptr; } if (beforeAfter->get_active ()) { int errorCode = 0; - rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, NULL); + rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, nullptr); if( !beforeImg || errorCode ) { return; @@ -1971,7 +1971,7 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) } delete histogramPanel; - histogramPanel = NULL; + histogramPanel = nullptr; } // else no need to create it diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 09faca7d3..765739836 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -138,7 +138,7 @@ protected: public: - explicit EditorPanel (FilePanel* filePanel = NULL); + explicit EditorPanel (FilePanel* filePanel = nullptr); virtual ~EditorPanel (); void open (Thumbnail* tmb, rtengine::InitialImage* isrc); @@ -167,7 +167,7 @@ public: void refreshProcessingState (bool inProcessing); // this is called by setProcessingState in the gtk thread // PParamsChangeListener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); // thumbnaillistener interface void procParamsChanged (Thumbnail* thm, int whoChangedIt); diff --git a/rtgui/epd.h b/rtgui/epd.h index 6156d947c..c9fc5d0af 100644 --- a/rtgui/epd.h +++ b/rtgui/epd.h @@ -36,9 +36,9 @@ public: EdgePreservingDecompositionUI(); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index c7e47ef57..66594b0e1 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -25,7 +25,7 @@ using namespace rtengine; using namespace rtengine::procparams; using namespace rtexif; -ExifPanel::ExifPanel () : idata(NULL) +ExifPanel::ExifPanel () : idata(nullptr) { recursiveOp = true; @@ -156,7 +156,7 @@ void ExifPanel::setImageData (const ImageMetaData* id) idata = id; exifTreeModel->clear (); - const std::vector defTags = ExifManager::getDefaultTIFFTags (NULL); + const std::vector defTags = ExifManager::getDefaultTIFFTags (nullptr); for (size_t i = 0; i < defTags.size(); i++) { Tag* defTag = defTags[i]; diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index 2269fed25..fd797ff56 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -89,9 +89,9 @@ public: ExifPanel (); virtual ~ExifPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setImageData (const rtengine::ImageMetaData* id); diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 2e25ab6cf..394230855 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -25,7 +25,7 @@ using namespace rtengine; using namespace rtengine::procparams; -ExportPanel::ExportPanel () : listener (NULL) +ExportPanel::ExportPanel () : listener (nullptr) { set_border_width (4); diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc index cf2b6ba9c..d0cf44151 100644 --- a/rtgui/extprog.cc +++ b/rtgui/extprog.cc @@ -226,7 +226,7 @@ bool ExtProgStore::spawnCommandSync (const Glib::ustring& cmd) try { - Glib::spawn_command_line_sync (cmd, NULL, NULL, &exitStatus); + Glib::spawn_command_line_sync (cmd, nullptr, nullptr, &exitStatus); } catch (const Glib::Exception& exception) { diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index e3066e4dc..9f8b36043 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -50,7 +50,7 @@ const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) const Glib::ustring::size_type pos = basename.find_last_of ('.'); if (pos >= basename.length () - 1) { - return NULL; + return nullptr; } const Glib::ustring extension = basename.substr (pos + 1); @@ -62,12 +62,12 @@ const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) } } - return NULL; + return nullptr; } ThumbBrowserEntryBase* selectOriginalEntry (ThumbBrowserEntryBase* original, ThumbBrowserEntryBase* candidate) { - if (original == NULL) { + if (original == nullptr) { return candidate; } @@ -97,7 +97,7 @@ void findOriginalEntries (const std::vector& entries) const Glib::ustring::size_type pos = basename.find_last_of ('.'); if (pos >= basename.length () - 1) { - (*entry)->setOriginal (NULL); + (*entry)->setOriginal (nullptr); continue; } @@ -109,7 +109,7 @@ void findOriginalEntries (const std::vector& entries) // Find the original image for each bucket for (BasenameIterator bucket = byBasename.begin (); bucket != byBasename.end (); ++bucket) { const EntryVector& entries = bucket->second; - ThumbBrowserEntryBase* original = NULL; + ThumbBrowserEntryBase* original = nullptr; // Select the most likely original in a first pass... for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { @@ -118,7 +118,7 @@ void findOriginalEntries (const std::vector& entries) // ...and link all other images to it in a second pass. for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { - (*entry)->setOriginal (*entry != original ? original : NULL); + (*entry)->setOriginal (*entry != original ? original : nullptr); } } } @@ -126,7 +126,7 @@ void findOriginalEntries (const std::vector& entries) } FileBrowser::FileBrowser () - : tbl(NULL), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) + : tbl(nullptr), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) { fbih = new FileBrowserIdleHelper; @@ -225,12 +225,12 @@ FileBrowser::FileBrowser () #if defined(WIN32) Gtk::manage(miOpenDefaultViewer = new Gtk::MenuItem (M("FILEBROWSER_OPENDEFAULTVIEWER"))); #else - miOpenDefaultViewer = NULL; + miOpenDefaultViewer = nullptr; #endif // Build a list of menu items mMenuExtProgs.clear(); - amiExtProg = NULL; + amiExtProg = nullptr; for (const auto& action : extProgStore->getActions ()) { if (action.target == 1 || action.target == 2) { @@ -239,7 +239,7 @@ FileBrowser::FileBrowser () } // Attach them to menu - if (!mMenuExtProgs.empty() || miOpenDefaultViewer != NULL) { + if (!mMenuExtProgs.empty() || miOpenDefaultViewer != nullptr) { amiExtProg = new Gtk::MenuItem*[mMenuExtProgs.size()]; int itemNo = 0; @@ -248,7 +248,7 @@ FileBrowser::FileBrowser () p++; Gtk::Menu* submenuExtProg = Gtk::manage (new Gtk::Menu()); - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { submenuExtProg->attach (*miOpenDefaultViewer, 0, 1, p, p + 1); p++; } @@ -261,7 +261,7 @@ FileBrowser::FileBrowser () submenuExtProg->show_all (); menuExtProg->set_submenu (*submenuExtProg); } else { - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { pmenu->attach (*miOpenDefaultViewer, 0, 1, p, p + 1); p++; } @@ -417,7 +417,7 @@ FileBrowser::FileBrowser () amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i])); } - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { miOpenDefaultViewer->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), miOpenDefaultViewer)); } @@ -657,7 +657,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) } if (lastClicked == entry) { - lastClicked = NULL; + lastClicked = nullptr; } redraw (); @@ -665,7 +665,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) return (static_cast(entry)); } - return NULL; + return nullptr; } void FileBrowser::close () @@ -700,7 +700,7 @@ void FileBrowser::close () fd.clear (); } - lastClicked = NULL; + lastClicked = nullptr; } void FileBrowser::menuColorlabelActivated (Gtk::MenuItem* m) @@ -790,7 +790,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) else if (m == rename) { tbl->renameRequested (mselected); } else if (m == selall) { - lastClicked = NULL; + lastClicked = nullptr; { MYWRITERLOCK(l, entryRW); @@ -821,7 +821,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.df_autoselect = true; pp.raw.dark_frame.clear(); - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (!mselected.empty() && bppcl) { @@ -849,7 +849,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.dark_frame = fc.get_filename(); pp.raw.df_autoselect = false; - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (bppcl) { @@ -898,7 +898,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.ff_AutoSelect = true; pp.raw.ff_file.clear(); - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (!mselected.empty() && bppcl) { @@ -925,7 +925,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.ff_file = fc.get_filename(); pp.raw.ff_AutoSelect = false; - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (bppcl) { @@ -987,7 +987,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) // Empty run to update the thumb rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams (); - mselected[i]->thumbnail->setProcParams (params, NULL, FILEBROWSER); + mselected[i]->thumbnail->setProcParams (params, nullptr, FILEBROWSER); } if (!mselected.empty() && bppcl) { @@ -1005,7 +1005,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) } //queue_draw (); - } else if (miOpenDefaultViewer != NULL && m == miOpenDefaultViewer) { + } else if (miOpenDefaultViewer != nullptr && m == miOpenDefaultViewer) { openDefaultViewer(1); } } @@ -1088,7 +1088,7 @@ void FileBrowser::partPasteProfile () // copying read only clipboard PartialProfile to a temporary one, initialized to the thumb's ProcParams mselected[i]->thumbnail->createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file rtengine::procparams::PartialProfile cbPartProf = clipboard.getPartialProfile(); - rtengine::procparams::PartialProfile pastedPartProf(&mselected[i]->thumbnail->getProcParams (), NULL); + rtengine::procparams::PartialProfile pastedPartProf(&mselected[i]->thumbnail->getProcParams (), nullptr); // pushing the selected values of the clipboard PartialProfile to the temporary PartialProfile partialPasteDlg.applyPaste (pastedPartProf.pparams, pastedPartProf.pedited, cbPartProf.pparams, cbPartProf.pedited); @@ -1438,7 +1438,7 @@ void FileBrowser::applyFilter (const BrowserFilter& filter) selected.erase (j); if (lastClicked == fd[i]) { - lastClicked = NULL; + lastClicked = nullptr; } selchanged = true; @@ -1459,7 +1459,7 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry FileBrowserEntry* entry = static_cast(entryb); - if (filter.showOriginal && entry->getOriginal() != NULL) { + if (filter.showOriginal && entry->getOriginal() != nullptr) { return false; } diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index f2977b742..57deca4fd 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -36,7 +36,7 @@ Glib::RefPtr FileBrowserEntry::recentlySavedIcon; Glib::RefPtr FileBrowserEntry::enqueuedIcon; FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) - : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(NULL), cropgl(NULL), state(SNormal) + : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), cropgl(nullptr), state(SNormal) { thumbnail = thm; @@ -71,7 +71,7 @@ FileBrowserEntry::~FileBrowserEntry () feih->destroyed = true; } else { delete feih; - feih = 0; + feih = nullptr; } thumbImageUpdater->removeJobs (this); @@ -213,7 +213,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi { GThreadLock lock; - if ( feih == 0 || + if ( feih == nullptr || feih->destroyed ) { img->free(); return; @@ -231,7 +231,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi #if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__) g_idle_add_full (G_PRIORITY_DEFAULT, updateImageUI, param, NULL); #else - g_idle_add_full (G_PRIORITY_LOW, updateImageUI, param, NULL); + g_idle_add_full (G_PRIORITY_LOW, updateImageUI, param, nullptr); #endif } @@ -252,10 +252,10 @@ void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine: GThreadLock lock; // Check if image has been rotated since last time - rotated = preview != NULL && newLandscape != landscape; + rotated = preview != nullptr && newLandscape != landscape; guint8* temp = preview; - preview = NULL; + preview = nullptr; delete [] temp; temp = new guint8 [prew * preh * 3]; memcpy (temp, img->getData(), prew * preh * 3); @@ -267,7 +267,7 @@ void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine: img->free (); - if (parent != NULL) { + if (parent != nullptr) { if (rotated) { parent->thumbRearrangementNeeded(); } else if (redrawRequests == 0) { @@ -532,7 +532,7 @@ bool FileBrowserEntry::releaseNotify (int button, int type, int bstate, int x, i } } else if (cropgl && (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove)) { cropgl->cropManipReady (); - cropgl = NULL; + cropgl = nullptr; iatlistener->cropSelectionReady (); if (iatlistener->getToolBar()) { diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 440ca9039..3d2e4f552 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -44,10 +44,10 @@ using namespace std; FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : filepanel(filepanel), selectedDirectoryId(1), - listener(NULL), - fslistener(NULL), + listener(nullptr), + fslistener(nullptr), hasValidCurrentEFS(false), - filterPanel(NULL), + filterPanel(nullptr), previewsToLoad(0), previewsLoaded(0), coarsePanel(cp), @@ -667,8 +667,8 @@ void FileCatalog::_refreshProgressBar () GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent()); - Gtk::Box* hbb = NULL; - Gtk::Label *label = NULL; + Gtk::Box* hbb = nullptr; + Gtk::Label *label = nullptr; if( options.mainNBVertical ) { hbb = Gtk::manage (new Gtk::VBox ()); @@ -880,7 +880,7 @@ void FileCatalog::refreshHeight () void FileCatalog::_openImage (std::vector tmb) { - if (enabled && listener != NULL) { + if (enabled && listener != nullptr) { bool continueToLoad = true; for (size_t i = 0; i < tmb.size() && continueToLoad; i++) { diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc index 429c8f430..a88a9d224 100644 --- a/rtgui/filepanel.cc +++ b/rtgui/filepanel.cc @@ -28,7 +28,7 @@ int FilePanelInitUI (void* data) return 0; } -FilePanel::FilePanel () : parent(NULL) +FilePanel::FilePanel () : parent(nullptr) { dirpaned = Gtk::manage ( new Gtk::HPaned () ); @@ -227,7 +227,7 @@ bool FilePanel::fileSelected (Thumbnail* thm) pendingLoadMutex.lock(); pendingLoad *pl = new pendingLoad(); pl->complete = false; - pl->pc = 0; + pl->pc = nullptr; pl->thm = thm; pendingLoads.push_back(pl); pendingLoadMutex.unlock(); diff --git a/rtgui/filmsimulation.h b/rtgui/filmsimulation.h index 440bf0c9e..9979f45b3 100644 --- a/rtgui/filmsimulation.h +++ b/rtgui/filmsimulation.h @@ -39,8 +39,8 @@ public: void adjusterChanged( Adjuster* a, double newval ); void setBatchMode( bool batchMode ); - void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL ); - void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL ); + void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr ); + void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr ); void setAdjusterBehavior( bool strength ); void trimValues( rtengine::procparams::ProcParams* pp ); diff --git a/rtgui/filterpanel.cc b/rtgui/filterpanel.cc index 5a118d6e1..483d292ea 100644 --- a/rtgui/filterpanel.cc +++ b/rtgui/filterpanel.cc @@ -23,7 +23,7 @@ using namespace rtengine; -FilterPanel::FilterPanel () : listener (NULL) +FilterPanel::FilterPanel () : listener (nullptr) { set_border_width (4); diff --git a/rtgui/flatcurveeditorsubgroup.cc b/rtgui/flatcurveeditorsubgroup.cc index fd975de5e..1177e7cfe 100644 --- a/rtgui/flatcurveeditorsubgroup.cc +++ b/rtgui/flatcurveeditorsubgroup.cc @@ -171,7 +171,7 @@ void FlatCurveEditorSubGroup::stopNumericalAdjustment() */ void FlatCurveEditorSubGroup::refresh(CurveEditor *curveToRefresh) { - if (curveToRefresh != NULL && curveToRefresh == static_cast(parent->displayedCurve)) { + if (curveToRefresh != nullptr && curveToRefresh == static_cast(parent->displayedCurve)) { switch(FlatCurveType(curveToRefresh->curveType->getSelected())) { case (FCT_MinMaxCPoints): CPointsCurve->refresh(); @@ -192,7 +192,7 @@ void FlatCurveEditorSubGroup::editModeSwitchedOff () // toggling off all edit buttons, even if only one is toggle on bool prevState = editCPointsConn.block(true); editCPoints->set_active(false); - CPointsCurve->pipetteMouseOver(NULL, NULL, 0); + CPointsCurve->pipetteMouseOver(nullptr, nullptr, 0); CPointsCurve->setDirty(true); if (!prevState) { @@ -288,11 +288,11 @@ void FlatCurveEditorSubGroup::switchGUI() ColorProvider *barColorProvider = dCurve->getLeftBarColorProvider(); std::vector bgGradient = dCurve->getLeftBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no left colored bar, so we delete the object if (leftBar) { delete leftBar; - leftBar = NULL; + leftBar = nullptr; } } else { // dCurve has a ColorProvider or a background gradient defined, so we create/update the object @@ -305,7 +305,7 @@ void FlatCurveEditorSubGroup::switchGUI() leftBar->setColorProvider(barColorProvider, dCurve->getLeftBarCallerId()); leftBar->setBgGradient (bgGradient); } else { - leftBar->setColorProvider(NULL, -1); + leftBar->setColorProvider(nullptr, -1); leftBar->setBgGradient (bgGradient); } } @@ -313,11 +313,11 @@ void FlatCurveEditorSubGroup::switchGUI() barColorProvider = dCurve->getBottomBarColorProvider(); bgGradient = dCurve->getBottomBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no bottom colored bar, so we delete the object if (bottomBar) { delete bottomBar; - bottomBar = NULL; + bottomBar = nullptr; } } else { // dCurve ave a ColorProvider or a background gradient defined, so we create/update the object @@ -330,7 +330,7 @@ void FlatCurveEditorSubGroup::switchGUI() bottomBar->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); bottomBar->setBgGradient (bgGradient); } else { - bottomBar->setColorProvider(NULL, -1); + bottomBar->setColorProvider(nullptr, -1); bottomBar->setBgGradient (bgGradient); } } diff --git a/rtgui/flatfield.h b/rtgui/flatfield.h index b85b154da..4c0a33a54 100644 --- a/rtgui/flatfield.h +++ b/rtgui/flatfield.h @@ -62,12 +62,12 @@ public: FlatField (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool clipctrladd); void trimValues (rtengine::procparams::ProcParams* pp); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void adjusterAutoToggled (Adjuster* a, bool newval); diff --git a/rtgui/gradient.h b/rtgui/gradient.h index d1acb764b..2201ea7c4 100644 --- a/rtgui/gradient.h +++ b/rtgui/gradient.h @@ -37,9 +37,9 @@ public: Gradient (); ~Gradient (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index e52c83e65..241bd2963 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -473,9 +473,9 @@ void MyExpander::init() } MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : - enabled(false), inconsistent(false), flushEvent(false), expBox(NULL), - child(NULL), headerWidget(NULL), statusImage(NULL), - label(NULL), useEnabled(useEnabled) + enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr), + child(nullptr), headerWidget(nullptr), statusImage(nullptr), + label(nullptr), useEnabled(useEnabled) { set_spacing(options.slimUI ? 0 : 2); set_name("MyExpander"); @@ -520,9 +520,9 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : } MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : - enabled(false), inconsistent(false), flushEvent(false), expBox(NULL), - child(NULL), headerWidget(NULL), statusImage(NULL), - label(NULL), useEnabled(useEnabled) + enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr), + child(nullptr), headerWidget(nullptr), statusImage(nullptr), + label(nullptr), useEnabled(useEnabled) { set_spacing(options.slimUI ? 0 : 2); set_name("MyExpander"); @@ -1024,8 +1024,8 @@ void bindCurrentFolder (Gtk::FileChooser& chooser, Glib::ustring& variable) TextOrIcon::TextOrIcon (Glib::ustring fname, Glib::ustring labelTx, Glib::ustring tooltipTx, TOITypes type) { - imgIcon = 0; - label = 0; + imgIcon = nullptr; + label = nullptr; filename = fname; labelText = labelTx; tooltipText = tooltipTx; @@ -1051,7 +1051,7 @@ void TextOrIcon::switchTo(TOITypes type) if (!imgIcon) { removeIfThere(this, label, false); delete label; - label = 0; + label = nullptr; imgIcon = new RTImage (filename); pack_start(*imgIcon, Gtk::PACK_SHRINK, 0); set_tooltip_markup ("" + labelText + "\n" + tooltipText); @@ -1065,7 +1065,7 @@ void TextOrIcon::switchTo(TOITypes type) if (!label) { removeIfThere(this, imgIcon, false); delete imgIcon; - imgIcon = 0; + imgIcon = nullptr; label = new Gtk::Label (labelText, Gtk::ALIGN_CENTER); pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); set_tooltip_markup (tooltipText); diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index 1b9c298ca..a33b34b30 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -409,10 +409,10 @@ public: void getSrcOffset(int &x, int &y); void getSrcOffset(rtengine::Coord &offset); - void copySurface(Glib::RefPtr &window, GdkRectangle *rectangle = NULL); - void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = NULL); - void copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle = NULL); - void copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle = NULL); + void copySurface(Glib::RefPtr &window, GdkRectangle *rectangle = nullptr); + void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle = nullptr); void setDirty(bool isDirty) { diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 60cb1a444..79fe4a249 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -144,7 +144,7 @@ protected: public: - explicit HistogramArea(FullModeListener *fml = NULL); + explicit HistogramArea(FullModeListener *fml = nullptr); ~HistogramArea(); void renderHistogram (); diff --git a/rtgui/history.cc b/rtgui/history.cc index fa1ba372b..9c38a705b 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -25,7 +25,7 @@ using namespace rtengine::procparams; Glib::ustring eventDescrArray[NUMOFEVENTS]; -History::History (bool bookmarkSupport) : blistener(NULL), tpc (NULL), bmnum (1) +History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmnum (1) { blistenerLock = false; // sets default that the Before preview will not be locked diff --git a/rtgui/history.h b/rtgui/history.h index 23a7c30ae..e3d18354e 100644 --- a/rtgui/history.h +++ b/rtgui/history.h @@ -107,7 +107,7 @@ public: } // pparamschangelistener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); void clearParamChanges (); void historySelectionChanged (); diff --git a/rtgui/hsvequalizer.h b/rtgui/hsvequalizer.h index 939cd1904..d02cc378c 100644 --- a/rtgui/hsvequalizer.h +++ b/rtgui/hsvequalizer.h @@ -44,8 +44,8 @@ public: HSVEqualizer (); virtual ~HSVEqualizer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void curveChanged (CurveEditor* ce); //void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); void setBatchMode (bool batchMode); diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index cc2cbc039..884bc3e40 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -29,7 +29,7 @@ using namespace rtengine::procparams; extern Options options; -ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(NULL), icmplistener(NULL), lastRefFilename(""), camName("") +ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(nullptr), icmplistener(nullptr), lastRefFilename(""), camName("") { isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastBlendCMSMatrix = lastgamfree = false; @@ -358,7 +358,7 @@ void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) dcpIll->set_sensitive (false); dcpFrame->set_sensitive(false); - DCPProfile* dcp = NULL; + DCPProfile* dcp = nullptr; if(dcp_name == "(cameraICC)") { dcp = DCPStore::getInstance()->getStdProfile(camName); @@ -626,7 +626,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.freegamma = freegamma->get_active(); - DCPProfile* dcp = NULL; + DCPProfile* dcp = nullptr; if (ifromfile->get_active() && pp->icm.input.substr(0, 5) == "file:" && DCPStore::getInstance()->isValidDCPFileName(pp->icm.input.substr(5))) { dcp = DCPStore::getInstance()->getProfile(pp->icm.input.substr(5)); @@ -917,7 +917,7 @@ void ICMPanel::setRawMeta (bool raw, const rtengine::ImageData* pMeta) iembedded->set_active (!raw); icamera->set_sensitive (raw); camName = pMeta->getCamera(); - icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != NULL || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != NULL)); + icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr)); iembedded->set_sensitive (!raw); enableListener (); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 640cca5a2..538e3f79c 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -98,10 +98,10 @@ private: public: ICMPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool gammaadd, bool slopeadd); diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 125968b8e..fc81bfa0d 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -29,16 +29,16 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) { infotext = ""; - cropgl = NULL; - pmlistener = NULL; - pmhlistener = NULL; - focusGrabber = NULL; - flawnOverWindow = NULL; - mainCropWindow = NULL; - previewHandler = NULL; + cropgl = nullptr; + pmlistener = nullptr; + pmhlistener = nullptr; + focusGrabber = nullptr; + flawnOverWindow = nullptr; + mainCropWindow = nullptr; + previewHandler = nullptr; showClippedH = false; showClippedS = false; - listener = NULL; + listener = nullptr; zoomPanel = Gtk::manage (new ZoomPanel (this)); indClippedPanel = Gtk::manage (new IndicateClippedPanel (this)); @@ -49,8 +49,8 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) signal_size_allocate().connect( sigc::mem_fun(*this, &ImageArea::on_resized) ); dirty = false; - ipc = NULL; - iLinkedImageArea = NULL; + ipc = nullptr; + iLinkedImageArea = nullptr; } ImageArea::~ImageArea () @@ -114,7 +114,7 @@ rtengine::StagedImageProcessor* ImageArea::getImProcCoordinator() const void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_) { if( !ipc_ ) { - focusGrabber = NULL; + focusGrabber = nullptr; for (auto cropWin : cropWins) { delete cropWin; @@ -123,7 +123,7 @@ void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_) cropWins.clear(); mainCropWindow->deleteColorPickers (); - mainCropWindow->setObservedCropWin (NULL); + mainCropWindow->setObservedCropWin (nullptr); } ipc = ipc_; @@ -252,7 +252,7 @@ bool ImageArea::on_motion_notify_event (GdkEventMotion* event) cw->pointerMoved (event->state, event->x, event->y); } else if (flawnOverWindow) { flawnOverWindow->flawnOver(false); - flawnOverWindow = NULL; + flawnOverWindow = nullptr; } } @@ -306,7 +306,7 @@ bool ImageArea::on_leave_notify_event (GdkEventCrossing* event) { if (flawnOverWindow) { flawnOverWindow->flawnOver(false); - flawnOverWindow = NULL; + flawnOverWindow = nullptr; } if (focusGrabber) { @@ -355,9 +355,9 @@ void ImageArea::unsubscribe() EditDataProvider::unsubscribe(); // Ask the Crops to free-up edit mode buffers - mainCropWindow->setEditSubscriber(NULL); + mainCropWindow->setEditSubscriber(nullptr); for (auto cropWin : cropWins) { - cropWin->setEditSubscriber(NULL); + cropWin->setEditSubscriber(nullptr); } setToolHand(); @@ -394,7 +394,7 @@ void ImageArea::grabFocus (CropWindow* cw) void ImageArea::unGrabFocus () { - focusGrabber = NULL; + focusGrabber = nullptr; } void ImageArea::addCropWindow () @@ -505,7 +505,7 @@ void ImageArea::cropWindowSelected (CropWindow* cw) void ImageArea::cropWindowClosed (CropWindow* cw) { - focusGrabber = NULL; + focusGrabber = nullptr; std::list::iterator i = std::find (cropWins.begin(), cropWins.end(), cw); if (i != cropWins.end()) { @@ -515,7 +515,7 @@ void ImageArea::cropWindowClosed (CropWindow* cw) if (!cropWins.empty()) { mainCropWindow->setObservedCropWin (cropWins.front()); } else { - mainCropWindow->setObservedCropWin (NULL); + mainCropWindow->setObservedCropWin (nullptr); } queue_draw (); diff --git a/rtgui/imageareapanel.cc b/rtgui/imageareapanel.cc index 9a351d66a..7bcb3d112 100644 --- a/rtgui/imageareapanel.cc +++ b/rtgui/imageareapanel.cc @@ -18,7 +18,7 @@ */ #include "imageareapanel.h" -ImageAreaPanel::ImageAreaPanel () : before(NULL), after(NULL) +ImageAreaPanel::ImageAreaPanel () : before(nullptr), after(nullptr) { set_border_width (2); diff --git a/rtgui/imageareatoollistener.h b/rtgui/imageareatoollistener.h index edb93f030..b7d5cec94 100644 --- a/rtgui/imageareatoollistener.h +++ b/rtgui/imageareatoollistener.h @@ -28,20 +28,20 @@ class ImageAreaToolListener public: virtual ~ImageAreaToolListener() {} - virtual void spotWBselected (int x, int y, Thumbnail* thm = NULL) {} + virtual void spotWBselected (int x, int y, Thumbnail* thm = nullptr) {} virtual int getSpotWBRectSize () { return 8; } virtual void cropSelectionReady () {} - virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL) {} + virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr) {} virtual ToolBar* getToolBar () { - return NULL; + return nullptr; } - virtual CropGUIListener* startCropEditing (Thumbnail* thm = NULL) + virtual CropGUIListener* startCropEditing (Thumbnail* thm = nullptr) { - return NULL; + return nullptr; } }; diff --git a/rtgui/impulsedenoise.h b/rtgui/impulsedenoise.h index 8052309c3..cd8de582b 100644 --- a/rtgui/impulsedenoise.h +++ b/rtgui/impulsedenoise.h @@ -34,9 +34,9 @@ public: ImpulseDenoise (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index e1f04b279..2a3330b5c 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -76,7 +76,7 @@ void IndicateClippedPanel::buttonToggled () // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index 6c4891249..3909195b6 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -59,7 +59,7 @@ InspectorBuffer::~InspectorBuffer() { int InspectorBuffer::infoFromImage (const Glib::ustring& fname) { - rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, NULL); + rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, nullptr); if (!idata) { return 0; @@ -81,7 +81,7 @@ int InspectorBuffer::infoFromImage (const Glib::ustring& fname) return deg; } -Inspector::Inspector () : currImage(NULL), zoom(0.0), active(false) {} +Inspector::Inspector () : currImage(nullptr), zoom(0.0), active(false) {} Inspector::~Inspector() { @@ -207,7 +207,7 @@ void Inspector::switchImage (const Glib::ustring &fullPath) // deleting the last entries for (size_t i = images.size() - 1; i > size_t(options.maxInspectorBuffers - 1); --i) { delete images.at(i); - images.at(i) = NULL; + images.at(i) = nullptr; } // resizing down @@ -215,14 +215,14 @@ void Inspector::switchImage (const Glib::ustring &fullPath) } if (fullPath.empty()) { - currImage = NULL; + currImage = nullptr; queue_draw(); return; } else { bool found = false; for (size_t i = 0; i < images.size(); ++i) { - if (images.at(i) != NULL && images.at(i)->imgPath == fullPath) { + if (images.at(i) != nullptr && images.at(i)->imgPath == fullPath) { currImage = images.at(i); // rolling the list 1 step to the beginning @@ -251,7 +251,7 @@ void Inspector::switchImage (const Glib::ustring &fullPath) images.push_back(iBuffer); currImage = images.at(images.size() - 1); } else { - currImage = NULL; + currImage = nullptr; } } } @@ -260,14 +260,14 @@ void Inspector::switchImage (const Glib::ustring &fullPath) void Inspector::deleteBuffers () { for (size_t i = 0; i < images.size(); ++i) { - if (images.at(i) != NULL) { + if (images.at(i) != nullptr) { delete images.at(i); - images.at(i) = NULL; + images.at(i) = nullptr; } } images.resize(0); - currImage = NULL; + currImage = nullptr; } void Inspector::flushBuffers () diff --git a/rtgui/iptcpanel.h b/rtgui/iptcpanel.h index ce870d08d..7c26aa7ca 100644 --- a/rtgui/iptcpanel.h +++ b/rtgui/iptcpanel.h @@ -71,9 +71,9 @@ private: public: IPTCPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setImageData (const rtengine::ImageMetaData* id); diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 7e5bf7b53..a173b47ec 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -623,8 +623,8 @@ void LCurve::setBatchMode (bool batchMode) chromaticity->showEditedCB (); rstprotection->showEditedCB (); curveEditorG->setBatchMode (batchMode); - lcshape->setBottomBarColorProvider(NULL, -1); - lcshape->setLeftBarColorProvider(NULL, -1); + lcshape->setBottomBarColorProvider(nullptr, -1); + lcshape->setLeftBarColorProvider(nullptr, -1); } diff --git a/rtgui/labcurve.h b/rtgui/labcurve.h index 6caba6b8a..403b49f9e 100644 --- a/rtgui/labcurve.h +++ b/rtgui/labcurve.h @@ -64,9 +64,9 @@ public: LCurve (); ~LCurve (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc index 07f86542c..423a7a3ec 100644 --- a/rtgui/lensgeom.cc +++ b/rtgui/lensgeom.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(NULL) +LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr) { fill = Gtk::manage (new Gtk::CheckButton (M("TP_LENSGEOM_FILL"))); diff --git a/rtgui/lensgeom.h b/rtgui/lensgeom.h index 51a6e108c..b963489e1 100644 --- a/rtgui/lensgeom.h +++ b/rtgui/lensgeom.h @@ -44,8 +44,8 @@ public: return packBox; } - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void fillPressed (); diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index cb3a5cc6c..9543721a0 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -45,8 +45,8 @@ public: LensProfilePanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setRawMeta (bool raw, const rtengine::ImageMetaData* pMeta); void onLCPFileChanged (); diff --git a/rtgui/lwbutton.cc b/rtgui/lwbutton.cc index f7914eedb..5a50c8307 100644 --- a/rtgui/lwbutton.cc +++ b/rtgui/lwbutton.cc @@ -20,7 +20,7 @@ #include "guiutils.h" LWButton::LWButton (Cairo::RefPtr i, int aCode, void* aData, Alignment ha, Alignment va, Glib::ustring tooltip) - : xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(NULL), actionCode(aCode), actionData(aData), toolTip(tooltip) + : xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(nullptr), actionCode(aCode), actionData(aData), toolTip(tooltip) { if (i) { diff --git a/rtgui/main.cc b/rtgui/main.cc index 114204858..a3b4a60f2 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -280,7 +280,7 @@ int main(int argc, char **argv) #endif if( !options.rtSettings.verbose ) { - TIFFSetWarningHandler(NULL); // avoid annoying message boxes + TIFFSetWarningHandler(nullptr); // avoid annoying message boxes } #ifndef WIN32 @@ -392,7 +392,7 @@ void deleteProcParams(std::vector &pparam int processLineParams( int argc, char **argv ) { - rtengine::procparams::PartialProfile *rawParams = NULL, *imgParams = NULL; + rtengine::procparams::PartialProfile *rawParams = nullptr, *imgParams = nullptr; std::vector inputFiles; Glib::ustring outputPath = ""; std::vector processingParams; @@ -723,8 +723,8 @@ int processLineParams( int argc, char **argv ) Glib::ustring inputFile = inputFiles[iFile]; std::cout << "Processing: " << inputFile << std::endl; - rtengine::InitialImage* ii = NULL; - rtengine::ProcessingJob* job = NULL; + rtengine::InitialImage* ii = nullptr; + rtengine::ProcessingJob* job = nullptr; int errorCode; bool isRaw = false; @@ -766,7 +766,7 @@ int processLineParams( int argc, char **argv ) isRaw = false; } - ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, NULL ); + ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, nullptr ); if (!ii) { errors++; @@ -827,7 +827,7 @@ int processLineParams( int argc, char **argv ) } // Process image - rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, NULL, options.tunnelMetaData); + rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData); if( !resultImage ) { errors++; diff --git a/rtgui/mycurve.cc b/rtgui/mycurve.cc index 626eef4f1..255818e7c 100644 --- a/rtgui/mycurve.cc +++ b/rtgui/mycurve.cc @@ -21,7 +21,7 @@ #include #include -MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(NULL), cursor_type( CSArrow) +MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(nullptr), cursor_type( CSArrow) { graphX = get_allocation().get_width() - RADIUS * 2; @@ -30,9 +30,9 @@ MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal prevGraphH = graphH; buttonPressed = false; snapTo = ST_None; - leftBar = NULL; - bottomBar = NULL; - colorProvider = NULL; + leftBar = nullptr; + bottomBar = nullptr; + colorProvider = nullptr; sized = RS_Pending; snapToElmt = -100; curveIsDirty = true; @@ -152,11 +152,11 @@ void MyCurve::on_style_changed (const Glib::RefPtr& style) void MyCurve::refresh() { - if (leftBar != NULL) { + if (leftBar != nullptr) { leftBar->setDirty(true); } - if (bottomBar != NULL) { + if (bottomBar != nullptr) { bottomBar->setDirty(true); } diff --git a/rtgui/options.cc b/rtgui/options.cc index e76d0c06c..43159cec8 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -2142,7 +2142,7 @@ int Options::saveToFile (Glib::ustring fname) FILE *f = g_fopen (fname.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { if (options.rtSettings.verbose) { printf("Options::saveToFile / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); } @@ -2165,7 +2165,7 @@ bool Options::load () path = g_getenv("RT_SETTINGS"); - if (path != NULL) { + if (path != nullptr) { rtdir = Glib::ustring(path); if (!Glib::path_is_absolute(rtdir)) { @@ -2199,7 +2199,7 @@ bool Options::load () // Modify the path of the cache folder to the one provided in RT_CACHE environment variable path = g_getenv("RT_CACHE"); - if (path != NULL) { + if (path != nullptr) { cacheBaseDir = Glib::ustring(path); if (!Glib::path_is_absolute(cacheBaseDir)) { diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index a054b042e..d22f50fad 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -134,7 +134,7 @@ public: public: explicit PartialPasteDlg (const Glib::ustring &title); - void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL); + void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = nullptr); void everythingToggled (); void basicToggled (); diff --git a/rtgui/pcvignette.h b/rtgui/pcvignette.h index 84e4b0f57..eab1cf67d 100644 --- a/rtgui/pcvignette.h +++ b/rtgui/pcvignette.h @@ -20,9 +20,9 @@ public: PCVignette (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/perspective.h b/rtgui/perspective.h index d6a1a97c9..434df2b3f 100644 --- a/rtgui/perspective.h +++ b/rtgui/perspective.h @@ -34,9 +34,9 @@ public: PerspCorrection (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index 24af17213..ee56c915b 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -26,8 +26,8 @@ PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label) : selected (-1) // -1 means that the button is invalid - , menu (0) - , buttonImage (0) + , menu (nullptr) + , buttonImage (nullptr) { button = thisButton; hasMenu = false; diff --git a/rtgui/pparamschangelistener.h b/rtgui/pparamschangelistener.h index 2fac8e8bd..ff55eea00 100644 --- a/rtgui/pparamschangelistener.h +++ b/rtgui/pparamschangelistener.h @@ -28,7 +28,7 @@ class PParamsChangeListener public: virtual ~PParamsChangeListener() {} - virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL) {} + virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr) {} virtual void clearParamChanges () {} }; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 23cb6f2bd..0858066fa 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -33,10 +33,10 @@ extern Options options; extern Glib::ustring argv0; -Preferences::Preferences (RTWindow *rtwindow) : rprofiles(NULL), iprofiles(NULL), parent(rtwindow) +Preferences::Preferences (RTWindow *rtwindow) : rprofiles(nullptr), iprofiles(nullptr), parent(rtwindow) { - splash = NULL; + splash = nullptr; set_title (M("MAIN_BUTTON_PREFERENCES")); @@ -1351,7 +1351,7 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector& i } // process directory - Glib::Dir* dir = NULL; + Glib::Dir* dir = nullptr; try { dir = new Glib::Dir (dirname); @@ -2044,7 +2044,7 @@ void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface) #endif Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, NULL, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; + GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; gdk_event_send_clientmessage_toall ((GdkEvent*)&event); } @@ -2098,7 +2098,7 @@ void Preferences::switchFontTo(Glib::ustring newFont) Gtk::RC::parse_string (Glib::ustring::compose( "style \"clearlooks-default\" { font_name = \"%1\" }", newFont)); Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, NULL, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; + GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; gdk_event_send_clientmessage_toall ((GdkEvent*)&event); } @@ -2223,7 +2223,7 @@ void Preferences::updateFFinfos() bool Preferences::splashClosed(GdkEventAny* event) { delete splash; - splash = NULL; + splash = nullptr; return true; } diff --git a/rtgui/preprocess.h b/rtgui/preprocess.h index 8faf647a4..856a9a25e 100644 --- a/rtgui/preprocess.h +++ b/rtgui/preprocess.h @@ -40,8 +40,8 @@ public: PreProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); //void setBatchMode (bool batchMode); //void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); diff --git a/rtgui/previewhandler.cc b/rtgui/previewhandler.cc index e6ef30bca..650e323eb 100644 --- a/rtgui/previewhandler.cc +++ b/rtgui/previewhandler.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -PreviewHandler::PreviewHandler () : image(NULL), previewScale(1.) +PreviewHandler::PreviewHandler () : image(nullptr), previewScale(1.) { pih = new PreviewHandlerIdleHelper; @@ -121,7 +121,7 @@ int delImageUI (void* data) if (pih->phandler->image) { IImage8* oldImg = pih->phandler->image; oldImg->getMutex().lock (); - pih->phandler->image = NULL; + pih->phandler->image = nullptr; oldImg->getMutex().unlock (); } diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index c38fed49d..82db6b9dc 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -42,7 +42,7 @@ public: Job(): dir_id_(0), - listener_(0) + listener_(nullptr) {} int dir_id_; @@ -122,7 +122,7 @@ public: // if something got // Issue 2406 FileBrowserEntry* fdn = 0; try { - Thumbnail* tmb = 0; + Thumbnail* tmb = nullptr; { if (Glib::file_test(j.dir_entry_, Glib::FILE_TEST_EXISTS)) { tmb = cacheMgr->getEntry(j.dir_entry_); @@ -176,7 +176,7 @@ PreviewLoader* PreviewLoader::getInstance(void) void PreviewLoader::add(int dir_id, const Glib::ustring& dir_entry, PreviewLoaderListener* l) { // somebody listening? - if ( l != 0 ) { + if ( l != nullptr ) { { MyMutex::MyLock lock(impl_->mutex_); diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index 63989809d..e5e100ba5 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -220,7 +220,7 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } @@ -304,7 +304,7 @@ void PreviewModePanel::buttonToggled_backColor (Gtk::ToggleButton* tbbackColor) // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } diff --git a/rtgui/previewwindow.cc b/rtgui/previewwindow.cc index 18c470e55..7d4eaaa0a 100644 --- a/rtgui/previewwindow.cc +++ b/rtgui/previewwindow.cc @@ -21,7 +21,7 @@ #include "imagearea.h" #include "cursormanager.h" -PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), imageArea(NULL), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0), isMoving(false), needsUpdate(false) +PreviewWindow::PreviewWindow () : previewHandler(nullptr), mainCropWin(nullptr), imageArea(nullptr), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0), isMoving(false), needsUpdate(false) { rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) ); diff --git a/rtgui/profilechangelistener.h b/rtgui/profilechangelistener.h index 0f6870c2d..b3baa62d7 100644 --- a/rtgui/profilechangelistener.h +++ b/rtgui/profilechangelistener.h @@ -27,7 +27,7 @@ class ProfileChangeListener public: virtual ~ProfileChangeListener() {} - virtual void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL) {} + virtual void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr) {} virtual void setDefaults (rtengine::procparams::ProcParams* defparams) {} }; diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index 5974b2242..f51a460b8 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -39,10 +39,10 @@ void ProfilePanel::cleanup () delete partialProfileDlg; } -ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(NULL), lastFilename(""), imagePath("") +ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(nullptr), lastFilename(""), imagePath("") { - tpc = NULL; + tpc = nullptr; profileFillModeOnImage = new RTImage("profile-filled.png"); profileFillModeOffImage = new RTImage("profile-partial.png"); @@ -109,8 +109,8 @@ ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(NULL), lastFilename( paste->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::paste_clicked) ); - custom = NULL; - lastsaved = NULL; + custom = nullptr; + lastsaved = nullptr; dontupdate = false; profileStore.addListener(this); @@ -217,7 +217,7 @@ void ProfilePanel::storeCurrentValue () const ProfileStoreEntry *entry = profiles->getSelectedEntry(); const PartialProfile *currProfile; - if (entry && (currProfile = profileStore.getProfile(entry)) != NULL) { + if (entry && (currProfile = profileStore.getProfile(entry)) != nullptr) { // now storedPProfile has the current entry's values storedPProfile = new PartialProfile(currProfile->pparams, currProfile->pedited, true); } else { @@ -276,7 +276,7 @@ void ProfilePanel::restoreValue () if (storedPProfile) { storedPProfile->deleteInstance(); delete storedPProfile; - storedPProfile = NULL; + storedPProfile = nullptr; } } @@ -345,7 +345,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : NULL; + toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : nullptr; } if (toSave) { @@ -415,7 +415,7 @@ void ProfilePanel::copy_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (entry) : NULL; + toSave = entry ? profileStore.getProfile (entry) : nullptr; } // toSave has to be a complete procparams @@ -529,7 +529,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited & partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe); + partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe); } else { // custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited ) pe.combine(*custom->pparams, pp, true); @@ -544,7 +544,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) // we delete custom custom->deleteInstance(); delete custom; - custom = NULL; + custom = nullptr; } } @@ -628,7 +628,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = clipboard.pparams filtered by ( clipboard.pedited & partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe); + partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe); } else { // custom.pparams = clipboard.pparams filtered by ( clipboard.pedited ) pe.combine(*custom->pparams, pp, true); @@ -641,7 +641,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = clipboard.pparams filtered by ( partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, NULL, &pp, NULL); + partialProfileDlg->applyPaste (custom->pparams, nullptr, &pp, nullptr); } else { // custom.pparams = clipboard.pparams non filtered *custom->pparams = pp; @@ -738,21 +738,21 @@ void ProfilePanel::procParamsChanged (rtengine::procparams::ProcParams* p, rteng void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams* lastSaved) { - const ProfileStoreEntry *pse = NULL; - const PartialProfile *defprofile = NULL; + const ProfileStoreEntry *pse = nullptr; + const PartialProfile *defprofile = nullptr; bool ccPrevState = changeconn.block(true); if (custom) { custom->deleteInstance(); delete custom; - custom = NULL; + custom = nullptr; } if (lastsaved) { lastsaved->deleteInstance(); delete lastsaved; - lastsaved = NULL; + lastsaved = nullptr; } if (lastSaved) { diff --git a/rtgui/profilepanel.h b/rtgui/profilepanel.h index f80438aac..b0b1ac021 100644 --- a/rtgui/profilepanel.h +++ b/rtgui/profilepanel.h @@ -87,7 +87,7 @@ public: void setInitialFileName (const Glib::ustring& filename); // PParamsChangeListener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); // gui callbacks void save_clicked (GdkEventButton* event); diff --git a/rtgui/profilestore.cc b/rtgui/profilestore.cc index 4f4f2c187..c80bbe388 100644 --- a/rtgui/profilestore.cc +++ b/rtgui/profilestore.cc @@ -26,7 +26,7 @@ ProfileStore profileStore; using namespace rtengine; using namespace rtengine::procparams; -ProfileStore::ProfileStore () : parseMutex(NULL), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(NULL), internalDefaultEntry(NULL) +ProfileStore::ProfileStore () : parseMutex(nullptr), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(nullptr), internalDefaultEntry(nullptr) { internalDefaultProfile = new AutoPartialProfile(); internalDefaultProfile->set(true); @@ -65,7 +65,7 @@ ProfileStore::~ProfileStore () delete internalDefaultProfile; lock.release(); delete parseMutex; - parseMutex = NULL; + parseMutex = nullptr; } /* @@ -142,7 +142,7 @@ void ProfileStore::_parseProfiles () // Check if the default profiles has been found. - if (findEntryFromFullPathU(options.defProfRaw) == NULL) { + if (findEntryFromFullPathU(options.defProfRaw) == nullptr) { options.setDefProfRawMissing(true); if (options.rtSettings.verbose) { @@ -150,7 +150,7 @@ void ProfileStore::_parseProfiles () } } - if (findEntryFromFullPathU(options.defProfImg) == NULL) { + if (findEntryFromFullPathU(options.defProfImg) == nullptr) { options.setDefProfImgMissing(true); if (options.rtSettings.verbose) { @@ -186,7 +186,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath } // walking through the directory - Glib::Dir* dir = NULL; + Glib::Dir* dir = nullptr; dir = new Glib::Dir (realPath); for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { @@ -271,7 +271,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path { if (path.empty()) { - return NULL; + return nullptr; } if (path == DEFPROFILE_INTERNAL) { @@ -298,7 +298,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path path = path.substr(0, path.length() - fName.length()); } else { // path is malformed, returning NULL; - return NULL; + return nullptr; } path = Glib::path_get_dirname(path); @@ -307,7 +307,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path int parentFolderId = findFolderId(path); if (parentFolderId == -1) { - return NULL; + return nullptr; } // 2. find the entry that match the given filename and parentFolderId @@ -317,7 +317,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path } } - return NULL; + return nullptr; } /** Protected version of findEntryFromFullPathU */ @@ -333,13 +333,13 @@ const PartialProfile* ProfileStore::getProfile (Glib::ustring path) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } const ProfileStoreEntry *pse = findEntryFromFullPath(path); if (!pse) { - return NULL; + return nullptr; } return getProfile(pse); @@ -351,7 +351,7 @@ const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } MyMutex::MyLock lock(*parseMutex); @@ -369,7 +369,7 @@ const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) #ifndef NDEBUG printf("WARNING! Profile not found!\n"); #endif - return NULL; + return nullptr; } } @@ -406,7 +406,7 @@ const ProcParams* ProfileStore::getDefaultProcParams (bool isRaw) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } //Note: the mutex is locked in getProfile, called below @@ -431,7 +431,7 @@ const PartialProfile* ProfileStore::getDefaultPartialProfile (bool isRaw) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } //Note: the mutex is locked in getProfile, called below @@ -538,7 +538,7 @@ const ProfileStoreEntry* ProfileStoreComboBox::getSelectedEntry() if (currRow) { return currRow[methodColumns.profileStoreEntry]; } else { - return NULL; + return nullptr; } } diff --git a/rtgui/profilestore.h b/rtgui/profilestore.h index 05a0a3797..ab45a0867 100644 --- a/rtgui/profilestore.h +++ b/rtgui/profilestore.h @@ -102,7 +102,7 @@ public: const ProfileStoreEntry *entry; #ifndef NDEBUG - ProfileStoreLabel() : Gtk::Label("*** error ***"), entry(NULL) {} + ProfileStoreLabel() : Gtk::Label("*** error ***"), entry(nullptr) {} #else ProfileStoreLabel() : Gtk::Label(""), entry(NULL) {} #endif diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index fe824a6a1..f62b645c3 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -85,12 +85,12 @@ class ProgressConnector { retval = opStart.emit (); g_idle_add (ProgressConnector::emitEndSignalUI, new sigc::signal0 (opEnd)); - workThread = 0; + workThread = nullptr; } public: - ProgressConnector (): retval( 0 ), workThread( 0 ) { } + ProgressConnector (): retval( 0 ), workThread( nullptr ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) { diff --git a/rtgui/prsharpening.h b/rtgui/prsharpening.h index c0739b818..9bf90cc6c 100644 --- a/rtgui/prsharpening.h +++ b/rtgui/prsharpening.h @@ -58,9 +58,9 @@ public: PrSharpening (); virtual ~PrSharpening (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/rawcacorrection.h b/rtgui/rawcacorrection.h index 82df2c3af..4edf9f9f2 100644 --- a/rtgui/rawcacorrection.h +++ b/rtgui/rawcacorrection.h @@ -39,10 +39,10 @@ public: RAWCACorr (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setAdjusterBehavior (bool caadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/rawexposure.h b/rtgui/rawexposure.h index 72e042892..d6e3e863f 100644 --- a/rtgui/rawexposure.h +++ b/rtgui/rawexposure.h @@ -37,10 +37,10 @@ public: RAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexposadd, bool pexpreseradd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/renamedlg.cc b/rtgui/renamedlg.cc index 16bfaff00..e51ada336 100644 --- a/rtgui/renamedlg.cc +++ b/rtgui/renamedlg.cc @@ -22,7 +22,7 @@ #include "rtimage.h" RenameDialog::RenameDialog (Gtk::Window* parent) - : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true, true), p(parent), imageData(NULL) + : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true, true), p(parent), imageData(nullptr) { Gtk::Table* names = Gtk::manage (new Gtk::Table (2, 2)); diff --git a/rtgui/resize.cc b/rtgui/resize.cc index 231f84659..64cf673e9 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -29,7 +29,7 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals croph = 0; Gtk::Table* combos = Gtk::manage (new Gtk::Table (2, 2)); - Gtk::Label *label = NULL; + Gtk::Label *label = nullptr; appliesTo = Gtk::manage (new MyComboBoxText ()); appliesTo->append_text (M("TP_RESIZE_CROPPEDAREA")); diff --git a/rtgui/resize.h b/rtgui/resize.h index 19ddc5843..cf640c281 100644 --- a/rtgui/resize.h +++ b/rtgui/resize.h @@ -52,9 +52,9 @@ public: return packBox; } - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index d44cef912..dd5048320 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -105,7 +105,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), std::vector defaultCurve; rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve); - transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); transmissionShape->setIdentityValue(0.); transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); transmissionShape->setBottomBarBgGradient(milestones); @@ -184,7 +184,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // std::vector defaultCurve; rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve); - gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", NULL, false)); + gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false)); gaintransmissionShape->setIdentityValue(0.); gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); gaintransmissionShape->setBottomBarBgGradient(milestones); diff --git a/rtgui/retinex.h b/rtgui/retinex.h index 064756a7b..65602863a 100644 --- a/rtgui/retinex.h +++ b/rtgui/retinex.h @@ -99,10 +99,10 @@ public: Retinex (); ~Retinex (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void trimValues (rtengine::procparams::ProcParams* pp); void adjusterChanged (Adjuster* a, double newval); void autoOpenCurve (); diff --git a/rtgui/rgbcurves.h b/rtgui/rgbcurves.h index c471a2063..efca76422 100644 --- a/rtgui/rgbcurves.h +++ b/rtgui/rgbcurves.h @@ -44,8 +44,8 @@ public: RGBCurves (); ~RGBCurves (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setEditProvider (EditDataProvider *provider); void autoOpenCurve (); diff --git a/rtgui/rotate.cc b/rtgui/rotate.cc index e688dba62..d41362132 100644 --- a/rtgui/rotate.cc +++ b/rtgui/rotate.cc @@ -27,7 +27,7 @@ using namespace rtengine::procparams; Rotate::Rotate () : FoldableToolPanel(this, "rotate", M("TP_ROTATE_LABEL")) { - rlistener = NULL; + rlistener = nullptr; //TODO the action of the rotation slider is counter-intuitive Gtk::Image* irotateL = Gtk::manage (new RTImage ("rotate-right-2.png")); diff --git a/rtgui/rotate.h b/rtgui/rotate.h index a67f310d5..bad46ef84 100644 --- a/rtgui/rotate.h +++ b/rtgui/rotate.h @@ -36,9 +36,9 @@ public: Rotate (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void straighten (double deg); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index e64c64d8e..b9538ceca 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -79,12 +79,12 @@ osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data) #endif // __APPLE__ RTWindow::RTWindow () - : mainNB(NULL) - , bpanel(NULL) - , splash(NULL) - , btn_fullscreen(NULL) - , epanel(NULL) - , fpanel(NULL) + : mainNB(nullptr) + , bpanel(nullptr) + , splash(nullptr) + , btn_fullscreen(nullptr) + , epanel(nullptr) + , fpanel(nullptr) { cacheMgr->init (); @@ -143,19 +143,19 @@ RTWindow::RTWindow () signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) ); if(simpleEditor) { - epanel = Gtk::manage( new EditorPanel (NULL) ); + epanel = Gtk::manage( new EditorPanel (nullptr) ); epanel->setParent (this); add (*epanel); show_all (); - pldBridge = NULL; // No progress listener + pldBridge = nullptr; // No progress listener CacheManager* cm = CacheManager::getInstance(); Thumbnail* thm = cm->getEntry( argv1 ); if(thm) { int error; - rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, NULL); + rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, nullptr); epanel->open( thm, ii ); } } else { @@ -299,7 +299,7 @@ RTWindow::~RTWindow() delete pldBridge; } - pldBridge = NULL; + pldBridge = nullptr; #if defined(__APPLE__) g_object_unref (osxApp); #endif @@ -379,7 +379,7 @@ void RTWindow::on_realize () splash->show (); } else { delete splash; - splash = NULL; + splash = nullptr; } } } @@ -552,7 +552,7 @@ bool RTWindow::keyPressed (GdkEventKey* event) #endif if (try_quit) { - if (!on_delete_event(0)) { + if (!on_delete_event(nullptr)) { gtk_main_quit(); } } @@ -844,7 +844,7 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) bool RTWindow::splashClosed(GdkEventAny* event) { delete splash; - splash = NULL; + splash = nullptr; return true; } diff --git a/rtgui/saveformatpanel.cc b/rtgui/saveformatpanel.cc index 2159f6623..2afd5703b 100644 --- a/rtgui/saveformatpanel.cc +++ b/rtgui/saveformatpanel.cc @@ -20,7 +20,7 @@ #include "multilangmgr.h" #include "guiutils.h" -SaveFormatPanel::SaveFormatPanel () : listener (NULL) +SaveFormatPanel::SaveFormatPanel () : listener (nullptr) { jpegqual = new Adjuster (M("SAVEDLG_JPEGQUAL"), 0, 100, 1, 100); @@ -96,7 +96,7 @@ void SaveFormatPanel::init (SaveFormat &sf) { FormatChangeListener* tmp = listener; - listener = NULL; + listener = nullptr; if (sf.format == "jpg") { format->set_active (0); diff --git a/rtgui/shadowshighlights.h b/rtgui/shadowshighlights.h index 60071e58f..167b1ecf1 100644 --- a/rtgui/shadowshighlights.h +++ b/rtgui/shadowshighlights.h @@ -41,9 +41,9 @@ public: ShadowsHighlights (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/sharpenedge.h b/rtgui/sharpenedge.h index 5c8730038..f27d4ecee 100644 --- a/rtgui/sharpenedge.h +++ b/rtgui/sharpenedge.h @@ -44,9 +44,9 @@ public: SharpenEdge (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool amountadd, bool passadd); diff --git a/rtgui/sharpening.h b/rtgui/sharpening.h index 3020cea7f..45c2d9fe1 100644 --- a/rtgui/sharpening.h +++ b/rtgui/sharpening.h @@ -58,9 +58,9 @@ public: Sharpening (); virtual ~Sharpening (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/sharpenmicro.h b/rtgui/sharpenmicro.h index 4b45dd5c4..03a75eaa5 100644 --- a/rtgui/sharpenmicro.h +++ b/rtgui/sharpenmicro.h @@ -44,9 +44,9 @@ public: SharpenMicro (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool amountadd, bool uniformityadd ); diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index 9cb41e1a5..1a5a7be4d 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -21,7 +21,7 @@ #include "multilangmgr.h" #include "mycurve.h" -SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(NULL) +SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(nullptr) { positions[0] = defaults[0] = 0.25; diff --git a/rtgui/splash.cc b/rtgui/splash.cc index c936639f7..87408598e 100644 --- a/rtgui/splash.cc +++ b/rtgui/splash.cc @@ -87,7 +87,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t set_border_width (4); - releaseNotesSW = NULL; + releaseNotesSW = nullptr; nb = Gtk::manage (new Gtk::Notebook ()); get_vbox()->pack_start (*nb); @@ -110,7 +110,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(buildFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (buildFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -140,7 +140,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(creditsFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (creditsFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -171,7 +171,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(licenseFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (licenseFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -208,7 +208,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(releaseNotesFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (releaseNotesFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; diff --git a/rtgui/splash.h b/rtgui/splash.h index 9fe6d8220..707d0b86d 100644 --- a/rtgui/splash.h +++ b/rtgui/splash.h @@ -50,7 +50,7 @@ public: bool hasReleaseNotes() { - return releaseNotesSW != NULL; + return releaseNotesSW != nullptr; }; void showReleaseNotes(); bool on_timer (); diff --git a/rtgui/thresholdadjuster.cc b/rtgui/thresholdadjuster.cc index 800f6edf5..564507bd3 100644 --- a/rtgui/thresholdadjuster.cc +++ b/rtgui/thresholdadjuster.cc @@ -71,7 +71,7 @@ ThresholdAdjuster::ThresholdAdjuster (Glib::ustring label, double minValue, doub void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) { - adjusterListener = NULL; + adjusterListener = nullptr; afterReset = false; blocked = false; @@ -90,7 +90,7 @@ void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) editedChange = editedCheckBox->signal_toggled().connect( sigc::mem_fun(*this, &ThresholdAdjuster::editedToggled) ); hbox->pack_start (*editedCheckBox); } else { - editedCheckBox = NULL; + editedCheckBox = nullptr; } hbox->pack_start (*this->label); @@ -121,7 +121,7 @@ ThresholdAdjuster::~ThresholdAdjuster () selectorChange.disconnect(); delayConnection.block(true); - adjusterListener = NULL; + adjusterListener = nullptr; } void ThresholdAdjuster::setDefault (double bottom, double top) @@ -163,7 +163,7 @@ void ThresholdAdjuster::resetPressed (GdkEventButton* event) afterReset = true; - if ((event != NULL) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) + if ((event != nullptr) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) // CTRL pressed : resetting to current default value { tSelector.reset(); @@ -260,7 +260,7 @@ void ThresholdAdjuster::getValue (Glib::ustring& bottomLeft, Glib::ustring& topL bool ThresholdAdjuster::notifyListener () { - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { GThreadLock lock; sendToListener(); } diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 796f958e6..34d5bf14a 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -79,7 +79,7 @@ ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double de assert(minValue < maxValue); #endif - bgCurveProvider = NULL; + bgCurveProvider = nullptr; separatedSliders = false; initalEq1 = startAtOne; minValTop = minValBottom = minValue; @@ -123,7 +123,7 @@ ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double de assert(minValue < maxValue); #endif - bgCurveProvider = NULL; + bgCurveProvider = nullptr; separatedSliders = false; initalEq1 = startAtOne; minValTop = minValBottom = minValue; diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 2d022f9f7..8a067ca49 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -25,7 +25,7 @@ using namespace std; ThumbBrowserBase::ThumbBrowserBase () - : lastClicked(NULL), previewHeight(options.thumbSize), numOfCols(1), inspector(NULL), isInspectorActive(false), location(THLOC_FILEBROWSER) + : lastClicked(nullptr), previewHeight(options.thumbSize), numOfCols(1), inspector(nullptr), isInspectorActive(false), location(THLOC_FILEBROWSER) { inW = -1; inH = -1; @@ -728,7 +728,7 @@ void ThumbBrowserBase::on_style_changed (const Glib::RefPtr& style) refreshThumbImages (); } -ThumbBrowserBase::Internal::Internal () : ofsX(0), ofsY(0), parent(NULL), dirty(true) +ThumbBrowserBase::Internal::Internal () : ofsX(0), ofsY(0), parent(nullptr), dirty(true) { } @@ -774,7 +774,7 @@ void ThumbBrowserBase::buttonPressed (int x, int y, int button, GdkEventType typ { // GUI already acquired - ThumbBrowserEntryBase* fileDescr = NULL; + ThumbBrowserEntryBase* fileDescr = nullptr; bool handled = false; { diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index 3783c5164..fea52f244 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -24,10 +24,10 @@ ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) : fnlabw(0), fnlabh(0), dtlabw(0), dtlabh(0), exlabw(0), exlabh(0), prew(0), preh(0), prex(0), prey(0), upperMargin(6), borderWidth(1), textGap(6), sideMargin(8), lowerMargin(8), - preview(NULL), dispname(Glib::path_get_basename (fname)), buttonSet(NULL), width(0), height(0), + preview(nullptr), dispname(Glib::path_get_basename (fname)), buttonSet(nullptr), width(0), height(0), exp_width(0), exp_height(0), startx(0), starty(0), ofsX(0), ofsY(0), redrawRequests(0), - parent(NULL), original(NULL), bbSelected(false), bbFramed(false), bbPreview(NULL), - thumbnail(NULL), filename(fname), shortname(dispname), exifline(""), datetimeline(""), + parent(nullptr), original(nullptr), bbSelected(false), bbFramed(false), bbPreview(nullptr), + thumbnail(nullptr), filename(fname), shortname(dispname), exifline(""), datetimeline(""), selected(false), drawable(false), filtered(false), framed(false), processing(false), italicstyle(false), edited(false), recentlysaved(false), updatepriority(false), withFilename(WFNAME_NONE) {} @@ -387,7 +387,7 @@ void ThumbBrowserEntryBase::resize (int h) if ( preh != old_preh || width != old_width ) { delete [] preview; - preview = NULL; + preview = nullptr; refreshThumbnailImage (); } else { backBuffer.clear(); // This will force a backBuffer update on queue_draw diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index 39711a5ae..0f903dcd8 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -47,10 +47,10 @@ public: {} Job(): - tbe_(0), - priority_(NULL), + tbe_(nullptr), + priority_(nullptr), upgrade_(false), - listener_(0) + listener_(nullptr) {} ThumbBrowserEntryBase* tbe_; @@ -156,7 +156,7 @@ public: // unlock and do processing; will relock on block exit, then call listener double scale = 1.0; - rtengine::IImage8* img = 0; + rtengine::IImage8* img = nullptr; Thumbnail* thm = j.tbe_->thumbnail; if ( j.upgrade_ ) { @@ -205,7 +205,7 @@ void ThumbImageUpdater::add(ThumbBrowserEntryBase* tbe, bool* priority, bool upgrade, ThumbImageUpdateListener* l) { // nobody listening? - if ( l == 0 ) { + if ( l == nullptr ) { return; } diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 62d48b2ec..71aeab0ab 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -34,8 +34,8 @@ using namespace rtengine::procparams; Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf) - : fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), - pparamsValid(false), needsReProcessing(true), imageLoading(false), lastImg(NULL), + : fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), + pparamsValid(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), lastW(0), lastH(0), lastScale(0), initial_(false) { @@ -58,12 +58,12 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa } delete tpp; - tpp = 0; + tpp = nullptr; } Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5) - : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), pparamsValid(false), - pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(NULL), + : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), pparamsValid(false), + pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), lastW(0), lastH(0), lastScale(0.0), initial_(true) { @@ -76,7 +76,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::s initial_ = false; delete tpp; - tpp = 0; + tpp = nullptr; } void Thumbnail::_generateThumbnailImage () @@ -84,9 +84,9 @@ void Thumbnail::_generateThumbnailImage () // delete everything loaded into memory delete tpp; - tpp = NULL; + tpp = nullptr; delete [] lastImg; - lastImg = NULL; + lastImg = nullptr; tw = -1; th = options.maxThumbnailHeight; imgRatio = -1.; @@ -135,7 +135,7 @@ void Thumbnail::_generateThumbnailImage () tpp = rtengine::Thumbnail::loadQuickFromRaw (fname, ri, tw, th, 1, TRUE); } - if ( tpp == NULL ) { + if ( tpp == nullptr ) { quick = false; tpp = rtengine::Thumbnail::loadFromRaw (fname, ri, tw, th, 1, pparams.wb.equal, TRUE); } @@ -210,7 +210,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu static int index = 0; // Will act as unique identifier during the session // try to load the last saved parameters from the cache or from the paramfile file - ProcParams* ldprof = NULL; + ProcParams* ldprof = nullptr; Glib::ustring defProf = getType() == FT_Raw ? options.defProfRaw : options.defProfImg; @@ -225,12 +225,12 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu rtengine::RawMetaDataLocation metaData = rtengine::Thumbnail::loadMetaDataFromRaw(fname); imageMetaData = rtengine::ImageMetaData::fromFile (fname, &metaData); } else { - imageMetaData = rtengine::ImageMetaData::fromFile (fname, NULL); + imageMetaData = rtengine::ImageMetaData::fromFile (fname, nullptr); } Glib::ustring tmpFileName( Glib::build_filename(options.cacheBaseDir, Glib::ustring::compose("CPB_temp_%1.txt", index++)) ); - const rtexif::TagDirectory* exifDir = NULL; + const rtexif::TagDirectory* exifDir = nullptr; if (imageMetaData && (exifDir = imageMetaData->getExifData())) { Glib::ustring outFName; @@ -565,15 +565,15 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro MyMutex::MyLock lock(mutex); - if ( tpp == 0 ) { + if ( tpp == nullptr ) { _loadThumbnail(); - if ( tpp == 0 ) { - return 0; + if ( tpp == nullptr ) { + return nullptr; } } - rtengine::IImage8* image = 0; + rtengine::IImage8* image = nullptr; if ( cfs.thumbImgType == CacheImageData::QUICK_THUMBNAIL ) { // RAW internal thumbnail, no profile yet: just do some rotation etc. @@ -586,7 +586,7 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro tpp->getDimensions(lastW, lastH, lastScale); delete tpp; - tpp = 0; + tpp = nullptr; return image; } @@ -596,20 +596,20 @@ rtengine::IImage8* Thumbnail::upgradeThumbImage (const rtengine::procparams::Pro MyMutex::MyLock lock(mutex); if ( cfs.thumbImgType != CacheImageData::QUICK_THUMBNAIL ) { - return 0; + return nullptr; } _generateThumbnailImage(); - if ( tpp == 0 ) { - return 0; + if ( tpp == nullptr ) { + return nullptr; } rtengine::IImage8* image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, cfs.getCamera(), cfs.focalLen, cfs.focalLen35mm, cfs.focusDist, cfs.shutter, cfs.fnumber, cfs.iso, cfs.expcomp, scale ); tpp->getDimensions(lastW, lastH, lastScale); delete tpp; - tpp = 0; + tpp = nullptr; return image; } @@ -782,12 +782,12 @@ void Thumbnail::_loadThumbnail(bool firstTrial) _loadThumbnail (false); } - if (tpp == NULL) { + if (tpp == nullptr) { return; } } else if (!succ) { delete tpp; - tpp = NULL; + tpp = nullptr; return; } diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index 97dd20b5a..a7b889d5f 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -71,7 +71,7 @@ class Thumbnail void _loadThumbnail (bool firstTrial = true); void _saveThumbnail (); void _generateThumbnailImage (); - int infoFromImage (const Glib::ustring& fname, rtengine::RawMetaDataLocation* rml = NULL); + int infoFromImage (const Glib::ustring& fname, rtengine::RawMetaDataLocation* rml = nullptr); void loadThumbnail (bool firstTrial = true); void generateExifDateTimeStrings (); @@ -89,7 +89,7 @@ public: // Use this to create params on demand for update ; if flaggingMode=true, the procparams is created for a file being flagged (inTrash, rank, colorLabel) rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool forceCPB, bool flaggingMode = false); - void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = NULL, int whoChangedIt = -1, bool updateCacheNow = true); + void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true); void clearProcParams (int whoClearedIt = -1); void loadProcParams (); @@ -112,7 +112,7 @@ public: // unsigned char* getThumbnailImage (int &w, int &h, int fixwh=1); // fixwh = 0: fix w and calculate h, =1: fix h and calculate w rtengine::IImage8* processThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); rtengine::IImage8* upgradeThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); - void getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams = NULL); + void getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams = nullptr); void getFinalSize (const rtengine::procparams::ProcParams& pparams, int& w, int& h); const Glib::ustring& getExifString (); diff --git a/rtgui/tonecurve.h b/rtgui/tonecurve.h index be94c073a..e2ba03602 100644 --- a/rtgui/tonecurve.h +++ b/rtgui/tonecurve.h @@ -77,9 +77,9 @@ public: ToneCurve (); ~ToneCurve (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index 86604863e..345f9f892 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -21,7 +21,7 @@ #include "multilangmgr.h" #include "guiutils.h" -ToolBar::ToolBar () : showColPickers(true), listener (NULL) +ToolBar::ToolBar () : showColPickers(true), listener (nullptr) { editingMode = false; diff --git a/rtgui/toolpanel.cc b/rtgui/toolpanel.cc index fdee3fa79..0b94359d0 100644 --- a/rtgui/toolpanel.cc +++ b/rtgui/toolpanel.cc @@ -65,7 +65,7 @@ void ToolParamBlock::on_style_changed (const Glib::RefPtr& style) updateStyle(); } -FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(NULL), exp(NULL), lastEnabled(true) +FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(nullptr), exp(nullptr), lastEnabled(true) { if (!content) { return; diff --git a/rtgui/toolpanel.h b/rtgui/toolpanel.h index 69a8d18ac..d7d0dc662 100644 --- a/rtgui/toolpanel.h +++ b/rtgui/toolpanel.h @@ -75,17 +75,17 @@ protected: public: - ToolPanel (Glib::ustring toolName = "", bool need11 = false) : toolName(toolName), listener(NULL), tmp(NULL), batchMode(false), multiImage(false), need100Percent(need11) {} + ToolPanel (Glib::ustring toolName = "", bool need11 = false) : toolName(toolName), listener(nullptr), tmp(nullptr), batchMode(false), multiImage(false), need100Percent(need11) {} virtual ~ToolPanel() {} virtual void setParent (Gtk::Box* parent) {} virtual Gtk::Box* getParent () { - return NULL; + return nullptr; } virtual MyExpander* getExpander () { - return NULL; + return nullptr; } virtual void setExpanded (bool expanded) {} virtual bool getExpanded () @@ -101,13 +101,13 @@ public: listener = tpl; } virtual void setEditProvider (EditDataProvider *provider) {} - virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL) {} - virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL) {} + virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) {} + virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) {} virtual void trimValues (rtengine::procparams::ProcParams* pp) { return; } - virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL) {} + virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) {} virtual void autoOpenCurve () {} /** @brief Disable the event broadcasting mechanism @@ -116,12 +116,12 @@ public: */ bool disableListener () { - if (tmp == NULL) { + if (tmp == nullptr) { tmp = listener; } - bool prevState = listener != NULL; - listener = NULL; + bool prevState = listener != nullptr; + listener = nullptr; return prevState; } @@ -129,11 +129,11 @@ public: */ void enableListener () { - if (tmp != NULL) { + if (tmp != nullptr) { listener = tmp; } - tmp = NULL; + tmp = nullptr; } virtual void setBatchMode (bool batchMode) diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index a13073018..cb748feff 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -516,7 +516,7 @@ void ToolPanelCoordinator::closeImage () if (ipc) { ipc->stopProcessing (); - ipc = NULL; + ipc = nullptr; } } @@ -646,7 +646,7 @@ void ToolPanelCoordinator::autoCropRequested () rtengine::RawImage* ToolPanelCoordinator::getDF() { if (!ipc) { - return NULL; + return nullptr; } const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); @@ -661,13 +661,13 @@ rtengine::RawImage* ToolPanelCoordinator::getDF() return rtengine::dfm.searchDarkFrame( maker, model, iso, shutter, timestamp); } - return NULL; + return nullptr; } rtengine::RawImage* ToolPanelCoordinator::getFF() { if (!ipc) { - return NULL; + return nullptr; } const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); @@ -685,7 +685,7 @@ rtengine::RawImage* ToolPanelCoordinator::getFF() return rtengine::ffm.searchFlatField( maker, model, lens, focallength, aperture, timestamp); } - return NULL; + return nullptr; } Glib::ustring ToolPanelCoordinator::GetCurrentImageFilePath() @@ -764,7 +764,7 @@ void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* o { for (auto toolPanel : toolPanels) { - if (toolPanel->getParent() != NULL) { + if (toolPanel->getParent() != nullptr) { ToolPanel* currentTP = toolPanel; if (currentTP->getParent() == parent) { diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index 14774df48..cf379fcd2 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -230,7 +230,7 @@ public: void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); // profilechangelistener interface - void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL); + void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); void setDefaults (rtengine::procparams::ProcParams* defparams); // DirSelectionListener interface @@ -287,15 +287,15 @@ public: void saveInputICCReference (Glib::ustring fname, bool apply_wb); // imageareatoollistener interface - void spotWBselected (int x, int y, Thumbnail* thm = NULL); + void spotWBselected (int x, int y, Thumbnail* thm = nullptr); void cropSelectionReady (); - void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL); + void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr); ToolBar* getToolBar () { return toolBar; } int getSpotWBRectSize (); - CropGUIListener* startCropEditing (Thumbnail* thm = NULL) + CropGUIListener* startCropEditing (Thumbnail* thm = nullptr) { return crop; } diff --git a/rtgui/vibrance.h b/rtgui/vibrance.h index e8afbbad0..ceb010434 100644 --- a/rtgui/vibrance.h +++ b/rtgui/vibrance.h @@ -54,9 +54,9 @@ public: Vibrance (); ~Vibrance (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool pastelsadd, bool saturatedadd); diff --git a/rtgui/vignetting.h b/rtgui/vignetting.h index 6909b5af7..029f16808 100644 --- a/rtgui/vignetting.h +++ b/rtgui/vignetting.h @@ -37,9 +37,9 @@ public: Vignetting (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index abab1d2d1..892d8b8a0 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -374,7 +374,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opaCurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveRG(defaultCurve); - opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); opacityShapeRG->setIdentityValue(0.); opacityShapeRG->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -387,7 +387,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveBY(defaultCurve); - opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); opacityShapeBY->setIdentityValue(0.); opacityShapeBY->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -406,19 +406,19 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), linkedgConn = linkedg->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::linkedgToggled) ); noiseBox->pack_start(*linkedg); - level0noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level0noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level0noise->setAdjusterListener (this); level0noise->setUpdatePolicy(RTUP_DYNAMIC); - level1noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level1noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level1noise->setAdjusterListener (this); level1noise->setUpdatePolicy(RTUP_DYNAMIC); - level2noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level2noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level2noise->setAdjusterListener (this); level2noise->setUpdatePolicy(RTUP_DYNAMIC); - level3noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); + level3noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level3noise->setAdjusterListener (this); level3noise->setUpdatePolicy(RTUP_DYNAMIC); @@ -487,7 +487,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), CCWcurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultCCWCurve(defaultCurve); - ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", NULL, false)); + ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", nullptr, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -814,7 +814,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorW->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveW(defaultCurve); - opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", NULL, false)); + opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShape->setBottomBarBgGradient(milestonesW); @@ -833,7 +833,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorWL->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveWL(defaultCurve); - opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", NULL, false)); + opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", nullptr, false)); opacityShapeWL->setIdentityValue(0.); opacityShapeWL->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP")); diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index b0bc967ab..554298e08 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -242,13 +242,13 @@ public: void adjusterChanged2 (ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR); void autoOpenCurve (); void curveChanged (CurveEditor* ce); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool threshold2add, bool thresadd, bool chroadd, bool chromaadd, bool contrastadd, bool skinadd, bool reschroadd, bool tmrsadd, bool resconadd, bool resconHadd, bool thradd, bool thrHadd, bool skyadd, bool edgradadd, bool edgvaladd, bool strengthadd, bool gammaadd, bool edgedetectadd, bool edgedetectthradd, bool edgedetectthr2add); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setEditProvider (EditDataProvider *provider); void updateToolState (std::vector &tpOpen); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void writeOptions (std::vector &tpOpen); diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index 3c4b61fe3..75873b680 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -147,7 +147,7 @@ static double wbTemp2Slider(double temp) return sval; } -WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL")), wbp(NULL), wblistener(NULL) +WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL")), wbp(nullptr), wblistener(nullptr) { Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); @@ -833,7 +833,7 @@ WBEntry* WhiteBalance::findWBEntry (Glib::ustring label, enum WB_LabelType lblTy } } - return NULL; + return nullptr; } int WhiteBalance::_setActiveMethod(Glib::ustring &label, Gtk::TreeModel::Children &children) diff --git a/rtgui/whitebalance.h b/rtgui/whitebalance.h index 3ebd503bc..8a34f83da 100644 --- a/rtgui/whitebalance.h +++ b/rtgui/whitebalance.h @@ -94,9 +94,9 @@ public: static void init (); static void cleanup (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void optChanged (); diff --git a/rtgui/xtransprocess.h b/rtgui/xtransprocess.h index eebec2f85..44ed2e670 100644 --- a/rtgui/xtransprocess.h +++ b/rtgui/xtransprocess.h @@ -40,10 +40,10 @@ public: XTransProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void methodChanged (); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/xtransrawexposure.h b/rtgui/xtransrawexposure.h index 1a92146d3..4ed046a07 100644 --- a/rtgui/xtransrawexposure.h +++ b/rtgui/xtransrawexposure.h @@ -38,10 +38,10 @@ public: XTransRAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexblackadd); void trimValues (rtengine::procparams::ProcParams* pp); From 19de9d1efa40a91cb5bf2cb27e14c34994480c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 12 Oct 2016 18:24:14 +0200 Subject: [PATCH 049/115] Apply `modernize-redundant-void-arg` --- rtengine/EdgePreservingDecomposition.cc | 2 +- rtengine/camconst.cc | 8 ++++---- rtengine/curves.cc | 2 +- rtgui/previewloader.cc | 4 ++-- rtgui/thumbimageupdater.cc | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index c8ba8f9d8..21abe733c 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -554,7 +554,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max return true; } -void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization(void) +void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization() { delete IncompleteCholeskyFactorization; } diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index 3e7ad6202..91d4e6c8b 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -321,7 +321,7 @@ parse_error: } bool -CameraConst::has_dcrawMatrix(void) +CameraConst::has_dcrawMatrix() { return dcraw_matrix[0] != 0; } @@ -339,7 +339,7 @@ CameraConst::update_dcrawMatrix(const short *other) } const short * -CameraConst::get_dcrawMatrix(void) +CameraConst::get_dcrawMatrix() { if (!has_dcrawMatrix()) { return nullptr; @@ -349,7 +349,7 @@ CameraConst::get_dcrawMatrix(void) } bool -CameraConst::has_rawCrop(void) +CameraConst::has_rawCrop() { return raw_crop[0] != 0 || raw_crop[1] != 0 || raw_crop[2] != 0 || raw_crop[3] != 0; } @@ -698,7 +698,7 @@ void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSetting } CameraConstantsStore * -CameraConstantsStore::getInstance(void) +CameraConstantsStore::getInstance() { static CameraConstantsStore instance_; return &instance_; diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 9b68cc9ee..2cd56dbb9 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -1775,7 +1775,7 @@ float PerceptualToneCurve::get_curve_val(float x, float range[2], float lut[], s } // calculate a single value that represents the contrast of the tone curve -float PerceptualToneCurve::calculateToneCurveContrastValue(void) const +float PerceptualToneCurve::calculateToneCurveContrastValue() const { // find linear y = k*x the best approximates the curve, which is the linear scaling/exposure component that does not contribute any contrast diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index 82db6b9dc..4bdffc512 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -167,7 +167,7 @@ PreviewLoader::PreviewLoader(): { } -PreviewLoader* PreviewLoader::getInstance(void) +PreviewLoader* PreviewLoader::getInstance() { static PreviewLoader instance_; return &instance_; @@ -191,7 +191,7 @@ void PreviewLoader::add(int dir_id, const Glib::ustring& dir_entry, PreviewLoade } } -void PreviewLoader::removeAllJobs(void) +void PreviewLoader::removeAllJobs() { DEBUG("stop %d", impl_->nConcurrentThreads); MyMutex::MyLock lock(impl_->mutex_); diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index 0f903dcd8..7b3218a3e 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -190,7 +190,7 @@ public: }; ThumbImageUpdater* -ThumbImageUpdater::getInstance(void) +ThumbImageUpdater::getInstance() { static ThumbImageUpdater instance_; return &instance_; @@ -272,7 +272,7 @@ ThumbImageUpdater::removeJobs(ThumbImageUpdateListener* listener) } void -ThumbImageUpdater::removeAllJobs(void) +ThumbImageUpdater::removeAllJobs() { DEBUG("stop"); From e98bd4748717248d6d03636ae321aef9a6352df4 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 12 Oct 2016 19:04:06 +0200 Subject: [PATCH 050/115] Cppcheck: Fix some warnings --- rtengine/EdgePreservingDecomposition.cc | 20 +- rtengine/LUT.h | 2 + rtengine/array2D.h | 7 +- rtengine/color.cc | 4 +- rtengine/curves.cc | 6 +- rtengine/dfmanager.cc | 20 +- rtengine/ffmanager.cc | 22 +- rtengine/ffmanager.h | 2 - rtengine/imagesource.h | 8 +- rtengine/improccoordinator.cc | 20 +- rtengine/improccoordinator.h | 3 +- rtengine/improcfun.cc | 21 +- rtengine/improcfun.h | 20 +- rtgui/rawprocess.cc | 303 ------------------------ rtgui/rawprocess.h | 64 ----- rtgui/thumbbrowserentry.cc | 69 ------ 16 files changed, 66 insertions(+), 525 deletions(-) delete mode 100644 rtgui/rawprocess.cc delete mode 100644 rtgui/rawprocess.h delete mode 100644 rtgui/thumbbrowserentry.cc diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 927bfac2d..06fe38f2b 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -127,15 +127,13 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl #endif { float c = 0.0f; - float t; - float temp; #ifdef _OPENMP #pragma omp for reduction(+:rs) // Summation with error correction #endif for(int ii = 0; ii < n; ii++) { - temp = r[ii] * s[ii]; - t = rs + temp; + float temp = r[ii] * s[ii]; + float t = rs + temp; if( fabsf(rs) >= fabsf(temp) ) { c += ((rs - t) + temp); @@ -183,7 +181,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl return x; } -MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int NumberOfDiagonalsInLowerTriangle) +MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int NumberOfDiagonalsInLowerTriangle) : buffer(nullptr), DiagBuffer(nullptr) { n = Dimension; m = NumberOfDiagonalsInLowerTriangle; @@ -305,9 +303,9 @@ SSEFUNCTION void MultiDiagonalSymmetricMatrix::VectorProduct(float* RESTRICT Pro const int chunkSize = (lm - srm) / (omp_get_num_procs() * 32); #else const int chunkSize = (lm - srm) / (omp_get_num_procs() * 8); -#endif #endif #pragma omp parallel +#endif { // First fill the big part in the middle // This can be done without intermediate stores to memory and it can be parallelized too @@ -443,8 +441,8 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max } //It's all initialized? Uhkay. Do the actual math then. - int sss, ss, s; - int k, MaxStartRow = StartRows[m - 1]; //Handy number. + int sss, ss; + int MaxStartRow = StartRows[m - 1]; //Handy number. float **l = ic->Diagonals; float *d = ic->Diagonals[0]; //Describes D in LDLt. int icm = ic->m; @@ -506,8 +504,8 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max //This is a loop over k from 1 to j, inclusive. We'll cover that by looping over the index of the diagonals (s), and get k from it. //The first diagonal is d (k = 0), so skip that and have s start at 1. Cover all available s but stop if k exceeds j. - s = 1; - k = icStartRows[s]; + int s = 1; + int k = icStartRows[s]; while(k <= j) { d[j] -= l[s][j - k] * l[s][j - k] * d[j - k]; @@ -713,9 +711,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CreateBlur(float *Source, float a = Blur, g = Source; } - int i; int w1 = w - 1, h1 = h - 1; -// float eps = 0.02f; const float sqreps = 0.0004f; // removed eps*eps from inner loop diff --git a/rtengine/LUT.h b/rtengine/LUT.h index 2d3d91ed5..d83a431ca 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -536,6 +536,8 @@ public: size = 0; upperBound = 0; maxs = 0; + maxsf = 0.f; + clip = 0; } // create an identity LUT (LUT(x) = x) or a scaled identity LUT (LUT(x) = x / divisor) diff --git a/rtengine/array2D.h b/rtengine/array2D.h index db44fcfc8..2d38d2e15 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -74,7 +74,8 @@ class array2D : { private: - int x, y, owner, flags; + int x, y, owner; + unsigned int flags; T ** ptr; T * data; bool lock; // useful lock to ensure data is not changed anymore. @@ -112,7 +113,7 @@ public: // use as empty declaration, resize before use! // very useful as a member object array2D() : - x(0), y(0), owner(0), ptr(NULL), data(NULL), lock(0) + x(0), y(0), owner(0), ptr(NULL), data(NULL), lock(0), flags(0) { //printf("got empty array2D init\n"); } @@ -285,6 +286,8 @@ public: if (this != &rhs) { + flags = rhs.flags; + lock = rhs.lock; if (!owner) { // we can only copy same size data if ((x != rhs.x) || (y != rhs.y)) { printf(" assignment error in array2D\n"); diff --git a/rtengine/color.cc b/rtengine/color.cc index a23a261b7..6dda2c8b8 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -2757,8 +2757,8 @@ SSEFUNCTION void Color::LabGamutMunsell(float *labL, float *laba, float *labb, printf(" Gamut : G1negat=%iiter G165535=%iiter \n", negat, moreRGB); if (MunsDebugInfo) { - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%i\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); - printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%i\n", MunsDebugInfo->maxdhuelum[0] , MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); + printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhuelum[0] , MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); } else { printf(" Munsell correction wasn't requested\n"); } diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 9b68cc9ee..4da4a4a36 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -44,7 +44,7 @@ using namespace std; namespace rtengine { -Curve::Curve () : N(0), x(nullptr), y(nullptr), ypp(nullptr), hashSize(1000 /* has to be initialized to the maximum value */) {} +Curve::Curve () : N(0), ppn(0), x(nullptr), y(nullptr), mc(0.0), mfc(0.0), msc(0.0), mhc(0.0), ypp(nullptr), x1(0.0), y1(0.0), x2(0.0), y2(0.0), x3(0.0), y3(0.0), firstPointIncluded(false), increment(0.0), nbr_points(0), hashSize(1000 /* has to be initialized to the maximum value */) {} void Curve::AddPolygons () { @@ -1434,11 +1434,9 @@ void ColorGradientCurve::SetXYZ(const Curve *pCurve, const double xyz_rgb[3][3], double currY = pCurve->getVal(x) - prevY; if (dY > 0.000001 || dY < -0.000001) { - float r1, g1, b1, r2, g2, b2, ro, go, bo; + float r1, g1, b1, r2, g2, b2; Color::hsv2rgb(float(prevY), satur, lr1, r1, g1, b1); Color::hsv2rgb(float(nextY), satur, lr2, r2, g2, b2); - bool chr = false; - bool lum = true; LUTf dum; float X1, X2, Y1, Y2, Z1, Z2, L1, a_1, b_1, c1, h1; Color::rgbxyz(r2, g2, b2, X2, Y2, Z2, xyz_rgb); diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index e06ac27e2..e0dea012b 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -36,16 +36,18 @@ extern const Settings* settings; inline dfInfo& dfInfo::operator =(const dfInfo &o) { - pathname = o.pathname; - maker = o.maker; - model = o.model; - iso = o.iso; - shutter = o.shutter; - timestamp = o.timestamp; + if (this != &o) { + pathname = o.pathname; + maker = o.maker; + model = o.model; + iso = o.iso; + shutter = o.shutter; + timestamp = o.timestamp; - if( ri ) { - delete ri; - ri = NULL; + if( ri ) { + delete ri; + ri = NULL; + } } return *this; diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 8b26c3121..29121a696 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -31,17 +31,19 @@ extern const Settings* settings; inline ffInfo& ffInfo::operator =(const ffInfo &o) { - pathname = o.pathname; - maker = o.maker; - model = o.model; - lens = o.lens; - shutter = o.shutter; - focallength = o.focallength; - timestamp = o.timestamp; + if (this != &o) { + pathname = o.pathname; + maker = o.maker; + model = o.model; + lens = o.lens; + focallength = o.focallength; + timestamp = o.timestamp; + aperture = o.aperture; - if( ri ) { - delete ri; - ri = NULL; + if( ri ) { + delete ri; + ri = NULL; + } } return *this; diff --git a/rtengine/ffmanager.h b/rtengine/ffmanager.h index 5f6b2d267..f081c5e33 100644 --- a/rtengine/ffmanager.h +++ b/rtengine/ffmanager.h @@ -34,8 +34,6 @@ public: std::string maker; ///< manufacturer std::string model; ///< model std::string lens; ///< lens - int iso; ///< ISO (gain) - double shutter; ///< shutter or exposure time in sec double aperture; ///< aperture in stops double focallength; ///< focal length in mm time_t timestamp; ///< seconds since 1 Jan 1970 diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 305c67da5..65b2b76c0 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -41,10 +41,10 @@ class ImageMatrices { public: - double rgb_cam[3][3]; - double cam_rgb[3][3]; - double xyz_cam[3][3]; - double cam_xyz[3][3]; + double rgb_cam[3][3] = {}; + double cam_rgb[3][3] = {}; + double xyz_cam[3][3] = {}; + double cam_xyz[3][3] = {}; }; class ImageSource : public InitialImage diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 8925b29e0..20eea3011 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -40,8 +40,6 @@ ImProcCoordinator::ImProcCoordinator () hltonecurve(65536), shtonecurve(65536), tonecurve(65536, 0), //,1); - chaut(0.f), redaut(0.f), blueaut(0.f), maxredaut(0.f), maxblueaut(0.f), minredaut(0.f), minblueaut(0.f), nresi(0.f), - chromina(0.f), sigma(0.f), lumema(0.f), lumacurve(32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation chroma_acurve(65536, 0), chroma_bcurve(65536, 0), @@ -84,11 +82,12 @@ ImProcCoordinator::ImProcCoordinator () rcurvehist(256), rcurvehistCropped(256), rbeforehist(256), gcurvehist(256), gcurvehistCropped(256), gbeforehist(256), bcurvehist(256), bcurvehistCropped(256), bbeforehist(256), + fw(0), fh(0), tr(0), fullw(1), fullh(1), pW(-1), pH(-1), plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), - resultValid(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), - butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1) + resultValid(false), thread(NULL), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), + butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) {} @@ -138,9 +137,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) int readyphase = 0; bwAutoR = bwAutoG = bwAutoB = -9000.f; - chaut = redaut = blueaut = maxredaut = maxblueaut = nresi = highresi = 0.f; - chromina = sigma = lumema = 0.f; - minredaut = minblueaut = 10000.f; if (todo == CROP && ipf.needsPCVignetting()) { todo |= TRANSFORM; // Change about Crop does affect TRANSFORM @@ -443,11 +439,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, params.toneCurve.shcompr, params.toneCurve.brightness, params.toneCurve.contrast, params.toneCurve.curveMode, params.toneCurve.curve, params.toneCurve.curveMode2, params.toneCurve.curve2, - vhist16, hltonecurve, shtonecurve, tonecurve, histToneCurve, customToneCurve1, customToneCurve2, scale == 1 ? 1 : 1); + vhist16, hltonecurve, shtonecurve, tonecurve, histToneCurve, customToneCurve1, customToneCurve2, 1); - CurveFactory::RGBCurve (params.rgbCurves.rcurve, rCurve, scale == 1 ? 1 : 1); - CurveFactory::RGBCurve (params.rgbCurves.gcurve, gCurve, scale == 1 ? 1 : 1); - CurveFactory::RGBCurve (params.rgbCurves.bcurve, bCurve, scale == 1 ? 1 : 1); + CurveFactory::RGBCurve (params.rgbCurves.rcurve, rCurve, 1); + CurveFactory::RGBCurve (params.rgbCurves.gcurve, gCurve, 1); + CurveFactory::RGBCurve (params.rgbCurves.bcurve, bCurve, 1); opautili = false; @@ -471,7 +467,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if(params.blackwhite.enabled) { - CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, vhist16bw, histToneCurveBW, beforeToneCurveBW, afterToneCurveBW, scale == 1 ? 1 : 1); + CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, vhist16bw, histToneCurveBW, beforeToneCurveBW, afterToneCurveBW, 1); } colourToningSatLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 0fb0041f3..dd901789f 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -90,7 +90,6 @@ protected: LUTf hltonecurve; LUTf shtonecurve; LUTf tonecurve; - float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema; LUTf lumacurve; LUTf chroma_acurve; @@ -327,7 +326,7 @@ public: } struct DenoiseInfoStore { - DenoiseInfoStore () : valid(false) {} + DenoiseInfoStore () : chM(0), max_r{}, max_b{}, ch_M{}, valid(false) {} float chM; float max_r[9]; float max_b[9]; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 1f41dd6b4..b170ba52f 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -524,7 +524,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; @@ -1034,7 +1034,6 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh // if(!params->epd.enabled || !params->colorappearance.tonecie || !settings->autocielab){ // if(!params->epd.enabled || !params->colorappearance.tonecie || !params->colorappearance.sharpcie){ - int posl, posc; double brli = 327.; double chsacol = 327.; int libr = 0; @@ -1065,9 +1064,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh jp = true; if(pW != 1) { //only with improccoordinator + int posl; if(libr == 1) { posl = CLIP((int)(Q * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J - } else if(libr == 0) { + } else /*if(libr == 0)*/ { posl = CLIP((int)(J * brli)); //327 for J } @@ -1077,11 +1077,12 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh chropC = true; if(pW != 1) { //only with improccoordinator + int posc; if(colch == 0) { posc = CLIP((int)(C * chsacol)); //450.0 approximative factor for s 320 for M } else if(colch == 1) { posc = CLIP((int)(s * chsacol)); - } else if(colch == 2) { + } else /*if(colch == 2)*/ { posc = CLIP((int)(M * chsacol)); } @@ -1303,7 +1304,6 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh ncie->C_p[i][j] = (ncie->M_p[i][j]) / co_e; //show histogram in CIECAM mode (Q,J, M,s,C) - int posl, posc; double brli = 327.; double chsacol = 327.; int libr = 0; @@ -1335,9 +1335,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh jp = true; if(pW != 1) { //only with improccoordinator + int posl; if(libr == 1) { posl = CLIP((int)(ncie->Q_p[i][j] * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J - } else if(libr == 0) { + } else /*if(libr == 0)*/ { posl = CLIP((int)(ncie->J_p[i][j] * brli)); //327 for J } @@ -1347,12 +1348,13 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh chropC = true; if(pW != 1) { //only with improccoordinator + int posc; if(colch == 0) { posc = CLIP((int)(ncie->C_p[i][j] * chsacol)); //450.0 approximative factor for s 320 for M } else if(colch == 1) { sa_t = 100.f * sqrt(ncie->C_p[i][j] / ncie->Q_p[i][j]); //Q_p always > 0 posc = CLIP((int)(sa_t * chsacol)); - } else if(colch == 2) { + } else /*if(colch == 2)*/ { posc = CLIP((int)(ncie->M_p[i][j] * chsacol)); } @@ -1822,7 +1824,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; @@ -2680,8 +2682,6 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int for (int i = 0; i < height; i++) { // update CIECAM with new values after tone-mapping for (int j = 0; j < width; j++) { - float xx, yy, zz; - float x, y, z; // if(epdEnabled) ncie->J_p[i][j]=(100.0f* ncie->Q_p[i][j]*ncie->Q_p[i][j])/(w_h*w_h); if(epdEnabled) { @@ -4663,7 +4663,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - float h, s, l; float r = tmpImage->r(i, j); float g = tmpImage->g(i, j); float b = tmpImage->b(i, j); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index ce65bc2f8..7401c871c 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -194,27 +194,9 @@ public: }; double lumimul[3]; -// float chau; -// float chred; -// float chblue; -// float maxchred; -// float maxchblue; -// float minchred; -// float minchblue; -// float resid;//used by noise_residual -// float residred;//used by noise_residual -// float residblue;//used by noise_residual -// int nb; - int nbresid; - float redresid; - float blueresid; -// float maxredresid;//used by noise_residual -// float maxblueresid;//used by noise_residual -// int comptlevel; - ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(NULL), lab2outputTransform(NULL), output2monitorTransform(NULL), params(iparams), scale(1), multiThread(imultiThread) {} + : monitorTransform(NULL), lab2outputTransform(NULL), output2monitorTransform(NULL), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} ~ImProcFunctions (); void setScale (double iscale); diff --git a/rtgui/rawprocess.cc b/rtgui/rawprocess.cc deleted file mode 100644 index 0ca4350cc..000000000 --- a/rtgui/rawprocess.cc +++ /dev/null @@ -1,303 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include "rawprocess.h" -#include "options.h" -#include "guiutils.h" -using namespace rtengine; -using namespace rtengine::procparams; - -RawProcess::RawProcess () : FoldableToolPanel(this) -{ - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); - hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); - dmethod = Gtk::manage (new MyComboBoxText ()); - - for( size_t i = 0; i < procparams::RAWParams::numMethods; i++) { - dmethod->append_text(procparams::RAWParams::methodstring[i]); - } - - dmethod->set_active(0); - hb1->set_tooltip_markup (M("TP_RAW_DMETHOD_TOOLTIP")); - - hb1->pack_end (*dmethod, Gtk::PACK_EXPAND_WIDGET, 4); - pack_start( *hb1, Gtk::PACK_SHRINK, 4); - - dcbOptions = Gtk::manage (new Gtk::VBox ()); - dcbOptions->set_border_width(4); - - dcbIterations = Gtk::manage (new Adjuster (M("TP_RAW_DCBITERATIONS"), 0, 5, 1, 2)); - dcbIterations->setAdjusterListener (this); - - if (dcbIterations->delay < options.adjusterMaxDelay) { - dcbIterations->delay = options.adjusterMaxDelay; - } - - dcbIterations->show(); - dcbEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_DCBENHANCE"))); - dcbOptions->pack_start(*dcbIterations); - dcbOptions->pack_start(*dcbEnhance); - pack_start( *dcbOptions, Gtk::PACK_SHRINK, 4); - - lmmseOptions = Gtk::manage (new Gtk::VBox ()); - lmmseOptions->set_border_width(4); - - lmmseIterations = Gtk::manage (new Adjuster (M("TP_RAW_LMMSEITERATIONS"), 0, 6, 1, 2)); - lmmseIterations->setAdjusterListener (this); - lmmseIterations->set_tooltip_markup (M("TP_RAW_LMMSE_TOOLTIP")); - - if (lmmseIterations->delay < options.adjusterMaxDelay) { - lmmseIterations->delay = options.adjusterMaxDelay; - } - - lmmseIterations->show(); - lmmseOptions->pack_start(*lmmseIterations); - pack_start( *lmmseOptions, Gtk::PACK_SHRINK, 4); - - pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); - ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 )); - ccSteps->setAdjusterListener (this); - - if (ccSteps->delay < options.adjusterMaxDelay) { - ccSteps->delay = options.adjusterMaxDelay; - } - - ccSteps->show(); - pack_start( *ccSteps, Gtk::PACK_SHRINK, 4); - - //pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); - //allOptions = Gtk::manage (new Gtk::VBox ()); - //allOptions->set_border_width(2); - //allEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_ALLENHANCE"))); - //allOptions->pack_start(*allEnhance); - //pack_start( *allOptions, Gtk::PACK_SHRINK, 4); - - methodconn = dmethod->signal_changed().connect( sigc::mem_fun(*this, &RawProcess::methodChanged) ); - dcbEnhconn = dcbEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &RawProcess::dcbEnhanceChanged), true); - //allEnhconn = allEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &RawProcess::allEnhanceChanged), true); -} - - -void RawProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) -{ - disableListener (); - methodconn.block (true); - dcbEnhconn.block (true); - //allEnhconn.block (true); - - dmethod->set_active(procparams::RAWParams::numMethods); - - for( size_t i = 0; i < procparams::RAWParams::numMethods; i++) - if( pp->raw.dmethod == procparams::RAWParams::methodstring[i]) { - dmethod->set_active(i); - oldSelection = i; - break; - } - - if(pedited ) { - ccSteps->setEditedState (pedited->raw.ccSteps ? Edited : UnEdited); - dcbIterations->setEditedState ( pedited->raw.dcbIterations ? Edited : UnEdited); - dcbEnhance->set_inconsistent(!pedited->raw.dcbEnhance); - //allEnhance->set_inconsistent(!pedited->raw.allEnhance); - lmmseIterations->setEditedState ( pedited->raw.lmmseIterations ? Edited : UnEdited); - - if( !pedited->raw.dmethod ) { - dmethod->set_active(procparams::RAWParams::numMethods); // No name - } - } - - //allEnhance->set_active(pp->raw.all_enhance); - - dcbIterations->setValue (pp->raw.dcb_iterations); - dcbEnhance->set_active(pp->raw.dcb_enhance); - ccSteps->setValue (pp->raw.ccSteps); - - if (pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::dcb] || - dmethod->get_active_row_number() == procparams::RAWParams::numMethods) { - dcbOptions->show(); - } else { - dcbOptions->hide(); - } - - lmmseIterations->setValue (pp->raw.lmmse_iterations); - - if (pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::lmmse] || - dmethod->get_active_row_number() == procparams::RAWParams::numMethods) { - lmmseOptions->show(); - } else { - lmmseOptions->hide(); - } - - // Flase color suppression is applied to all demozaicing method, so don't hide anything - /*if (pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::eahd] || - pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::hphd] || - pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::vng4]) - ccSteps->show(); - else - ccSteps->hide();*/ - - lastDCBen = pp->raw.dcb_enhance; - //lastALLen = pp->raw.all_enhance; - - methodconn.block (false); - dcbEnhconn.block (false); - //allEnhconn.block (false); - - enableListener (); -} - -void RawProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) -{ - pp->raw.ccSteps = ccSteps->getIntValue(); - pp->raw.dcb_iterations = dcbIterations->getIntValue(); - pp->raw.dcb_enhance = dcbEnhance->get_active(); - //pp->raw.all_enhance = allEnhance->get_active(); - pp->raw.lmmse_iterations = lmmseIterations->getIntValue(); - - int currentRow = dmethod->get_active_row_number(); - - if( currentRow >= 0 && currentRow < procparams::RAWParams::numMethods) { - pp->raw.dmethod = procparams::RAWParams::methodstring[currentRow]; - } - - if (pedited) { - pedited->raw.ccSteps = ccSteps->getEditedState (); - pedited->raw.dmethod = dmethod->get_active_row_number() != procparams::RAWParams::numMethods; - pedited->raw.dcbIterations = dcbIterations->getEditedState (); - pedited->raw.dcbEnhance = !dcbEnhance->get_inconsistent(); - //pedited->raw.allEnhance = !allEnhance->get_inconsistent(); - pedited->raw.lmmseIterations = lmmseIterations->getEditedState (); - - } -} - -void RawProcess::setBatchMode(bool batchMode) -{ - dmethod->append_text (M("GENERAL_UNCHANGED")); - dmethod->set_active(procparams::RAWParams::numMethods); // No name - dcbOptions->hide(); - lmmseOptions->hide(); - ToolPanel::setBatchMode (batchMode); - ccSteps->showEditedCB (); - dcbIterations->showEditedCB (); - lmmseIterations->showEditedCB (); - -} - -void RawProcess::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited) -{ - dcbIterations->setDefault( defParams->raw.dcb_iterations); - lmmseIterations->setDefault( defParams->raw.lmmse_iterations); - ccSteps->setDefault (defParams->raw.ccSteps); - - if (pedited) { - dcbIterations->setDefaultEditedState( pedited->raw.dcbIterations ? Edited : UnEdited); - lmmseIterations->setDefaultEditedState( pedited->raw.lmmseIterations ? Edited : UnEdited); - ccSteps->setDefaultEditedState(pedited->raw.ccSteps ? Edited : UnEdited); - } else { - dcbIterations->setDefaultEditedState( Irrelevant ); - lmmseIterations->setDefaultEditedState( Irrelevant ); - ccSteps->setDefaultEditedState(Irrelevant ); - } -} - -void RawProcess::adjusterChanged (Adjuster* a, double newval) -{ - if (listener) { - if (a == dcbIterations) { - listener->panelChanged (EvDemosaicDCBIter, a->getTextValue() ); - } else if (a == ccSteps) { - listener->panelChanged (EvDemosaicFalseColorIter, a->getTextValue() ); - } else if (a == lmmseIterations) { - listener->panelChanged (EvDemosaicLMMSEIter, a->getTextValue() ); - } - - } -} - -void RawProcess::methodChanged () -{ - int curSelection = dmethod->get_active_row_number(); - - if ( curSelection == procparams::RAWParams::dcb) { - dcbOptions->show(); - } else { - dcbOptions->hide(); - } - - if ( curSelection == procparams::RAWParams::lmmse) { - lmmseOptions->show(); - } else { - lmmseOptions->hide(); - } - - Glib::ustring methodName = ""; - bool ppreq = false; - - if( curSelection >= 0 && curSelection < procparams::RAWParams::numMethods) { - methodName = procparams::RAWParams::methodstring[curSelection]; - - if (curSelection == procparams::RAWParams::mono || oldSelection == procparams::RAWParams::mono) { - ppreq = true; - } - } - - oldSelection = curSelection; - - if (listener) { - listener->panelChanged (ppreq ? EvDemosaicMethodPreProc : EvDemosaicMethod, methodName); - } -} - -void RawProcess::dcbEnhanceChanged () -{ - if (batchMode) { - if (dcbEnhance->get_inconsistent()) { - dcbEnhance->set_inconsistent (false); - dcbEnhconn.block (true); - dcbEnhance->set_active (false); - dcbEnhconn.block (false); - } else if (lastDCBen) { - dcbEnhance->set_inconsistent (true); - } - - lastDCBen = dcbEnhance->get_active (); - } - - if (listener) { - listener->panelChanged (EvDemosaicDCBEnhanced, dcbEnhance->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); - } -} - -/*void RawProcess::allEnhanceChanged () -{ - if (batchMode) { - if (allEnhance->get_inconsistent()) { - allEnhance->set_inconsistent (false); - allEnhconn.block (true); - allEnhance->set_active (false); - allEnhconn.block (false); - } - else if (lastALLen) - allEnhance->set_inconsistent (true); - - lastALLen = allEnhance->get_active (); - } - if (listener) - listener->panelChanged (EvDemosaicALLEnhanced, allEnhance->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED")); -}*/ diff --git a/rtgui/rawprocess.h b/rtgui/rawprocess.h deleted file mode 100644 index 85c1c9f44..000000000 --- a/rtgui/rawprocess.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#ifndef _RAWPROCESS_H_ -#define _RAWPROCESS_H_ - -#include -#include "adjuster.h" -#include "guiutils.h" -#include "toolpanel.h" - - -class RawProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel -{ - -protected: - - MyComboBoxText* dmethod; - Gtk::Label* methodl; - Adjuster* ccSteps; - Gtk::VBox *dcbOptions; - Adjuster* dcbIterations; - Gtk::CheckButton* dcbEnhance; - //Gtk::VBox *allOptions; - //Gtk::CheckButton* allEnhance; - Gtk::VBox *lmmseOptions; - Adjuster* lmmseIterations; - - bool lastDCBen; - int oldSelection; - //bool lastALLen; - sigc::connection methodconn, dcbEnhconn; //,allEnhconn; -public: - - RawProcess (); - - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); - - void methodChanged (); - void adjusterChanged (Adjuster* a, double newval); - void dcbEnhanceChanged(); - //void allEnhanceChanged(); - -}; - -#endif diff --git a/rtgui/thumbbrowserentry.cc b/rtgui/thumbbrowserentry.cc deleted file mode 100644 index 1c491a641..000000000 --- a/rtgui/thumbbrowserentry.cc +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include - -FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) - : ThumbBrowserEntryBase (fname), thumbnail(thm) -{ - - previewOwner = false; - italicstyle = thumbnail->getType() != FT_Raw; - datetimeline = thumbnail->getDateTimeString (); - exifline = thumbnail->getExifString (); -} - -void ThumbBrowserEntry::obtainThumbnailSize () -{ - - if (thumbnail) { - thumbnail->getThumbnailSize (prew, preh); - } -} -Glib::RefPtr ThumbBrowserEntry::editedIcon; -Glib::RefPtr ThumbBrowserEntry::recentlySavedIcon; -Glib::RefPtr ThumbBrowserEntry::enqueuedIcon; -std::vector > ThumbBrowserEntry::getIconsOnImageArea () -{ - - std::vector > ret; - - if (!thumbnail) { - return ret; - } - - if (thumbnail->hasProcParams() && editedIcon) { - ret.push_back (editedIcon); - } - - if (thumbnail->isRecentlySaved() && recentlySavedIcon) { - ret.push_back (recentlySavedIcon); - } - - if (thumbnail->isEnqueued () && enqueuedIcon) { - ret.push_back (enqueuedIcon); - } - - return ret; -} - -ThumbnailButtonSet* ThumbBrowserEntry::getThumbButtonSet () -{ - - return (ThumbnailButtonSet*)buttonSet; -} From aeaff29ac0a70f1ce7ce29cdf8899c1be9c17bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 12 Oct 2016 20:01:30 +0200 Subject: [PATCH 051/115] Apply `readability-simplify-boolean-expr` --- rtengine/color.cc | 2 +- rtengine/imagedata.cc | 2 +- rtengine/improcfun.cc | 24 ++++++++++++------------ rtengine/ipsharpen.cc | 8 ++++---- rtengine/ipwavelet.cc | 18 +++++++++--------- rtengine/procparams.cc | 6 +----- rtengine/rawimage.cc | 2 +- rtgui/crop.cc | 2 +- rtgui/editorpanel.cc | 14 +++----------- rtgui/exifpanel.cc | 2 +- rtgui/filebrowser.cc | 6 +++--- rtgui/filecatalog.cc | 12 ++---------- rtgui/histogrampanel.cc | 6 +++--- rtgui/history.cc | 6 +++--- rtgui/imagearea.cc | 2 +- rtgui/options.cc | 8 ++------ rtgui/previewmodepanel.cc | 6 +++--- rtgui/profilepanel.cc | 12 ++---------- 18 files changed, 53 insertions(+), 85 deletions(-) diff --git a/rtengine/color.cc b/rtengine/color.cc index b0250ce9c..aa7232db6 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -2248,7 +2248,7 @@ void Color::AllMunsellLch(bool lumaMuns, float Lprov1, float Loldd, float HH, fl correctionHueLum = 0.0; - if(contin1 == true && contin2 == true) { + if(contin1 && contin2) { correctlum = correctlumprov2 - correctlumprov; } diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index c3e8c7780..d3400a8d0 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -570,7 +570,7 @@ std::string ImageMetaData::expcompToString (double expcomp, bool maskZeroexpcomp char buffer[256]; - if (maskZeroexpcomp == true) { + if (maskZeroexpcomp) { if (expcomp != 0.0) { sprintf (buffer, "%0.2f", expcomp); return buffer; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 1f41dd6b4..423a6b341 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -280,7 +280,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } //scene condition for surround - if(params->colorappearance.surrsource == true) { + if(params->colorappearance.surrsource) { f = 0.85; // if user => source image has surround very dark c = 0.55; nc = 0.85; @@ -507,7 +507,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh int gamu = 0; bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated - if(params->colorappearance.gamut == true) { + if(params->colorappearance.gamut) { gamu = 1; //enabled gamut control } @@ -1503,7 +1503,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } //scene condition for surround - if(params->colorappearance.surrsource == true) { + if(params->colorappearance.surrsource) { f = 0.85f; // if user => source image has surround very dark c = 0.55f; nc = 0.85f; @@ -1808,7 +1808,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated - const int gamu = (params->colorappearance.gamut == true) ? 1 : 0; + const int gamu = (params->colorappearance.gamut) ? 1 : 0; xw = 100.0f * Xw; yw = 100.0f * Yw; zw = 100.0f * Zw; @@ -3817,7 +3817,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -3878,7 +3878,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int preser = 0; //bool execbal = params->colorToning.method=="Splitbal"; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -3935,14 +3935,14 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float iplow, iphigh; - if(twocol == false) { + if(!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; } int twoc = 0; //integer instead of bool to let more possible choice...other than 2 and 500. - if (twocol == false) { + if (!twocol) { twoc = 0; // 2 colours } else { twoc = 1; // 500 colours @@ -4521,7 +4521,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer */ int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -4570,7 +4570,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -4636,7 +4636,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float iplow, iphigh; - if(twocol == false) { + if(!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; @@ -4644,7 +4644,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int twoc = 0; //integer instead of bool to let more possible choice...other than 2 and 500. - if(twocol == false) { + if(!twocol) { twoc = 0; // 2 colours } else { twoc = 1; // 500 colours diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index 279b77762..c1a2f479e 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -184,7 +184,7 @@ void ImProcFunctions::sharpening (LabImage* lab, float** b2, SharpeningParams &s #endif { - if (sharpenParam.edgesonly == false) { + if (!sharpenParam.edgesonly) { gaussianBlur (lab->L, b2, W, H, sharpenParam.radius / scale); } else { bilateral (lab->L, (float**)b3, b2, W, H, sharpenParam.edges_radius / scale, sharpenParam.edges_tolerance, multiThread); @@ -327,7 +327,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) { // JD: this algorithm maximize clarity of images; it does not play on accutance. It can remove (partialy) the effects of the AA filter) // I think we can use this algorithm alone in most cases, or first to clarify image and if you want a very little USM (unsharp mask sharpening) after... - if (params->sharpenEdge.enabled == false) { + if (!params->sharpenEdge.enabled) { return; } @@ -564,7 +564,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) //! \param luminance : Luminance channel of image void ImProcFunctions::MLmicrocontrast(float** luminance, int W, int H) { - if (params->sharpenMicro.enabled == false) { + if (!params->sharpenMicro.enabled) { return; } @@ -949,7 +949,7 @@ void ImProcFunctions::sharpeningcam (CieImage* ncie, float** b2) #endif { - if (params->sharpening.edgesonly == false) { + if (!params->sharpening.edgesonly) { gaussianBlur (ncie->sh_p, b2, W, H, params->sharpening.radius / scale); } else { bilateral (ncie->sh_p, (float**)b3, b2, W, H, params->sharpening.edges_radius / scale, params->sharpening.edges_tolerance, multiThread); diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 76dd15e59..1ca5b78ec 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -845,7 +845,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } // printf("LevwavL before: %d\n",levwavL); - if(cp.contrast == 0.f && cp.tonemap == false && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels + if(cp.contrast == 0.f && !cp.tonemap && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels while(levwavL > 0 && cp.mul[levwavL - 1] == 0.f) { // cp.mul[level] == 0.f means no changes to level levwavL--; } @@ -2599,7 +2599,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit float * koe; float maxkoe = 0.f; - if(lipschitz == false) { + if(!lipschitz) { koe = new float [H_L * W_L]; for (int i = 0; i < W_L * H_L; i++) { @@ -2732,7 +2732,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit //take into account local contrast float refin = value * exp (expkoef); - if(cp.link == true && cp.noiseena) { //combi + if(cp.link && cp.noiseena) { //combi { if(level == 0) { refin *= (1.f + cp.lev0s / 50.f); // we can change this sensibility! @@ -2775,7 +2775,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int k = i * W_L + j; if(cp.detectedge) { - if(lipschitz == false) { + if(!lipschitz) { if(cp.eddet > 10.f) { edge = (aedstr * cp.eddet + bedstr) * (edgePrecalc * (1.f + koe[k])) / (1.f + 0.9f * maxkoe); } else { @@ -2783,7 +2783,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == true) { + if(lipschitz) { if(level < 4) { edge = 1.f + (edgePrecalc - 1.f) * (koeLi[level * 3][k]) / (1.f + 0.9f * maxkoeLi[level * 3 + dir - 1]); } else { @@ -2885,7 +2885,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int k = i * W_L + j; if(cp.detectedge) { - if(lipschitz == false) { + if(!lipschitz) { if(cp.eddet > 10.f) { edge = (aedstr * cp.eddet + bedstr) * (edgePrecalc * (1.f + koe[k])) / (1.f + 0.9f * maxkoe); } else { @@ -2893,7 +2893,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == true) { + if(lipschitz) { if(level < 4) { edge = 1.f + (edgePrecalc - 1.f) * (koeLi[level * 3][k]) / (1.f + 0.9f * maxkoeLi[level * 3 + dir - 1]); } else { @@ -2975,13 +2975,13 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == false) { + if(!lipschitz) { delete [] koe; } } - if(cp.link == false && cp.noiseena) { //used both with denoise 1 2 3 + if(!cp.link && cp.noiseena) { //used both with denoise 1 2 3 float refine = 0.f; for (int i = 0; i < W_L * H_L; i++) { diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 903bda6c6..b0a7873e9 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -7549,11 +7549,7 @@ bool operator==(const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b } } - if (a.threshold != b.threshold) { - return false; - } - - return true; + return a.threshold == b.threshold; } /*bool operator==(const ExifPairs& a, const ExifPairs& b) { diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index f631d4894..a36f2e222 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -782,7 +782,7 @@ void RawImage::getRgbCam (float rgbcam[3][4]) bool RawImage::get_thumbSwap() const { - return ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) ? true : false; + return (order == 0x4949) == (ntohs(0x1234) == 0x1234); } } //namespace rtengine diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 9e8522463..ab8a7a8cc 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -1283,7 +1283,7 @@ double Crop::getRatio () double r = -1.0; - if (fixr->get_active() == false) { + if (!fixr->get_active()) { return r; } diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index f1d4d5661..fb3d51297 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1890,18 +1890,10 @@ void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & his bool EditorPanel::CheckSidePanelsVisibility() { if (tbTopPanel_1) { - if(tbTopPanel_1->get_active() == false && tbRightPanel_1->get_active() == false && hidehp->get_active() == false) { - return false; - } - - return true; + return !(!tbTopPanel_1->get_active() && !tbRightPanel_1->get_active() && !hidehp->get_active()); } - if(tbRightPanel_1->get_active() == false && hidehp->get_active() == false) { - return false; - } - - return true; + return !(!tbRightPanel_1->get_active() && !hidehp->get_active()); } void EditorPanel::toggleSidePanels() { @@ -1918,7 +1910,7 @@ void EditorPanel::toggleSidePanels() tbRightPanel_1->set_active (!bAllSidePanelsVisible); hidehp->set_active (!bAllSidePanelsVisible); - if (bAllSidePanelsVisible == false) { + if (!bAllSidePanelsVisible) { tbShowHideSidePanels->set_image (*iShowHideSidePanels); } else { tbShowHideSidePanels->set_image (*iShowHideSidePanels_exit); diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index 66594b0e1..88d0a062b 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -582,7 +582,7 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre Gtk::TreeModel::iterator iter; for (iter = root.begin(); iter != root.end(); ++iter) { - if (iter->get_value (exifColumns.edited) == true) { + if (iter->get_value (exifColumns.edited)) { changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango); } else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) { changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#delete"; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 9f8b36043..b11361db2 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -1464,8 +1464,8 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry } // return false if basic filter settings are not satisfied - if ((filter.showRanked[entry->thumbnail->getRank()] == false ) || - (filter.showCLabeled[entry->thumbnail->getColorLabel()] == false ) || + if ((!filter.showRanked[entry->thumbnail->getRank()] ) || + (!filter.showCLabeled[entry->thumbnail->getColorLabel()] ) || ((entry->thumbnail->hasProcParams() && filter.showEdited[0]) && !filter.showEdited[1]) || ((!entry->thumbnail->hasProcParams() && filter.showEdited[1]) && !filter.showEdited[0]) || @@ -1515,7 +1515,7 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry } } - if (MatchEqual == true) { + if (MatchEqual) { if (iFilenameMatch == 0) { //none of the vFilterStrings found in FileName return false; } diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 3d2e4f552..82e3a0200 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -2122,11 +2122,7 @@ void FileCatalog::tbRightPanel_1_toggled () bool FileCatalog::CheckSidePanelsVisibility() { - if(tbLeftPanel_1->get_active() == false && tbRightPanel_1->get_active() == false) { - return false; - } else { - return true; - } + return !(!tbLeftPanel_1->get_active() && !tbRightPanel_1->get_active()); } void FileCatalog::toggleSidePanels() { @@ -2539,11 +2535,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) } } - if (fileBrowser->keyPressed(event)) { - return true; - } - - return false; + return fileBrowser->keyPressed(event); } void FileCatalog::showToolBar() diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 65bbadf52..25e083af3 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -215,7 +215,7 @@ void HistogramPanel::resized (Gtk::Allocation& req) histogramArea->renderHistogram (); histogramArea->queue_draw (); - if (histogramRGBArea->getFreeze() == true) { + if (histogramRGBArea->getFreeze()) { histogramRGBArea->updateFreeze(false); // set histogramRGBArea invalid; histogramRGBArea->renderRGBMarks(-1, -1, -1); @@ -305,9 +305,9 @@ void HistogramPanel::setHistRGBInvalid () // "Freeze" is not a button, but a RMB-click, so this is not in the RGBV-Toggle method void HistogramPanel::toggleFreeze () { - if (histogramRGBArea->getFreeze() == true) { + if (histogramRGBArea->getFreeze()) { histogramRGBArea->updateFreeze(false); - } else if (histogramRGBArea->getShow() == true) { + } else if (histogramRGBArea->getShow()) { histogramRGBArea->updateFreeze(true); } diff --git a/rtgui/history.cc b/rtgui/history.cc index 9c38a705b..4deb7b64a 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -165,7 +165,7 @@ void History::historySelectionChanged () tpc->profileChange (&pp, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited); } - if (blistener && blistenerLock == false) { + if (blistener && !blistenerLock) { Gtk::TreeModel::Path path = historyModel->get_path (iter); path.prev (); iter = historyModel->get_iter (path); @@ -251,9 +251,9 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring selection->select (newrow); } - if (blistener && row && blistenerLock == false) { + if (blistener && row && !blistenerLock) { blistener->historyBeforeLineChanged (row[historyColumns.params]); - } else if (blistener && size == 0 && blistenerLock == false) { + } else if (blistener && size == 0 && !blistenerLock) { blistener->historyBeforeLineChanged (newrow[historyColumns.params]); } } diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index fc81bfa0d..32df9f8f6 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -213,7 +213,7 @@ bool ImageArea::on_expose_event(GdkEventExpose* event) mainCropWindow->expose (cr); } - if (options.showInfo == true && infotext != "") { + if (options.showInfo && infotext != "") { int fnw, fnh; ilayout->get_pixel_size (fnw, fnh); window->draw_pixbuf (get_style()->get_base_gc (Gtk::STATE_NORMAL), ipixbuf, 0, 0, 4, 4, fnw + 8, fnh + 8, Gdk::RGB_DITHER_NONE, 0, 0); diff --git a/rtgui/options.cc b/rtgui/options.cc index 43159cec8..a46ec9f90 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -74,11 +74,7 @@ inline bool Options::checkProfilePath(Glib::ustring &path) p = getGlobalProfilePath(); - if (!p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS)) { - return true; - } else { - return false; - } + return !p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS); } bool Options::checkDirPath(Glib::ustring &path, Glib::ustring errString) @@ -2324,7 +2320,7 @@ bool Options::load () void Options::save () { - if (options.multiUser == false) { + if (!options.multiUser) { options.saveToFile (Glib::build_filename(argv0, "options")); } else { options.saveToFile (Glib::build_filename(rtdir, "options")); diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index e5e100ba5..601103fa8 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -88,9 +88,9 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) previewL->set_active (false); previewFocusMask->set_active (false); - backColor0->set_active (options.bgcolor == 0 ? true : false); - backColor1->set_active (options.bgcolor == 1 ? true : false); - backColor2->set_active (options.bgcolor == 2 ? true : false); + backColor0->set_active (options.bgcolor == 0); + backColor1->set_active (options.bgcolor == 1); + backColor2->set_active (options.bgcolor == 2); vbbackColor = Gtk::manage (new Gtk::VBox ()); vbbackColor->set_border_width (0); diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index f51a460b8..ad1cfccc3 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -153,20 +153,12 @@ ProfilePanel::~ProfilePanel () bool ProfilePanel::isCustomSelected() { - if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")")) { - return true; - } - - return false; + return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")"); } bool ProfilePanel::isLastSavedSelected() { - if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")")) { - return true; - } - - return false; + return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"); } Gtk::TreeIter ProfilePanel::getCustomRow() From 172ab63b859acb13b19b8474dc94e061cb5d75cc Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 13 Oct 2016 01:34:02 +0200 Subject: [PATCH 052/115] Cppcheck: Fixed another bunch of warnings --- rtengine/camconst.cc | 16 +++++++++++++--- rtengine/color.cc | 6 ++---- rtengine/ipretinex.cc | 11 +++++------ rtengine/processingjob.h | 2 +- rtengine/rawimage.cc | 1 + rtengine/rawimagesource.cc | 34 +++++++++++++--------------------- rtengine/rawimagesource.h | 2 +- rtengine/rawimagesource_i.h | 10 +++++----- rtengine/rtthumbnail.h | 2 +- rtengine/shmap.cc | 2 +- rtengine/stdimagesource.cc | 2 +- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index c7a6412be..8b8ce099d 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -558,10 +558,20 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) while ((ret = fread(&buf[datasize], 1, bufsize - datasize, stream)) != 0) { datasize += ret; - if (datasize == bufsize) { + if (datasize == bufsize) { // we need more memory bufsize += increment; - buf = (char *)realloc(buf, bufsize); - increment *= 2; + void *temp = realloc(buf, bufsize); // try to realloc buffer with new size + if(!temp) { // realloc failed + temp = malloc(bufsize); // alloc now buffer + if (temp) { // alloc worked + memcpy(temp, buf, bufsize - increment); // copy old buffer content to new buffer + free(buf); // free old buffer + } else { // alloc didn't work, break + break; + } + } + buf = (char *)temp; // assign new buffer + increment *= 2; // double increment } } diff --git a/rtengine/color.cc b/rtengine/color.cc index 6dda2c8b8..4982d36b5 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -542,7 +542,7 @@ void Color::rgb2hsl(float r, float g, float b, float &h, float &s, float &l) h_ = 4. + (var_R - var_G) / C; } - h = float(h_ /= 6.0); + h = float(h_ / 6.0); if ( h < 0.f ) { h += 1.f; @@ -923,7 +923,7 @@ void Color::hsv2rgb (float h, float s, float v, int &r, int &g, int &b) r1 = t; g1 = p; b1 = v; - } else if (i == 5) { + } else /*if (i == 5)*/ { r1 = v; g1 = p; b1 = q; @@ -1996,7 +1996,6 @@ void Color::skinred ( double J, double h, double sres, double Sp, float dred, fl float factorskin, factorsat, factor, factorskinext, interm; float scale = 100.0f / 100.1f; //reduction in normal zone float scaleext = 1.0f; //reduction in transition zone - float protect_redh; float deltaHH = 0.3f; //HH value transition : I have choice 0.3 radians float HH; bool doskin = false; @@ -2077,7 +2076,6 @@ void Color::skinredfloat ( float J, float h, float sres, float Sp, float dred, f if(doskin) { float factorskin, factorsat, factor, factorskinext; - float protect_redh; float deltaHH = 0.3f; //HH value transition : I have choice 0.3 radians float chromapro = sres / Sp; diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index 06f779875..2dbdbafb1 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -140,8 +140,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e { if (deh.enabled) {//enabled - float mean, stddv, maxtr, mintr; - float delta; + float maxtr, mintr; constexpr float eps = 2.f; bool useHsl = deh.retinexcolorspace == "HSLLOG"; bool useHslLin = deh.retinexcolorspace == "HSLLIN"; @@ -551,8 +550,8 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e delete [] buffer; delete [] srcBuffer; - mean = 0.f; - stddv = 0.f; + float mean = 0.f; + float stddv = 0.f; // I call mean_stddv2 instead of mean_stddv ==> logBetaGain mean_stddv2( luminance, mean, stddv, W_L, H_L, maxtr, mintr); @@ -658,7 +657,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e maxi = maxtr - epsil; } - delta = maxi - mini; + float delta = maxi - mini; //printf("maxi=%f mini=%f mean=%f std=%f delta=%f maxtr=%f mintr=%f\n", maxi, mini, mean, stddv, delta, maxtr, mintr); if ( !delta ) { @@ -691,7 +690,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e // I call mean_stddv2 instead of mean_stddv ==> logBetaGain mean_stddv2( luminance, mean, stddv, W_L, H_L, maxtr, mintr); - float asig, bsig, amax, bmax, amin, bmin; + float asig = 0.f, bsig = 0.f, amax = 0.f, bmax = 0.f, amin = 0.f, bmin = 0.f; if (dehagaintransmissionCurve && mean != 0.f && stddv != 0.f) { //if curve asig = 0.166666f / stddv; diff --git a/rtengine/processingjob.h b/rtengine/processingjob.h index fbf56234f..0613ccdeb 100644 --- a/rtengine/processingjob.h +++ b/rtengine/processingjob.h @@ -37,7 +37,7 @@ public: : fname(fn), isRaw(iR), initialImage(NULL), pparams(pp) {} ProcessingJobImpl (InitialImage* iImage, const procparams::ProcParams& pp) - : fname(""), initialImage(iImage), pparams(pp) + : fname(""), isRaw(true), initialImage(iImage), pparams(pp) { iImage->increaseRef(); } diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 8f91f8f4b..cb1c2a9c9 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -25,6 +25,7 @@ RawImage::RawImage( const Glib::ustring &name ) , filename(name) , profile_data(NULL) , allocation(NULL) + , rotate_deg(0) { memset(maximum_c4, 0, sizeof(maximum_c4)); RT_matrix_from_constant = 0; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 31deac244..8c44f8fc4 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1453,10 +1453,9 @@ void RawImageSource::getFullSize (int& w, int& h, int tr) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void RawImageSource::getSize (int tran, PreviewProps pp, int& w, int& h) +void RawImageSource::getSize (PreviewProps pp, int& w, int& h) { - tran = defTransform (tran); w = pp.w / pp.skip + (pp.w % pp.skip > 0); h = pp.h / pp.skip + (pp.h % pp.skip > 0); } @@ -2123,7 +2122,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar #endif for (; j < W - border; j++) { - float H, S, L; + float L; //rgb=>lab Color::rgb2hslfloat(red[i][j], green[i][j], blue[i][j], conversionBuffer[0][i - border][j - border], conversionBuffer[1][i - border][j - border], L); L *= 32768.f; @@ -2296,7 +2295,6 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC float **temp = conversionBuffer[2]; // one less dereference LUTf dLcurve; LUTu hist16RET; - float val; if(dehacontlutili && histLRETI) { hist16RET(32768); @@ -2369,7 +2367,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC // hist16RET.compressTo(histLRETI); // also remove declaration and init of dLcurve some lines above then and finally remove this comment :) for (int i = 0; i < 32768; i++) { - val = (double)i / 32767.0; + float val = (double)i / 32767.0; dLcurve[i] = val; } @@ -2393,14 +2391,8 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC for (; j < W - border; j++) { - float valp; - // if(chutili) { // c=f(H) - { - valp = float((chcurve->getVal(conversionBuffer[3][i - border][j - border]) - 0.5f)); - - conversionBuffer[1][i - border][j - border] *= (1.f + 2.f * valp); - } - // } + float valp = (chcurve->getVal(conversionBuffer[3][i - border][j - border]) - 0.5f); + conversionBuffer[1][i - border][j - border] *= (1.f + 2.f * valp); } } @@ -2822,7 +2814,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile if(raw.ff_AutoClipControl) { // determine maximum calculated value to avoid clipping - int clipControlGui = 0; +// int clipControlGui = 0; float maxval = 0.f; // xtrans files have only one black level actually, so we can simplify the code a bit #ifdef _OPENMP @@ -2857,7 +2849,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile // there's only one white level for xtrans if(maxval + black[0] > ri->get_white(0)) { limitFactor = ri->get_white(0) / (maxval + black[0]); - clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui +// clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui } } else { limitFactor = max((float)(100 - raw.ff_clipControl) / 100.f, 0.01f); @@ -4202,7 +4194,7 @@ void RawImageSource::HLRecovery_blend(float* rin, float* gin, float* bin, int wi for (int col = 0; col < width; col++) { float rgb[ColorCount], cam[2][ColorCount], lab[2][ColorCount], sum[2], chratio, lratio = 0; - float L, C, H, Lfrac; + float L, C, H; // Copy input pixel to rgb so it's easier to access in loops rgb[0] = rin[col]; @@ -4290,7 +4282,7 @@ void RawImageSource::HLRecovery_blend(float* rin, float* gin, float* bin, int wi bin[col] = L + H / 3.0; if ((L = (rin[col] + gin[col] + bin[col]) / 3) > desatpt) { - Lfrac = max(0.0f, (maxave - L) / (maxave - desatpt)); + float Lfrac = max(0.0f, (maxave - L) / (maxave - desatpt)); C = Lfrac * 1.732050808 * (rin[col] - gin[col]); H = Lfrac * (2 * bin[col] - rin[col] - gin[col]); rin[col] = L - H / 6.0 + C / 3.464101615; @@ -4887,11 +4879,11 @@ ColorTemp RawImageSource::getSpotWB (std::vector &red, std::vectorgetSensorType() != ST_BAYER) { if(ri->getSensorType() == ST_FUJI_XTRANS) { int d[9][2] = {{0, 0}, { -1, -1}, { -1, 0}, { -1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; - double rloc, gloc, bloc; - int rnbrs, gnbrs, bnbrs; for (size_t i = 0; i < red.size(); i++) { transformPosition (red[i].x, red[i].y, tran, x, y); + double rloc, gloc, bloc; + int rnbrs, gnbrs, bnbrs; rloc = gloc = bloc = rnbrs = gnbrs = bnbrs = 0; for (int k = 0; k < 9; k++) { @@ -4959,11 +4951,11 @@ ColorTemp RawImageSource::getSpotWB (std::vector &red, std::vectorget_rotateDegree(); diff --git a/rtengine/rawimagesource_i.h b/rtengine/rawimagesource_i.h index f5685b0ef..4e953becb 100644 --- a/rtengine/rawimagesource_i.h +++ b/rtengine/rawimagesource_i.h @@ -140,7 +140,7 @@ inline void RawImageSource::interpolate_row_g (float* agh, float* agv, int i) inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, float* cg, float* ng, int i) { - if (ri->ISRED(i, 0) || ri->ISRED(i, 1)) { + if ((ri->ISRED(i, 0) || ri->ISRED(i, 1)) && pg && ng) { // RGRGR or GRGRGR line for (int j = 0; j < W; j++) { if (ri->ISRED(i, j)) { @@ -172,7 +172,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, b = cg[j] + b / n; ab[j] = b; - } else { + } else if(ng && pg) { // linear R-G interp. horizontally int r; @@ -199,7 +199,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, ab[j] = b; } } - } else { + } else if(ng && pg) { // BGBGB or GBGBGB line for (int j = 0; j < W; j++) { if (ri->ISBLUE(i, j)) { @@ -265,7 +265,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, float* pg, float* cg, float* ng, int i, float r_mul, float g_mul, float b_mul, int x1, int width, int skip) { - if (ri->ISRED(i, 0) || ri->ISRED(i, 1)) { + if ((ri->ISRED(i, 0) || ri->ISRED(i, 1)) && pg && ng) { // RGRGR or GRGRGR line for (int j = x1, jx = 0; jx < width; j += skip, jx++) { if (ri->ISRED(i, j)) { @@ -324,7 +324,7 @@ inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, flo ab[jx] = b; } } - } else { + } else if(pg && ng) { // BGBGB or GBGBGB line for (int j = x1, jx = 0; jx < width; j += skip, jx++) { if (ri->ISBLUE(i, j)) { diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index bc367522d..18e72fc19 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -107,7 +107,7 @@ public: static ImageIO* resizeToSameType(int nw, int nh, TypeInterpolation interp, ImageIO* srcImg) { - ImageIO* imgPtr; + ImageIO* imgPtr = nullptr; if (srcImg->getType() == sImage8) { Image8* castedSrcImg = static_cast(srcImg); diff --git a/rtengine/shmap.cc b/rtengine/shmap.cc index bb8e96c11..65c1070a2 100644 --- a/rtengine/shmap.cc +++ b/rtengine/shmap.cc @@ -30,7 +30,7 @@ namespace rtengine extern const Settings* settings; -SHMap::SHMap (int w, int h, bool multiThread) : W(w), H(h), multiThread(multiThread) +SHMap::SHMap (int w, int h, bool multiThread) : max_f(0.f), min_f(0.f), avg(0.f), W(w), H(h), multiThread(multiThread) { map = new float*[H]; diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index e422d23b2..3db0d06ac 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -51,7 +51,7 @@ template T** allocArray (int W, int H) } #define HR_SCALE 2 -StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL) +StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL), full(false), max{}, rgbSourceModified(false) { hrmap[0] = NULL; From 362564339233bc5bf7f21b827a63563ebf2b4f84 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 13 Oct 2016 17:37:08 +0200 Subject: [PATCH 053/115] Cppcheck: Fixed bug from last commit. Also added some new fixes --- rtengine/dcrop.cc | 2 +- rtengine/diagonalcurves.cc | 2 +- rtengine/flatcurves.cc | 4 +- rtengine/hlrecovery.cc | 397 ---------------------------------- rtengine/imagesource.h | 2 +- rtengine/improccoordinator.cc | 3 +- rtengine/improcfun.cc | 4 +- rtengine/ipvibrance.cc | 2 +- rtengine/procparams.h | 4 +- rtengine/rawimagesource.cc | 45 ++-- rtengine/rawimagesource.h | 6 - rtengine/stdimagesource.cc | 17 +- rtengine/stdimagesource.h | 4 +- 13 files changed, 44 insertions(+), 448 deletions(-) delete mode 100644 rtengine/hlrecovery.cc diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index ac8b6fc0e..16ec67f57 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -1121,7 +1121,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte PreviewProps cp (orx, ory, orw, orh, skip); int orW, orH; - parent->imgsrc->getSize (tr, cp, orW, orH); + parent->imgsrc->getSize (cp, orW, orH); int cw = SKIPS(bw, skip); int ch = SKIPS(bh, skip); diff --git a/rtengine/diagonalcurves.cc b/rtengine/diagonalcurves.cc index a5505391e..2178e3dac 100644 --- a/rtengine/diagonalcurves.cc +++ b/rtengine/diagonalcurves.cc @@ -245,7 +245,7 @@ void DiagonalCurve::NURBS_set () printf("sc_length[%zu/3]=%f \n", it, sc_length[it / 3]); } - printf("NURBS diagonal curve: error detected!\n i=%d nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f", i, nbr_points, ppn, N, sc_length[i / 3], total_length); + printf("NURBS diagonal curve: error detected!\n i=%u nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f", i, nbr_points, ppn, N, sc_length[i / 3], total_length); exit(0); } diff --git a/rtengine/flatcurves.cc b/rtengine/flatcurves.cc index 5a4dfeacf..ae1a895ff 100644 --- a/rtengine/flatcurves.cc +++ b/rtengine/flatcurves.cc @@ -311,10 +311,10 @@ void FlatCurve::CtrlPoints_set () if (nbr_points < 0) { for(size_t it = 0; it < sc_x.size(); it += 3) { - printf("sc_length[%zd/3]=%f \n", it, sc_length[it / 3]); + printf("sc_length[%zu/3]=%f \n", it, sc_length[it / 3]); } - printf("Flat curve: error detected!\n i=%d k=%d periodic=%d nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f\n", i, k, periodic, nbr_points, ppn, N, sc_length[i / 3], total_length); + printf("Flat curve: error detected!\n i=%u k=%u periodic=%d nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f\n", i, k, periodic, nbr_points, ppn, N, sc_length[i / 3], total_length); exit(0); } diff --git a/rtengine/hlrecovery.cc b/rtengine/hlrecovery.cc deleted file mode 100644 index 4f527b660..000000000 --- a/rtengine/hlrecovery.cc +++ /dev/null @@ -1,397 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ - -namespace rtengine -{ - -template T** allocArray (int W, int H) -{ - - T** t = new T*[H]; - - for (int i = 0; i < H; i++) { - t[i] = new T[W]; - } - - return t; -} - -void RawImageSource::updateHLRecoveryMap (bool needred, bool needgreen, bool needblue, bool full) -{ - - // detect maximal pixel values - unsigned short* red = new unsigned short[W]; - unsigned short* blue = new unsigned short[W]; - int maxr = 0, maxg = 0, maxb = 0; - - for (int i = 32; i < H - 32; i++) { - interpolate_row_rb (red, blue, green[i - 1], green[i], green[i + 1], i); - - for (int j = 32; j < W - 32; j++) { - if (red[j] > maxr) { - maxr = red[j]; - } - - if (green[i][j] > maxg) { - maxg = green[i][j]; - } - - if (blue[j] > maxb) { - maxb = blue[j]; - } - } - } - - delete [] red; - delete [] blue; - - maxr = maxr * 19 / 20; - maxg = maxg * 19 / 20; - maxb = maxb * 19 / 20; - int max[3]; - max[0] = maxr; - max[1] = maxg; - max[2] = maxb; - - if( options.rtSettings.verbose ) { - printf ("HLRecoveryMap Maximum: R: %d, G: %d, B: %d\n", maxr, maxg, maxb); - } - - // downscale image - int dw = W / SCALE; - int dh = H / SCALE; - Image16* ds = new Image16 (dw, dh); - - // overburnt areas - int** rec[3]; - - for (int i = 0; i < 3; i++) { - rec[i] = allocArray (dw, dh); - } - - unsigned short* reds[SCALE]; - unsigned short* blues[SCALE]; - - for (int i = 0; i < SCALE; i++) { - reds[i] = new unsigned short[W]; - blues[i] = new unsigned short[W]; - } - - for (int i = 0; i < dh; i++) { - for (int j = 0; j < SCALE; j++) { - interpolate_row_rb (reds[j], blues[j], green[SCALE * i + j - 1], green[SCALE * i + j], green[SCALE * i + j + 1], SCALE * i + j); - } - - for (int j = 0; j < dw; j++) { - int sumr = 0; - int cr = 0; - int sumg = 0; - int cg = 0; - int sumb = 0; - int cb = 0; - - for (int x = 0; x < SCALE; x++) - for (int y = 0; y < SCALE; y++) { - int ix = SCALE * i + x; - int jy = SCALE * j + y; - sumr += reds[x][jy]; - - if (reds[x][jy] < maxr) { - cr++; - } - - sumg += green[ix][jy]; - - if (green[ix][jy] < maxg) { - cg++; - } - - sumb += blues[x][jy]; - - if (blues[x][jy] < maxb) { - cb++; - } - } - - if (cr < SCALE * SCALE && needred) { - rec[0][i][j] = INT_MAX; - } else { - rec[0][i][j] = sumr / SCALE / SCALE; - } - - if (cg < SCALE * SCALE && needgreen) { - rec[1][i][j] = INT_MAX; - } else { - rec[1][i][j] = sumg / SCALE / SCALE; - } - - if (cb < SCALE * SCALE && needblue) { - rec[2][i][j] = INT_MAX; - } else { - rec[2][i][j] = sumb / SCALE / SCALE; - } - - ds->r(i, j) = sumr / SCALE / SCALE; - ds->g(i, j) = sumg / SCALE / SCALE; - ds->b(i, j) = sumb / SCALE / SCALE; - } - } - - for (int i = 0; i < SCALE; i++) { - delete [] reds[i]; - delete [] blues[i]; - } - - - // STEP I. recover color from the partially lost areas - bool phase2 = false; - - for (int k = 0; k < 400; k++) { - if (k > 200) { - phase2 = true; - } - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) { - for (int c = 0; c < 3; c++) { - // if channel c is lost - if (rec[c][i][j] == INT_MAX) { - double ratio[2] = {0.0, 0.0}; - double w[2] = {0.0, 0.0}; - int count[2] = {0, 0}; - int ix = 0; - - for (int m = 0; m < 3; m++) { - if (m == c) { - continue; - } - - // if channel m is not lost at this point (or already recovered) - if (rec[m][i][j] != INT_MAX && rec[m][i][j] >= 0) { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) - - // average m/c color ratios in the surrounding pixels - if (rec[m][i + x][j + y] >= 0 && rec[m][i + x][j + y] != INT_MAX && rec[c][i + x][j + y] > 0 && rec[c][i + x][j + y] != INT_MAX) { - double ww = 1.0; - - if (!phase2 && (/*(double)(rec[m][i+x][j+y] - rec[m][i][j])/max[m]*(rec[m][i+x][j+y] - rec[m][i][j])/max[m] > 1.0/2 || */rec[c][i + x][j + y] < max[c] * 3 / 4)) { - continue; - } - - w[ix] += ww; - ratio[ix] += ww * rec[m][i + x][j + y] / rec[c][i + x][j + y]; - count[ix] ++; - } - } - - ix++; - } - - // compute new pixel values from the surrounding color ratios - double newc = 0.0; - int nc = 0; - ix = 0; - - for (int m = 0; m < 3; m++) { - if (c == m) { - continue; - } - - if (count[ix]) { - newc += (double)rec[m][i][j] / ratio[ix] * w[ix]; - nc++; - } - - ix++; - } - - if (nc) { - rec[c][i][j] = - (int) (newc / nc); - } - } - } - } - - bool change = false; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - for (int c = 0; c < 3; c++) { - if (rec[c][i][j] < 0) { - rec[c][i][j] = -rec[c][i][j]; - } - - change = true; - } - - if (!change) { - break; - } - } - - printf ("Phase1 vege\n"); - - // STEP II. recover fully lost pixels - if (full) { - int maxY = (299 * max[0] + 587 * max[1] + 114 * max[2]) / 1000; - phase2 = false; - - for (int k = 0; k < 600; k++) { - if (k > 200) { - phase2 = true; - } - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) { - if (rec[0][i][j] == INT_MAX || rec[1][i][j] == INT_MAX || rec[2][i][j] == INT_MAX) { - int count = 0; - double yavg = 0, iavg = 0, qavg = 0, weight = 0.0; - - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) - if (rec[0][i + x][j + y] > 0 && rec[0][i + x][j + y] != INT_MAX && rec[1][i + x][j + y] > 0 && rec[1][i + x][j + y] != INT_MAX && rec[2][i + x][j + y] > 0 && rec[2][i + x][j + y] != INT_MAX) { - // convert to yiq - double Y = 0.299 * rec[0][i + x][j + y] + 0.587 * rec[1][i + x][j + y] + 0.114 * rec[2][i + x][j + y]; - double I = 0.596 * rec[0][i + x][j + y] - 0.275 * rec[1][i + x][j + y] - 0.321 * rec[2][i + x][j + y]; - double Q = 0.212 * rec[0][i + x][j + y] - 0.523 * rec[1][i + x][j + y] + 0.311 * rec[2][i + x][j + y]; - - if (Y > maxY * 7 / 10) { - double w = 1.0;// / (I*I+Q*Q); - yavg += Y * w; - iavg += I * w; - qavg += Q * w; - weight += w; - count++; - } - } - - if ((!phase2 && count > 5) || (phase2 && count > 3)) { - double Y = yavg / weight; - double I = iavg / weight; - double Q = qavg / weight; - rec[0][i][j] = - (Y + 0.956 * I + 0.621 * Q); - rec[1][i][j] = - (Y - 0.272 * I - 0.647 * Q); - rec[2][i][j] = - (Y - 1.105 * I + 1.702 * Q); - } - } - - } - - bool change = false; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - for (int c = 0; c < 3; c++) { - if (rec[c][i][j] < 0) { - rec[c][i][j] = -rec[c][i][j]; - } - - change = true; - } - - if (!change) { - break; - } - } - } - - int maxval = 0; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - for (int c = 0; c < 3; c++) - if (rec[c][i][j] != INT_MAX && rec[c][i][j] > maxval) { - maxval = rec[c][i][j]; - } - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - if (rec[0][i][j] == INT_MAX || rec[1][i][j] == INT_MAX || rec[2][i][j] == INT_MAX) { - rec[0][i][j] = maxval; - rec[1][i][j] = maxval; - rec[2][i][j] = maxval; - } - - if (hrmap[0] != NULL) { - freeArray (hrmap[0], dh); - freeArray (hrmap[1], dh); - freeArray (hrmap[2], dh); - } - - hrmap[0] = allocArray (dw, dh); - hrmap[1] = allocArray (dw, dh); - hrmap[2] = allocArray (dw, dh); - - this->full = full; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) { - hrmap[0][i][j] = (double)rec[0][i][j] / ds->r(i, j); - hrmap[1][i][j] = (double)rec[1][i][j] / ds->g(i, j); - hrmap[2][i][j] = (double)rec[2][i][j] / ds->b(i, j); - } - - /* for (int i=0; ir(i,j) = CLIP (rec[0][i][j]); - ds->g(i,j) = CLIP (rec[1][i][j]); - ds->b(i,j) = CLIP (rec[2][i][j]); - } - ds->save ("test.png"); - */ - delete ds; - freeArray (rec[0], dh); - freeArray (rec[1], dh); - freeArray (rec[2], dh); - - printf ("HLMap vege\n"); -} - -void RawImageSource::hlRecovery (unsigned short* red, unsigned short* green, unsigned short* blue, int i, int sx1, int sx2, int skip) -{ - - int blr = (i + SCALE / 2) / SCALE - 1; - - if (blr < 0 || blr >= H / SCALE - 1) { - return; - } - - double mr1 = 1.0 - ((double)((i + SCALE / 2) % SCALE) / SCALE + 0.5 / SCALE); - int jx = 0; - int maxcol = W / SCALE; - - for (int j = sx1, jx = 0; j < sx2; j += skip, jx++) { - int blc = (j + SCALE / 2) / SCALE - 1; - - if (blc < 0 || blc >= maxcol - 1) { - continue; - } - - double mc1 = 1.0 - ((double)((j + SCALE / 2) % SCALE) / SCALE + 0.5 / SCALE); - double mulr = mr1 * mc1 * hrmap[0][blr][blc] + mr1 * (1.0 - mc1) * hrmap[0][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[0][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[0][blr + 1][blc + 1]; - double mulg = mr1 * mc1 * hrmap[1][blr][blc] + mr1 * (1.0 - mc1) * hrmap[1][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[1][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[1][blr + 1][blc + 1]; - double mulb = mr1 * mc1 * hrmap[2][blr][blc] + mr1 * (1.0 - mc1) * hrmap[2][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[2][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[2][blr + 1][blc + 1]; - red[jx] = CLIP(red[jx] * mulr); - green[jx] = CLIP(green[jx] * mulg); - blue[jx] = CLIP(blue[jx] * mulb); - } -} -} - diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 65b2b76c0..f69a33e33 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -100,7 +100,7 @@ public: } virtual void getFullSize (int& w, int& h, int tr = TR_NONE) {} - virtual void getSize (int tran, PreviewProps pp, int& w, int& h) {} + virtual void getSize (PreviewProps pp, int& w, int& h) = 0; virtual int getRotateDegree() const { return 0; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 20eea3011..89a28be50 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -37,6 +37,7 @@ ImProcCoordinator::ImProcCoordinator () highDetailPreprocessComputed(false), highDetailRawComputed(false), allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), + ctColorCurve(), hltonecurve(65536), shtonecurve(65536), tonecurve(65536, 0), //,1); @@ -901,7 +902,7 @@ void ImProcCoordinator::setScale (int prevscale) do { prevscale--; PreviewProps pp (0, 0, fw, fh, prevscale); - imgsrc->getSize (tr, pp, nW, nH); + imgsrc->getSize (pp, nW, nH); } while(nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // sctually hardcoded values, perhaps a better choice is possible if (settings->verbose) { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b170ba52f..1ef20b3b4 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -6159,8 +6159,8 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu if (settings->verbose) { t2e.set(); printf("Color::AllMunsellLch (correction performed in %d usec):\n", t2e.etime(t1e)); - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%i\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); - printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%i\n", MunsDebugInfo->maxdhuelum[0], MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); + printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhuelum[0], MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); } delete MunsDebugInfo; diff --git a/rtengine/ipvibrance.cc b/rtengine/ipvibrance.cc index 1d152c737..ed944e62e 100644 --- a/rtengine/ipvibrance.cc +++ b/rtengine/ipvibrance.cc @@ -744,7 +744,7 @@ void ImProcFunctions::vibrance (LabImage* lab) printf(" Gamut: G1negat=%iiter G165535=%iiter G2negsat=%iiter G265535=%iiter\n", negat, moreRGB, negsat, moresat); if (MunsDebugInfo) { - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%i\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index d51c032c0..82fc90396 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -65,9 +65,7 @@ public: protected: bool initEq1; bool _isDouble; -#ifndef NDEBUG - unsigned int part[5]; -#endif + public: Threshold (T bottom, T top, bool startAtOne) { diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 8c44f8fc4..9a6358bda 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -423,6 +423,7 @@ extern const Settings* settings; RawImageSource::RawImageSource () : ImageSource() + , W(0), H(0) , plistener(NULL) , border(4) , ri(NULL) @@ -431,17 +432,40 @@ RawImageSource::RawImageSource () , green(0, 0) , red(0, 0) , blue(0, 0) + , lc00(0.0) + , lc01(0.0) + , lc02(0.0) + , lc10(0.0) + , lc11(0.0) + , lc12(0.0) + , lc20(0.0) + , lc21(0.0) + , lc22(0.0) + , hlmax{} + , clmax{} + , chmax{} + , scale_mul{} + , c_black{} + , c_white{} + , cblacksom{} + , ref_pre_mul{} + , refwb_red(0.0) + , refwb_green(0.0) + , refwb_blue(0.0) + , rgb_cam{} + , cam_rgb{} + , xyz_cam{} + , cam_xyz{} + , fuji(false) + , d1x(false) + , initialGain(0.0) + , camInitialGain(0.0) + , defGain(0.0) + , threshold(0) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; - //needhr = NULL; - //hpmap = NULL; camProfile = NULL; embProfile = NULL; rgbSourceModified = false; - hlmax[0] = hlmax[1] = hlmax[2] = hlmax[3] = 0.f; - clmax[0] = clmax[1] = clmax[2] = clmax[3] = 0.f; } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -462,13 +486,6 @@ RawImageSource::~RawImageSource () delete [] cache; } - if (hrmap[0] != NULL) { - int dh = H / HR_SCALE; - freeJaggedArray(hrmap[0]); - freeJaggedArray(hrmap[1]); - freeJaggedArray(hrmap[2]); - } - if (camProfile) { cmsCloseProfile (camProfile); } diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 9ef17ee0d..ed2e5ee76 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -63,17 +63,11 @@ protected: bool fuji; bool d1x; int border; - //char** hpmap; - float** hrmap[3]; // for color propagation - char** needhr; // for color propagation - int max_3[3]; float chmax[4], hlmax[4], clmax[4]; double initialGain; // initial gain calculated after scale_colors double camInitialGain; double defGain; - bool full; cmsHPROFILE camProfile; - cmsHPROFILE embProfile; bool rgbSourceModified; RawImage* ri; // Copy of raw pixels, NOT corrected for initial gain, blackpoint etc. diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index 3db0d06ac..826c8a49b 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -54,10 +54,6 @@ template T** allocArray (int W, int H) StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL), full(false), max{}, rgbSourceModified(false) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; - needhr = NULL; embProfile = NULL; idata = NULL; } @@ -67,17 +63,6 @@ StdImageSource::~StdImageSource () delete idata; - if (hrmap[0] != NULL) { - int dh = img->getH() / HR_SCALE; - freeArray(hrmap[0], dh); - freeArray(hrmap[1], dh); - freeArray(hrmap[2], dh); - } - - if (needhr) { - freeArray(needhr, img->getH()); - } - if (img) { delete img; } @@ -311,7 +296,7 @@ void StdImageSource::getFullSize (int& w, int& h, int tr) } } -void StdImageSource::getSize (int tran, PreviewProps pp, int& w, int& h) +void StdImageSource::getSize (PreviewProps pp, int& w, int& h) { w = pp.w / pp.skip + (pp.w % pp.skip > 0); diff --git a/rtengine/stdimagesource.h b/rtengine/stdimagesource.h index 048f3b3c0..509e03dc5 100644 --- a/rtengine/stdimagesource.h +++ b/rtengine/stdimagesource.h @@ -32,8 +32,6 @@ protected: ColorTemp wb; ProgressListener* plistener; bool full; - float** hrmap[3]; - char** needhr; int max[3]; bool rgbSourceModified; @@ -66,7 +64,7 @@ public: } void getFullSize (int& w, int& h, int tr = TR_NONE); - void getSize (int tran, PreviewProps pp, int& w, int& h); + void getSize (PreviewProps pp, int& w, int& h); ImageData* getImageData () { From 81421db9c9df90e54a182d31e6a475537bceab4a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 13 Oct 2016 22:15:33 +0200 Subject: [PATCH 054/115] Cppcheck: some fixes --- rtengine/rawimagesource.cc | 2 +- rtengine/utils.cc | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 9a6358bda..978cea36f 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -3933,7 +3933,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam lcmsMutex->unlock (); } - TMatrix toxyz, torgb; + TMatrix toxyz = {}, torgb = {}; if (!working_space_is_prophoto) { toxyz = iccStore->workingSpaceMatrix ("ProPhoto"); diff --git a/rtengine/utils.cc b/rtengine/utils.cc index 2366f3a0c..b862e290f 100644 --- a/rtengine/utils.cc +++ b/rtengine/utils.cc @@ -168,9 +168,7 @@ void rotate (unsigned char* img, int& w, int& h, int deg) rotated[3 * (j * h + h - i - 1) + 2] = img[ix++]; } - int tmp = w; - w = h; - h = tmp; + std::swap(w,h); } else if (deg == 270) { for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) { @@ -179,10 +177,8 @@ void rotate (unsigned char* img, int& w, int& h, int deg) rotated[3 * (h * (w - j - 1) + i) + 2] = img[ix++]; } - int tmp = w; - w = h; - h = tmp; - } else if (deg == 180) + std::swap(w,h); + } else /*if (deg == 180) */ for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) { rotated[3 * (w * (h - i - 1) + w - j - 1) + 0] = img[ix++]; From 8f2f4e0870e68c73c0d786de7e57be6ab050c51a Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 16 Oct 2016 14:19:59 +0200 Subject: [PATCH 055/115] Enhanced ConnectionBlocker class, now used in ToolBar class --- rtgui/guiutils.h | 16 +++- rtgui/toolbar.cc | 185 +++++++++++------------------------------------ 2 files changed, 55 insertions(+), 146 deletions(-) diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index 1b9c298ca..e8f26bb12 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -80,16 +80,24 @@ public: class ConnectionBlocker { public: - explicit ConnectionBlocker (sigc::connection& connection) : connection (connection) + explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr) { - wasBlocked = connection.block(); + if (this->connection) { + wasBlocked = connection.block(); + } + } + explicit ConnectionBlocker (sigc::connection& connection) : connection (&connection) + { + wasBlocked = connection.block(); } ~ConnectionBlocker () { - connection.block(wasBlocked); + if (connection) { + connection->block(wasBlocked); + } } private: - sigc::connection& connection; + sigc::connection *connection; bool wasBlocked; }; diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index 86604863e..703af5a08 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -110,20 +110,15 @@ ToolBar::~ToolBar () void ToolBar::setTool (ToolMode tool) { - bool handWasBlocked = handConn.block (true); - bool cropWasBlocked = cropConn.block (true); - bool wbWasBlocked = true, cpWasBlocked = true; + bool stopEdit; - if (wbTool) { - wbWasBlocked = wbConn.block (true); - } - if (colPickerTool) { - cpWasBlocked = cpConn.block (true); - } + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); - bool straWasBlocked = straConn.block (true); - - bool stopEdit = tool == TMHand && handTool->get_active() && editingMode; + stopEdit = tool == TMHand && handTool->get_active() && editingMode; handTool->set_active (false); @@ -156,17 +151,7 @@ void ToolBar::setTool (ToolMode tool) current = tool; - if (!handWasBlocked) handConn.block (false); - if (!cropWasBlocked) cropConn.block (false); - - if (wbTool) { - if (!wbWasBlocked) wbConn.block (false); } - if (colPickerTool) { - if (!cpWasBlocked) cpConn.block (false); - } - - if (!straWasBlocked) straConn.block (false); if (stopEdit) { stopEditMode(); @@ -180,18 +165,11 @@ void ToolBar::setTool (ToolMode tool) void ToolBar::startEditMode() { if (!editingMode) { - bool handWasBlocked = handConn.block (true); - bool cropWasBlocked = cropConn.block (true); - bool wbWasBlocked = true, cpWasBlocked = true; - if (colPickerTool) { - cpWasBlocked = cpConn.block (true); - } - - if (wbTool) { - wbWasBlocked = wbConn.block (true); - } - - bool straWasBlocked = straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (current != TMHand) { if (colPickerTool) { @@ -207,16 +185,7 @@ void ToolBar::startEditMode() } handTool->set_active (true); - if (!handWasBlocked) handConn.block (false); - if (!cropWasBlocked) cropConn.block (false); - if (colPickerTool) { - if (!cpWasBlocked) cpConn.block (false); } - if (wbTool) { - if (!wbWasBlocked) wbConn.block (false); - } - - if (!straWasBlocked) straConn.block (false); editingMode = true; handTool->set_image(*editinghandimg); @@ -240,19 +209,11 @@ void ToolBar::stopEditMode() void ToolBar::hand_pressed () { - - bool handWasBlocked = handConn.block (true); - bool cropWasBlocked = cropConn.block (true); - bool wbWasBlocked = true, cpWasBlocked = true; - if (colPickerTool) { - cpWasBlocked = cpConn.block (true); - } - - if (wbTool) { - wbWasBlocked = wbConn.block (true); - } - - bool straWasBlocked = straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (editingMode) { stopEditMode(); @@ -274,16 +235,8 @@ void ToolBar::hand_pressed () } handTool->set_active (true); - if (!handWasBlocked) handConn.block (false); - if (!cropWasBlocked) cropConn.block (false); - if (colPickerTool) { - if (!cpWasBlocked) cpConn.block (false); - } - if (wbTool) { - if (!wbWasBlocked) wbConn.block (false); - } - if (!straWasBlocked) straConn.block (false); + } if (listener) { listener->toolSelected (TMHand); @@ -292,18 +245,11 @@ void ToolBar::hand_pressed () void ToolBar::wb_pressed () { - - bool handWasBlocked = handConn.block (true); - bool cropWasBlocked = cropConn.block (true); - bool wbWasBlocked = true, cpWasBlocked = true; - if (colPickerTool) { - cpWasBlocked = cpConn.block (true); - } - if (wbTool) { - wbWasBlocked = wbConn.block (true); - } - - bool straWasBlocked = straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (current != TMSpotWB) { if (editingMode) { @@ -325,16 +271,7 @@ void ToolBar::wb_pressed () wbTool->set_active (true); } - if (!handWasBlocked) handConn.block (false); - if (!cropWasBlocked) cropConn.block (false); - if (colPickerTool) { - if (!cpWasBlocked) cpConn.block (false); } - if (wbTool) { - if (!wbWasBlocked) wbConn.block (false); - } - - if (!straWasBlocked) straConn.block (false); if (listener) { listener->toolSelected (TMSpotWB); @@ -345,15 +282,11 @@ void ToolBar::colPicker_pressed (GdkEventButton* event) { if (event->button == 1) { - bool handWasBlocked = handConn.block (true); - bool cropWasBlocked = cropConn.block (true); - bool wbWasBlocked = true; - bool cpWasBlocked = cpConn.block (true); - if (wbTool) { - wbWasBlocked = wbConn.block (true); - } - - bool straWasBlocked = straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn); cropTool->set_active (false); if (wbTool) { @@ -382,11 +315,7 @@ void ToolBar::colPicker_pressed (GdkEventButton* event) current = TMHand; } - if (!handWasBlocked) handConn.block (false); - if (!cropWasBlocked) cropConn.block (false); - if (!cpWasBlocked) cpConn.block (false); - if (!wbWasBlocked) wbConn.block (false); - if (!straWasBlocked) straConn.block (false); + } if (listener) { listener->toolSelected (current); @@ -394,14 +323,12 @@ void ToolBar::colPicker_pressed (GdkEventButton* event) } else if (event->button == 3) { if (current == TMColorPicker) { // Disabling the Picker tool and entering into the "invisible pickers" mode - bool cpWasBlocked = cpConn.block (true); - bool handWasBlocked = handConn.block (true); + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker cpWasBlocked(cpConn); handTool->set_active (true); colPickerTool->set_active (false); current = TMHand; showColorPickers(false); - if (!cpWasBlocked) cpConn.block (false); - if (!handWasBlocked) handConn.block (false); } else { // The Picker tool is already disabled, entering into the "invisible pickers" mode switchColorPickersVisibility(); @@ -433,19 +360,11 @@ void ToolBar::switchColorPickersVisibility() void ToolBar::crop_pressed () { - - bool handWasBlocked = handConn.block (true); - bool cropWasBlocked = cropConn.block (true); - bool wbWasBlocked = true, cpWasBlocked = true; - if (colPickerTool) { - cpWasBlocked = cpConn.block(true); - } - - if (wbTool) { - wbWasBlocked = wbConn.block (true); - } - - bool straWasBlocked = straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (current != TMCropSelect) { if (editingMode) { @@ -468,11 +387,8 @@ void ToolBar::crop_pressed () cropTool->set_active (true); cropTool->grab_focus (); - if (!handWasBlocked) handConn.block (false); - if (!cropWasBlocked) cropConn.block (false); - if (!cpWasBlocked) cpConn.block(false); - if (!wbWasBlocked) wbConn.block (false); - if (!straWasBlocked) straConn.block (false); + + } if (listener) { listener->toolSelected (TMCropSelect); @@ -481,19 +397,11 @@ void ToolBar::crop_pressed () void ToolBar::stra_pressed () { - - bool handWasBlocked = handConn.block (true); - bool cropWasBlocked = cropConn.block (true); - bool wbWasBlocked = true, cpWasBlocked = true; - if (colPickerTool) { - cpWasBlocked = cpConn.block (true); - } - - if (wbTool) { - wbWasBlocked = wbConn.block (true); - } - - bool straWasBlocked = straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (current != TMStraighten) { if (editingMode) { @@ -515,16 +423,9 @@ void ToolBar::stra_pressed () } straTool->set_active (true); - if (!handWasBlocked) handConn.block (false); - if (!cropWasBlocked) cropConn.block (false); - if (!cpWasBlocked) cpConn.block (false); - if (wbTool) { - if (!wbWasBlocked) wbConn.block (false); } - if (!straWasBlocked) straConn.block (false); - if (listener) { listener->toolSelected (TMStraighten); } From 8df2df664f177d648c08b64dab34794b9ce3d198 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 17 Oct 2016 18:49:15 +0200 Subject: [PATCH 056/115] Cppcheck: some fixes --- rtengine/CA_correct_RT.cc | 8 ++--- rtengine/EdgePreservingDecomposition.cc | 40 ++++++++++++------------- rtengine/EdgePreservingDecomposition.h | 10 +++---- rtengine/cfa_linedn_RT.cc | 11 ++++--- rtengine/improccoordinator.cc | 4 +-- rtengine/myfile.cc | 4 ++- rtengine/rtthumbnail.cc | 1 + rtgui/options.cc | 7 +---- rtgui/options.h | 4 --- 9 files changed, 40 insertions(+), 49 deletions(-) diff --git a/rtengine/CA_correct_RT.cc b/rtengine/CA_correct_RT.cc index 64bb19113..7c28801ae 100644 --- a/rtengine/CA_correct_RT.cc +++ b/rtengine/CA_correct_RT.cc @@ -156,11 +156,9 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons const int vblsz = ceil((float)(height + border2) / (ts - border2) + 2 + vz1); const int hblsz = ceil((float)(width + border2) / (ts - border2) + 2 + hz1); - char *buffer1 = (char *) calloc(vblsz * hblsz * (2 * 2 + 1), sizeof(float)); - //block CA shift values and weight assigned to block - float *blockwt = (float*)buffer1; - float (*blockshifts)[2][2] = (float (*)[2][2])(buffer1 + (vblsz * hblsz * sizeof(float))); + float* const blockwt = static_cast(calloc(vblsz * hblsz * (2 * 2 + 1), sizeof(float))); + float (*blockshifts)[2][2] = (float (*)[2][2])(blockwt + vblsz * hblsz); double fitparams[2][2][16]; @@ -1013,7 +1011,7 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons } free(Gtmp); - free(buffer1); + free(blockwt); free(RawDataTmp); if(plistener) { diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 06fe38f2b..c80d5e092 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -17,20 +17,20 @@ calculates A x where x is some vector. Stops when rms residual < RMSResidual or Stops at n iterates if MaximumIterates = 0 since that many iterates gives exact solution. Applicable to symmetric positive definite problems only, which is what unconstrained smooth optimization pretty much always is. Parameter pass can be passed through, containing whatever info you like it to contain (matrix info?). -Takes less memory with OkToModify_b = true, and Preconditioner = NULL. */ +Takes less memory with OkToModify_b = true, and Preconditioner = nullptr. */ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b, float *x, float RMSResidual, void *Pass, int MaximumIterates, void Preconditioner(float *Product, float *x, void *Pass)) { int iterate, i; - char* buffer = (char*)malloc(2 * n * sizeof(float) + 128); - float *r = (float*)(buffer + 64); + float* buffer = (float*)malloc(2 * n * sizeof(float) + 128); + float *r = (buffer + 16); //Start r and x. - if(x == NULL) { + if(x == nullptr) { x = new float[n]; - memset(x, 0, sizeof(float)*n); //Zero initial guess if x == NULL. + memset(x, 0, sizeof(float)*n); //Zero initial guess if x == nullptr. memcpy(r, b, sizeof(float)*n); } else { Ax(r, x, Pass); @@ -46,7 +46,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl //s is preconditionment of r. Without, direct to r. float *s = r, rs = 0.0f; - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { s = new float[n]; Preconditioner(s, r, Pass); @@ -61,7 +61,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl } //Search direction d. - float *d = (float*)(buffer + n * sizeof(float) + 128); + float *d = (buffer + n + 32); memcpy(d, s, sizeof(float)*n); @@ -114,7 +114,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl break; } - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { Preconditioner(s, r, Pass); } @@ -185,7 +185,7 @@ MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int Nu { n = Dimension; m = NumberOfDiagonalsInLowerTriangle; - IncompleteCholeskyFactorization = NULL; + IncompleteCholeskyFactorization = nullptr; Diagonals = new float *[m]; StartRows = new int [m + 1]; @@ -196,7 +196,7 @@ MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int Nu MultiDiagonalSymmetricMatrix::~MultiDiagonalSymmetricMatrix() { - if(DiagBuffer != NULL) { + if(DiagBuffer != nullptr) { free(buffer); } else for(int i = 0; i < m; i++) { @@ -216,12 +216,12 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) if(index == 0) { buffer = (char*)calloc( (n + padding) * m * sizeof(float) + (m + 16) * 64 + 63, 1); - if(buffer == NULL) + if(buffer == nullptr) // no big memory block available => try to allocate smaller blocks { - DiagBuffer = NULL; + DiagBuffer = nullptr; } else { - DiagBuffer = (char*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); + DiagBuffer = (float*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); } } @@ -236,12 +236,12 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) return false; } - if(DiagBuffer != NULL) { - Diagonals[index] = (float*)(DiagBuffer + (index * (n + padding) * sizeof(float)) + ((index + 16) * 64)); + if(DiagBuffer != nullptr) { + Diagonals[index] = (DiagBuffer + (index * (n + padding)) + ((index + 16) * 16)); } else { Diagonals[index] = new float[DiagonalLength(StartRow)]; - if(Diagonals[index] == NULL) { + if(Diagonals[index] == nullptr) { printf("Error in MultiDiagonalSymmetricMatrix::CreateDiagonal: memory allocation failed. Out of memory?\n"); return false; } @@ -673,7 +673,7 @@ EdgePreservingDecomposition::EdgePreservingDecomposition(int width, int height) A->CreateDiagonal(3, w) && A->CreateDiagonal(4, w + 1))) { delete A; - A = NULL; + A = nullptr; printf("Error in EdgePreservingDecomposition construction: out of memory.\n"); } else { a0 = A->Diagonals[0]; @@ -692,7 +692,7 @@ EdgePreservingDecomposition::~EdgePreservingDecomposition() SSEFUNCTION float *EdgePreservingDecomposition::CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur, bool UseBlurForEdgeStop) { - if(Blur == NULL) + if(Blur == nullptr) UseBlurForEdgeStop = false, //Use source if there's no supplied Blur. Blur = new float[n]; @@ -864,7 +864,7 @@ float *EdgePreservingDecomposition::CreateIteratedBlur(float *Source, float Scal } //Create a blur here, initialize. - if(Blur == NULL) { + if(Blur == nullptr) { Blur = new float[n]; } @@ -923,7 +923,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour //Blur. Also setup memory for Compressed (we can just use u since each element of u is used in one calculation). float *u = CreateIteratedBlur(Source, Scale, EdgeStopping, Iterates, Reweightings); - if(Compressed == NULL) { + if(Compressed == nullptr) { Compressed = u; } diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index a15cacb62..bf567f103 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -72,7 +72,7 @@ ben_s or nonbasketless. Enjoy! #include "noncopyable.h" //This is for solving big symmetric positive definite linear problems. -float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = NULL, float RMSResidual = 0.0f, void *Pass = NULL, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = NULL); +float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = nullptr, float RMSResidual = 0.0f, void *Pass = nullptr, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = nullptr); //Storage and use class for symmetric matrices, the nonzero contents of which are confined to diagonals. class MultiDiagonalSymmetricMatrix : @@ -93,7 +93,7 @@ public: */ float **Diagonals; char *buffer; - char *DiagBuffer; + float *DiagBuffer; int *StartRows; bool CreateDiagonal(int index, int StartRow); int n, m; //The matrix is n x n, with m diagonals on the lower triangle. Don't change these. They should be private but aren't for convenience. @@ -143,16 +143,16 @@ public: //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. //If UseBlurForEdgeStop is true, supplied not NULL Blur is used to calculate the edge stopping function instead of Source. - float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = NULL, bool UseBlurForEdgeStop = false); + float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = nullptr, bool UseBlurForEdgeStop = false); //Iterates CreateBlur such that the smoothness term approaches a specific norm via iteratively reweighted least squares. In place not ok. - float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = NULL); + float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = nullptr); /*Lowers global contrast while preserving or boosting local contrast. Can fill into Compressed. The smaller Compression the more compression is applied, with Compression = 1 giving no effect and above 1 the opposite effect. You can totally use Compression = 1 and play with DetailBoost for some really sweet unsharp masking. If working on luma/grey, consider giving it a logarithm. In place calculation to save memory (Source == Compressed) is totally ok. Reweightings > 0 invokes CreateIteratedBlur instead of CreateBlur. */ - float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = NULL); + float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = nullptr); private: MultiDiagonalSymmetricMatrix *A; //The equations are simple enough to not mandate a matrix class, but fast solution NEEDS a complicated preconditioner. diff --git a/rtengine/cfa_linedn_RT.cc b/rtengine/cfa_linedn_RT.cc index 78da79bb5..21fcfb1e5 100644 --- a/rtengine/cfa_linedn_RT.cc +++ b/rtengine/cfa_linedn_RT.cc @@ -68,11 +68,10 @@ void RawImageSource::CLASS cfa_linedn(float noise) { // allocate memory and assure the arrays don't have same 64 byte boundary to avoid L1 conflict misses - char *buffer = (char*)malloc(4 * TS * TS * sizeof(float) + 3 * 64); - float *cfain = (float*)(buffer); - float *cfablur = (float*)(buffer + (TS * TS * sizeof(float)) + 1 * 64); - float *cfadiff = (float*)(buffer + (2 * TS * TS * sizeof(float)) + 2 * 64); - float *cfadn = (float*)(buffer + (3 * TS * TS * sizeof(float)) + 3 * 64); + float *cfain = (float*)malloc(4 * TS * TS * sizeof(float) + 3 * 16 * sizeof(float)); + float *cfablur = (cfain + (TS * TS) + 1 * 16); + float *cfadiff = (cfain + (2 * TS * TS) + 2 * 16); + float *cfadn = (cfain + (3 * TS * TS) + 3 * 16); float linehvar[4], linevvar[4], noisefactor[4][8][2], coeffsq; @@ -250,7 +249,7 @@ void RawImageSource::CLASS cfa_linedn(float noise) } // clean up - free(buffer); + free(cfain); // copy temporary buffer back to image matrix #pragma omp for diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index ea4ca964d..2b65e17e4 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -88,8 +88,8 @@ ImProcCoordinator::ImProcCoordinator () fullw(1), fullh(1), pW(-1), pH(-1), plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), - resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), - butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1) + resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), + butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) {} void ImProcCoordinator::assign (ImageSource* imgsrc) diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc index 0414cc1de..dd97e70e8 100644 --- a/rtengine/myfile.cc +++ b/rtengine/myfile.cc @@ -361,7 +361,7 @@ int fscanf (IMFILE* f, const char* s ...) // of file data and vsscanf() won't tell us how many characters that // were parsed. However, only dcraw.cc code use it and only for "%f" and // "%d", so we make a dummy fscanf here just to support dcraw case. - char buf[50], *endptr; + char buf[50], *endptr = nullptr; int copy_sz = f->size - f->pos; if (copy_sz > sizeof(buf)) { @@ -377,6 +377,7 @@ int fscanf (IMFILE* f, const char* s ...) int i = strtol(buf, &endptr, 10); if (endptr == buf) { + va_end (ap); return 0; } @@ -386,6 +387,7 @@ int fscanf (IMFILE* f, const char* s ...) float f = strtof(buf, &endptr); if (endptr == buf) { + va_end (ap); return 0; } diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 8b2dd4be1..c135acc39 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -735,6 +735,7 @@ void Thumbnail::init () } Thumbnail::Thumbnail () : + iColorMatrix{}, cam2xyz{}, scale(1.0), colorMatrix{}, isRaw(true), camProfile(nullptr), thumbImg(nullptr), camwbRed(1.0), camwbGreen(1.0), camwbBlue(1.0), redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), diff --git a/rtgui/options.cc b/rtgui/options.cc index c5711edfc..d057bbe6c 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -394,8 +394,8 @@ void Options::setDefaults () gimpDir = ""; psDir = ""; customEditorProg = ""; + CPBKeys = CPBKT_TID; editorToSendTo = 1; - liveThumbnails = true; favoriteDirs.clear(); tpOpen.clear (); //crvOpen.clear (); @@ -1093,10 +1093,6 @@ int Options::readFromFile (Glib::ustring fname) thumbInterp = keyFile.get_integer ("File Browser", "ThumbnailInterpolation"); } - if (keyFile.has_key ("File Browser", "LiveThumbnails")) { - liveThumbnails = keyFile.get_boolean ("File Browser", "LiveThumbnails"); - } - if (keyFile.has_key ("File Browser", "FavoriteDirs")) { favoriteDirs = keyFile.get_string_list ("File Browser", "FavoriteDirs"); } @@ -1894,7 +1890,6 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); - keyFile.set_boolean ("File Browser", "LiveThumbnails", liveThumbnails); Glib::ArrayHandle pfav = favoriteDirs; keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); Glib::ArrayHandle pren = renameTemplates; diff --git a/rtgui/options.h b/rtgui/options.h index 4f81a966a..ab0726798 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -180,9 +180,7 @@ public: int editorToSendTo; int maxThumbnailHeight; std::size_t maxCacheEntries; - ThFileType thumbnailFormat; int thumbInterp; // 0: nearest, 1: bilinear - bool liveThumbnails; std::vector parseExtensions; // List containing all extensions type std::vector parseExtensionsEnabled; // List of bool to retain extension or not std::vector parsedExtensions; // List containing all retained extensions (lowercase) @@ -203,7 +201,6 @@ public: bool showFileNames; bool filmStripShowFileNames; bool tabbedUI; - int previewSizeTab, previewSizeBrowser; bool rememberZoomAndPan; int multiDisplayMode; // 0=none, 1=Edit panels on other display std::vector cutOverlayBrush; // Red;Green;Blue;Alpha , all ranging 0..1 @@ -219,7 +216,6 @@ public: //int histogramWorking; // 0=disabled, 1=left pane, 2=right pane bool histogramBar; bool histogramFullMode; - bool showProfileSelector; bool FileBrowserToolbarSingleRow; bool hideTPVScrollbar; bool UseIconNoText; From 3d73eb45a154abe25ba86a3496e4b5b19cac3c81 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 17 Oct 2016 21:47:52 +0200 Subject: [PATCH 057/115] Disabled unused functions in dcraw.cc .h --- rtengine/dcraw.cc | 1362 ++++++++++++++++++++++----------------------- rtengine/dcraw.h | 25 +- 2 files changed, 693 insertions(+), 694 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 3593f2777..54fc09622 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -4132,127 +4132,127 @@ mask_set: } } -void CLASS remove_zeroes() -{ - unsigned row, col, tot, n, r, c; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) - if (BAYER(row,col) == 0) { - tot = n = 0; - for (r = row-2; r <= row+2; r++) - for (c = col-2; c <= col+2; c++) - if (r < height && c < width && - FC(r,c) == FC(row,col) && BAYER(r,c)) - tot += (n++,BAYER(r,c)); - if (n) BAYER(row,col) = tot/n; - } -} +//void CLASS remove_zeroes() +//{ +// unsigned row, col, tot, n, r, c; +// +// for (row=0; row < height; row++) +// for (col=0; col < width; col++) +// if (BAYER(row,col) == 0) { +// tot = n = 0; +// for (r = row-2; r <= row+2; r++) +// for (c = col-2; c <= col+2; c++) +// if (r < height && c < width && +// FC(r,c) == FC(row,col) && BAYER(r,c)) +// tot += (n++,BAYER(r,c)); +// if (n) BAYER(row,col) = tot/n; +// } +//} /* Seach from the current directory up to the root looking for a ".badpixels" file, and fix those pixels now. */ -void CLASS bad_pixels (const char *cfname) -{ - FILE *fp=0; - char *fname, *cp, line[128]; - int len, time, row, col, r, c, rad, tot, n, fixed=0; +//void CLASS bad_pixels (const char *cfname) +//{ +// FILE *fp=0; +// char *fname, *cp, line[128]; +// int len, time, row, col, r, c, rad, tot, n, fixed=0; +// +// if (!filters) return; +// if (cfname) +// fp = fopen (cfname, "r"); +// else { +// for (len=32 ; ; len *= 2) { +// fname = (char *) malloc (len); +// if (!fname) return; +// if (getcwd (fname, len-16)) break; +// free (fname); +// if (errno != ERANGE) return; +// } +//#if defined(WIN32) || defined(DJGPP) +// if (fname[1] == ':') +// memmove (fname, fname+2, len-2); +// for (cp=fname; *cp; cp++) +// if (*cp == '\\') *cp = '/'; +//#endif +// cp = fname + strlen(fname); +// if (cp[-1] == '/') cp--; +// while (*fname == '/') { +// strcpy (cp, "/.badpixels"); +// if ((fp = fopen (fname, "r"))) break; +// if (cp == fname) break; +// while (*--cp != '/'); +// } +// free (fname); +// } +// if (!fp) return; +// while (fgets (line, 128, fp)) { +// cp = strchr (line, '#'); +// if (cp) *cp = 0; +// if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; +// if ((unsigned) col >= width || (unsigned) row >= height) continue; +// if (time > timestamp) continue; +// for (tot=n=0, rad=1; rad < 3 && n==0; rad++) +// for (r = row-rad; r <= row+rad; r++) +// for (c = col-rad; c <= col+rad; c++) +// if ((unsigned) r < height && (unsigned) c < width && +// (r != row || c != col) && fcol(r,c) == fcol(row,col)) { +// tot += BAYER2(r,c); +// n++; +// } +// BAYER2(row,col) = tot/n; +// if (verbose) { +// if (!fixed++) +// fprintf (stderr,_("Fixed dead pixels at:")); +// fprintf (stderr, " %d,%d", col, row); +// } +// } +// if (fixed) fputc ('\n', stderr); +// fclose (fp); +//} - if (!filters) return; - if (cfname) - fp = fopen (cfname, "r"); - else { - for (len=32 ; ; len *= 2) { - fname = (char *) malloc (len); - if (!fname) return; - if (getcwd (fname, len-16)) break; - free (fname); - if (errno != ERANGE) return; - } -#if defined(WIN32) || defined(DJGPP) - if (fname[1] == ':') - memmove (fname, fname+2, len-2); - for (cp=fname; *cp; cp++) - if (*cp == '\\') *cp = '/'; -#endif - cp = fname + strlen(fname); - if (cp[-1] == '/') cp--; - while (*fname == '/') { - strcpy (cp, "/.badpixels"); - if ((fp = fopen (fname, "r"))) break; - if (cp == fname) break; - while (*--cp != '/'); - } - free (fname); - } - if (!fp) return; - while (fgets (line, 128, fp)) { - cp = strchr (line, '#'); - if (cp) *cp = 0; - if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; - if ((unsigned) col >= width || (unsigned) row >= height) continue; - if (time > timestamp) continue; - for (tot=n=0, rad=1; rad < 3 && n==0; rad++) - for (r = row-rad; r <= row+rad; r++) - for (c = col-rad; c <= col+rad; c++) - if ((unsigned) r < height && (unsigned) c < width && - (r != row || c != col) && fcol(r,c) == fcol(row,col)) { - tot += BAYER2(r,c); - n++; - } - BAYER2(row,col) = tot/n; - if (verbose) { - if (!fixed++) - fprintf (stderr,_("Fixed dead pixels at:")); - fprintf (stderr, " %d,%d", col, row); - } - } - if (fixed) fputc ('\n', stderr); - fclose (fp); -} - -void CLASS subtract (const char *fname) -{ - FILE *fp; - int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; - ushort *pixel; - - if (!(fp = fopen (fname, "rb"))) { - perror (fname); return; - } - if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; - while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { - if (c == '#') comment = 1; - if (c == '\n') comment = 0; - if (comment) continue; - if (isdigit(c)) number = 1; - if (number) { - if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; - else if (isspace(c)) { - number = 0; nd++; - } else error = 1; - } - } - if (error || nd < 3) { - fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); - fclose (fp); return; - } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { - fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); - fclose (fp); return; - } - pixel = (ushort *) calloc (width, sizeof *pixel); - merror (pixel, "subtract()"); - for (row=0; row < height; row++) { - fread (pixel, 2, width, fp); - for (col=0; col < width; col++) - BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); - } - free (pixel); - fclose (fp); - memset (cblack, 0, sizeof cblack); - black = 0; -} +//void CLASS subtract (const char *fname) +//{ +// FILE *fp; +// int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; +// ushort *pixel; +// +// if (!(fp = fopen (fname, "rb"))) { +// perror (fname); return; +// } +// if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; +// while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { +// if (c == '#') comment = 1; +// if (c == '\n') comment = 0; +// if (comment) continue; +// if (isdigit(c)) number = 1; +// if (number) { +// if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; +// else if (isspace(c)) { +// number = 0; nd++; +// } else error = 1; +// } +// } +// if (error || nd < 3) { +// fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); +// fclose (fp); return; +// } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { +// fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); +// fclose (fp); return; +// } +// pixel = (ushort *) calloc (width, sizeof *pixel); +// merror (pixel, "subtract()"); +// for (row=0; row < height; row++) { +// fread (pixel, 2, width, fp); +// for (col=0; col < width; col++) +// BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); +// } +// free (pixel); +// fclose (fp); +// memset (cblack, 0, sizeof cblack); +// black = 0; +//} void CLASS gamma_curve (double pwr, double ts, int mode, int imax) { @@ -4417,94 +4417,94 @@ void CLASS colorcheck() } #endif -void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) -{ - int i; - for (i=0; i < sc; i++) - temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; - for (; i+sc < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; - for (; i < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; -} +//void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) +//{ +// int i; +// for (i=0; i < sc; i++) +// temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; +// for (; i+sc < size; i++) +// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; +// for (; i < size; i++) +// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; +//} -void CLASS wavelet_denoise() -{ - float *fimg=0, *temp, thold, mul[2], avg, diff; - int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; - ushort *window[4]; - static const float noise[] = - { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; - - if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); - - while (maximum << scale < 0x10000) scale++; - maximum <<= --scale; - black <<= scale; - FORC4 cblack[c] <<= scale; - if ((size = iheight*iwidth) < 0x15550000) - fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); - merror (fimg, "wavelet_denoise()"); - temp = fimg + size*3; - if ((nc = colors) == 3 && filters) nc++; - FORC(nc) { /* denoise R,G1,B,G3 individually */ - for (i=0; i < size; i++) - fimg[i] = 256 * sqrt(image[i][c] << scale); - for (hpass=lev=0; lev < 5; lev++) { - lpass = size*((lev & 1)+1); - for (row=0; row < iheight; row++) { - hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); - for (col=0; col < iwidth; col++) - fimg[lpass + row*iwidth + col] = temp[col] * 0.25; - } - for (col=0; col < iwidth; col++) { - hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); - for (row=0; row < iheight; row++) - fimg[lpass + row*iwidth + col] = temp[row] * 0.25; - } - thold = threshold * noise[lev]; - for (i=0; i < size; i++) { - fimg[hpass+i] -= fimg[lpass+i]; - if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; - else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; - else fimg[hpass+i] = 0; - if (hpass) fimg[i] += fimg[hpass+i]; - } - hpass = lpass; - } - for (i=0; i < size; i++) - image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); - } - if (filters && colors == 3) { /* pull G1 and G3 closer together */ - for (row=0; row < 2; row++) { - mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; - blk[row] = cblack[FC(row,0) | 1]; - } - for (i=0; i < 4; i++) - window[i] = (ushort *) fimg + width*i; - for (wlast=-1, row=1; row < height-1; row++) { - while (wlast < row+1) { - for (wlast++, i=0; i < 4; i++) - window[(i+3) & 3] = window[i]; - for (col = FC(wlast,1) & 1; col < width; col+=2) - window[2][col] = BAYER(wlast,col); - } - thold = threshold/512; - for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { - avg = ( window[0][col-1] + window[0][col+1] + - window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) - * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; - avg = avg < 0 ? 0 : sqrt(avg); - diff = sqrt(BAYER(row,col)) - avg; - if (diff < -thold) diff += thold; - else if (diff > thold) diff -= thold; - else diff = 0; - BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); - } - } - } - free (fimg); -} +//void CLASS wavelet_denoise() +//{ +// float *fimg=0, *temp, thold, mul[2], avg, diff; +// int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; +// ushort *window[4]; +// static const float noise[] = +// { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; +// +// if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); +// +// while (maximum << scale < 0x10000) scale++; +// maximum <<= --scale; +// black <<= scale; +// FORC4 cblack[c] <<= scale; +// if ((size = iheight*iwidth) < 0x15550000) +// fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); +// merror (fimg, "wavelet_denoise()"); +// temp = fimg + size*3; +// if ((nc = colors) == 3 && filters) nc++; +// FORC(nc) { /* denoise R,G1,B,G3 individually */ +// for (i=0; i < size; i++) +// fimg[i] = 256 * sqrt(image[i][c] << scale); +// for (hpass=lev=0; lev < 5; lev++) { +// lpass = size*((lev & 1)+1); +// for (row=0; row < iheight; row++) { +// hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); +// for (col=0; col < iwidth; col++) +// fimg[lpass + row*iwidth + col] = temp[col] * 0.25; +// } +// for (col=0; col < iwidth; col++) { +// hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); +// for (row=0; row < iheight; row++) +// fimg[lpass + row*iwidth + col] = temp[row] * 0.25; +// } +// thold = threshold * noise[lev]; +// for (i=0; i < size; i++) { +// fimg[hpass+i] -= fimg[lpass+i]; +// if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; +// else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; +// else fimg[hpass+i] = 0; +// if (hpass) fimg[i] += fimg[hpass+i]; +// } +// hpass = lpass; +// } +// for (i=0; i < size; i++) +// image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); +// } +// if (filters && colors == 3) { /* pull G1 and G3 closer together */ +// for (row=0; row < 2; row++) { +// mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; +// blk[row] = cblack[FC(row,0) | 1]; +// } +// for (i=0; i < 4; i++) +// window[i] = (ushort *) fimg + width*i; +// for (wlast=-1, row=1; row < height-1; row++) { +// while (wlast < row+1) { +// for (wlast++, i=0; i < 4; i++) +// window[(i+3) & 3] = window[i]; +// for (col = FC(wlast,1) & 1; col < width; col+=2) +// window[2][col] = BAYER(wlast,col); +// } +// thold = threshold/512; +// for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { +// avg = ( window[0][col-1] + window[0][col+1] + +// window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) +// * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; +// avg = avg < 0 ? 0 : sqrt(avg); +// diff = sqrt(BAYER(row,col)) - avg; +// if (diff < -thold) diff += thold; +// else if (diff > thold) diff -= thold; +// else diff = 0; +// BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); +// } +// } +// } +// free (fimg); +//} void CLASS scale_colors() { @@ -4562,7 +4562,7 @@ skip_block: ; if (pre_mul[3] == 0) pre_mul[3] = colors < 4 ? pre_mul[1] : 1; dark = black; sat = maximum; - if (threshold) wavelet_denoise(); +// if (threshold) wavelet_denoise(); maximum -= black; for (dmin=DBL_MAX, dmax=c=0; c < 4; c++) { if (dmin > pre_mul[c]) @@ -4668,440 +4668,440 @@ void CLASS pre_interpolate() if (half_size) filters = 0; } -void CLASS border_interpolate (int border) -{ - unsigned row, col, y, x, f, c, sum[8]; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - if (col==border && row >= border && row < height-border) - col = width-border; - memset (sum, 0, sizeof sum); - for (y=row-1; y != row+2; y++) - for (x=col-1; x != col+2; x++) - if (y < height && x < width) { - f = fcol(y,x); - sum[f] += image[y*width+x][f]; - sum[f+4]++; - } - f = fcol(row,col); - FORCC if (c != f && sum[c+4]) - image[row*width+col][c] = sum[c] / sum[c+4]; - } -} +//void CLASS border_interpolate (int border) +//{ +// unsigned row, col, y, x, f, c, sum[8]; +// +// for (row=0; row < height; row++) +// for (col=0; col < width; col++) { +// if (col==border && row >= border && row < height-border) +// col = width-border; +// memset (sum, 0, sizeof sum); +// for (y=row-1; y != row+2; y++) +// for (x=col-1; x != col+2; x++) +// if (y < height && x < width) { +// f = fcol(y,x); +// sum[f] += image[y*width+x][f]; +// sum[f+4]++; +// } +// f = fcol(row,col); +// FORCC if (c != f && sum[c+4]) +// image[row*width+col][c] = sum[c] / sum[c+4]; +// } +//} /* RT: delete interpolation functions */ -void CLASS cielab (ushort rgb[3], short lab[3]) -{ - int c, i, j, k; - float r, xyz[3]; - static float cbrt[0x10000], xyz_cam[3][4]; +//void CLASS cielab (ushort rgb[3], short lab[3]) +//{ +// int c, i, j, k; +// float r, xyz[3]; +// static float cbrt[0x10000], xyz_cam[3][4]; +// +// if (!rgb) { +// for (i=0; i < 0x10000; i++) { +// r = i / 65535.0; +// cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; +// } +// for (i=0; i < 3; i++) +// for (j=0; j < colors; j++) +// for (xyz_cam[i][j] = k=0; k < 3; k++) +// xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; +// return; +// } +// xyz[0] = xyz[1] = xyz[2] = 0.5; +// FORCC { +// xyz[0] += xyz_cam[0][c] * rgb[c]; +// xyz[1] += xyz_cam[1][c] * rgb[c]; +// xyz[2] += xyz_cam[2][c] * rgb[c]; +// } +// xyz[0] = cbrt[CLIP((int) xyz[0])]; +// xyz[1] = cbrt[CLIP((int) xyz[1])]; +// xyz[2] = cbrt[CLIP((int) xyz[2])]; +// lab[0] = 64 * (116 * xyz[1] - 16); +// lab[1] = 64 * 500 * (xyz[0] - xyz[1]); +// lab[2] = 64 * 200 * (xyz[1] - xyz[2]); +//} +// +//#define TS 512 /* Tile Size */ +//#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] +// +///* +// Frank Markesteijn's algorithm for Fuji X-Trans sensors +// */ +//void CLASS xtrans_interpolate (int passes) +//{ +// int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; +// int val, ndir, pass, hm[8], avg[4], color[3][8]; +// static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, +// patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, +// { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, +// dir[4] = { 1,TS,TS+1,TS-1 }; +// short allhex[3][3][2][8], *hex; +// ushort min, max, sgrow, sgcol; +// ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; +// short (*lab) [TS][3], (*lix)[3]; +// float (*drv)[TS][TS], diff[6], tr; +// char (*homo)[TS][TS], *buffer; +// +// if (verbose) +// fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); +// +// cielab (0,0); +// ndir = 4 << (passes > 1); +// buffer = (char *) malloc (TS*TS*(ndir*11+6)); +// merror (buffer, "xtrans_interpolate()"); +// rgb = (ushort(*)[TS][TS][3]) buffer; +// lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); +// drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); +// homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); +// +///* Map a green hexagon around each non-green pixel and vice versa: */ +// for (row=0; row < 3; row++) +// for (col=0; col < 3; col++) +// for (ng=d=0; d < 10; d+=2) { +// g = fcol(row,col) == 1; +// if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; +// if (ng == 4) { sgrow = row; sgcol = col; } +// if (ng == g+1) FORC(8) { +// v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; +// h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; +// allhex[row][col][0][c^(g*2 & d)] = h + v*width; +// allhex[row][col][1][c^(g*2 & d)] = h + v*TS; +// } +// } +// +///* Set green1 and green3 to the minimum and maximum allowed values: */ +// for (row=2; row < height-2; row++) +// for (min=~(max=0), col=2; col < width-2; col++) { +// if (fcol(row,col) == 1 && (min=~(max=0))) continue; +// pix = image + row*width + col; +// hex = allhex[row % 3][col % 3][0]; +// if (!max) FORC(6) { +// val = pix[hex[c]][1]; +// if (min > val) min = val; +// if (max < val) max = val; +// } +// pix[0][1] = min; +// pix[0][3] = max; +// switch ((row-sgrow) % 3) { +// case 1: if (row < height-3) { row++; col--; } break; +// case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; +// } +// } +// +// for (top=3; top < height-19; top += TS-16) +// for (left=3; left < width-19; left += TS-16) { +// mrow = MIN (top+TS, height-3); +// mcol = MIN (left+TS, width-3); +// for (row=top; row < mrow; row++) +// for (col=left; col < mcol; col++) +// memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); +// FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); +// +///* Interpolate green horizontally, vertically, and along both diagonals: */ +// for (row=top; row < mrow; row++) +// for (col=left; col < mcol; col++) { +// if ((f = fcol(row,col)) == 1) continue; +// pix = image + row*width + col; +// hex = allhex[row % 3][col % 3][0]; +// color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - +// 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); +// color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + +// 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); +// FORC(2) color[1][2+c] = +// 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * +// (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); +// FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = +// LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); +// } +// +// for (pass=0; pass < passes; pass++) { +// if (pass == 1) +// memcpy (rgb+=4, buffer, 4*sizeof *rgb); +// +///* Recalculate green from interpolated values of closer pixels: */ +// if (pass) { +// for (row=top+2; row < mrow-2; row++) +// for (col=left+2; col < mcol-2; col++) { +// if ((f = fcol(row,col)) == 1) continue; +// pix = image + row*width + col; +// hex = allhex[row % 3][col % 3][1]; +// for (d=3; d < 6; d++) { +// rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; +// val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] +// - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; +// rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); +// } +// } +// } +// +///* Interpolate red and blue values for solitary green pixels: */ +// for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) +// for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { +// rix = &rgb[0][row-top][col-left]; +// h = fcol(row,col+1); +// memset (diff, 0, sizeof diff); +// for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { +// for (c=0; c < 2; c++, h^=2) { +// g = 2*rix[0][1] - rix[i< 1) +// diff[d] += SQR (rix[i< 1 && (d & 1)) +// if (diff[d-1] < diff[d]) +// FORC(2) color[c*2][d] = color[c*2][d-1]; +// if (d < 2 || (d & 1)) { +// FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); +// rix += TS*TS; +// } +// } +// } +// +///* Interpolate red for blue pixels and vice versa: */ +// for (row=top+3; row < mrow-3; row++) +// for (col=left+3; col < mcol-3; col++) { +// if ((f = 2-fcol(row,col)) == 1) continue; +// rix = &rgb[0][row-top][col-left]; +// c = (row-sgrow) % 3 ? TS:1; +// h = 3 * (c ^ TS ^ 1); +// for (d=0; d < 4; d++, rix += TS*TS) { +// i = d > 1 || ((d ^ c) & 1) || +// ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < +// 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; +// rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + +// 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); +// } +// } +// +///* Fill in red and blue for 2x2 blocks of green: */ +// for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) +// for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { +// rix = &rgb[0][row-top][col-left]; +// hex = allhex[row % 3][col % 3][1]; +// for (d=0; d < ndir; d+=2, rix += TS*TS) +// if (hex[d] + hex[d+1]) { +// g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; +// for (c=0; c < 4; c+=2) rix[0][c] = +// CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); +// } else { +// g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; +// for (c=0; c < 4; c+=2) rix[0][c] = +// CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); +// } +// } +// } +// rgb = (ushort(*)[TS][TS][3]) buffer; +// mrow -= top; +// mcol -= left; +// +///* Convert to CIELab and differentiate in all directions: */ +// for (d=0; d < ndir; d++) { +// for (row=2; row < mrow-2; row++) +// for (col=2; col < mcol-2; col++) +// cielab (rgb[d][row][col], lab[row][col]); +// for (f=dir[d & 3],row=3; row < mrow-3; row++) +// for (col=3; col < mcol-3; col++) { +// lix = &lab[row][col]; +// g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; +// drv[d][row][col] = SQR(g) +// + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) +// + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); +// } +// } +// +///* Build homogeneity maps from the derivatives: */ +// memset(homo, 0, ndir*TS*TS); +// for (row=4; row < mrow-4; row++) +// for (col=4; col < mcol-4; col++) { +// for (tr=FLT_MAX, d=0; d < ndir; d++) +// if (tr > drv[d][row][col]) +// tr = drv[d][row][col]; +// tr *= 8; +// for (d=0; d < ndir; d++) +// for (v=-1; v <= 1; v++) +// for (h=-1; h <= 1; h++) +// if (drv[d][row+v][col+h] <= tr) +// homo[d][row][col]++; +// } +// +///* Average the most homogenous pixels for the final result: */ +// if (height-top < TS+4) mrow = height-top+2; +// if (width-left < TS+4) mcol = width-left+2; +// for (row = MIN(top,8); row < mrow-8; row++) +// for (col = MIN(left,8); col < mcol-8; col++) { +// for (d=0; d < ndir; d++) +// for (hm[d]=0, v=-2; v <= 2; v++) +// for (h=-2; h <= 2; h++) +// hm[d] += homo[d][row+v][col+h]; +// for (d=0; d < ndir-4; d++) +// if (hm[d] < hm[d+4]) hm[d ] = 0; else +// if (hm[d] > hm[d+4]) hm[d+4] = 0; +// for (max=hm[0],d=1; d < ndir; d++) +// if (max < hm[d]) max = hm[d]; +// max -= max >> 3; +// memset (avg, 0, sizeof avg); +// for (d=0; d < ndir; d++) +// if (hm[d] >= max) { +// FORC3 avg[c] += rgb[d][row][col][c]; +// avg[3]++; +// } +// FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; +// } +// } +// free(buffer); +// border_interpolate(8); +//} +//#undef fcol +// +// +//#undef TS - if (!rgb) { - for (i=0; i < 0x10000; i++) { - r = i / 65535.0; - cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; - } - for (i=0; i < 3; i++) - for (j=0; j < colors; j++) - for (xyz_cam[i][j] = k=0; k < 3; k++) - xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; - return; - } - xyz[0] = xyz[1] = xyz[2] = 0.5; - FORCC { - xyz[0] += xyz_cam[0][c] * rgb[c]; - xyz[1] += xyz_cam[1][c] * rgb[c]; - xyz[2] += xyz_cam[2][c] * rgb[c]; - } - xyz[0] = cbrt[CLIP((int) xyz[0])]; - xyz[1] = cbrt[CLIP((int) xyz[1])]; - xyz[2] = cbrt[CLIP((int) xyz[2])]; - lab[0] = 64 * (116 * xyz[1] - 16); - lab[1] = 64 * 500 * (xyz[0] - xyz[1]); - lab[2] = 64 * 200 * (xyz[1] - xyz[2]); -} - -#define TS 512 /* Tile Size */ -#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] - -/* - Frank Markesteijn's algorithm for Fuji X-Trans sensors - */ -void CLASS xtrans_interpolate (int passes) -{ - int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; - int val, ndir, pass, hm[8], avg[4], color[3][8]; - static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, - patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, - { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, - dir[4] = { 1,TS,TS+1,TS-1 }; - short allhex[3][3][2][8], *hex; - ushort min, max, sgrow, sgcol; - ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; - short (*lab) [TS][3], (*lix)[3]; - float (*drv)[TS][TS], diff[6], tr; - char (*homo)[TS][TS], *buffer; - - if (verbose) - fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); - - cielab (0,0); - ndir = 4 << (passes > 1); - buffer = (char *) malloc (TS*TS*(ndir*11+6)); - merror (buffer, "xtrans_interpolate()"); - rgb = (ushort(*)[TS][TS][3]) buffer; - lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); - drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); - homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); - -/* Map a green hexagon around each non-green pixel and vice versa: */ - for (row=0; row < 3; row++) - for (col=0; col < 3; col++) - for (ng=d=0; d < 10; d+=2) { - g = fcol(row,col) == 1; - if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; - if (ng == 4) { sgrow = row; sgcol = col; } - if (ng == g+1) FORC(8) { - v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; - h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; - allhex[row][col][0][c^(g*2 & d)] = h + v*width; - allhex[row][col][1][c^(g*2 & d)] = h + v*TS; - } - } - -/* Set green1 and green3 to the minimum and maximum allowed values: */ - for (row=2; row < height-2; row++) - for (min=~(max=0), col=2; col < width-2; col++) { - if (fcol(row,col) == 1 && (min=~(max=0))) continue; - pix = image + row*width + col; - hex = allhex[row % 3][col % 3][0]; - if (!max) FORC(6) { - val = pix[hex[c]][1]; - if (min > val) min = val; - if (max < val) max = val; - } - pix[0][1] = min; - pix[0][3] = max; - switch ((row-sgrow) % 3) { - case 1: if (row < height-3) { row++; col--; } break; - case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; - } - } - - for (top=3; top < height-19; top += TS-16) - for (left=3; left < width-19; left += TS-16) { - mrow = MIN (top+TS, height-3); - mcol = MIN (left+TS, width-3); - for (row=top; row < mrow; row++) - for (col=left; col < mcol; col++) - memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); - FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); - -/* Interpolate green horizontally, vertically, and along both diagonals: */ - for (row=top; row < mrow; row++) - for (col=left; col < mcol; col++) { - if ((f = fcol(row,col)) == 1) continue; - pix = image + row*width + col; - hex = allhex[row % 3][col % 3][0]; - color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - - 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); - color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + - 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); - FORC(2) color[1][2+c] = - 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * - (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); - FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = - LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); - } - - for (pass=0; pass < passes; pass++) { - if (pass == 1) - memcpy (rgb+=4, buffer, 4*sizeof *rgb); - -/* Recalculate green from interpolated values of closer pixels: */ - if (pass) { - for (row=top+2; row < mrow-2; row++) - for (col=left+2; col < mcol-2; col++) { - if ((f = fcol(row,col)) == 1) continue; - pix = image + row*width + col; - hex = allhex[row % 3][col % 3][1]; - for (d=3; d < 6; d++) { - rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; - val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] - - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; - rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); - } - } - } - -/* Interpolate red and blue values for solitary green pixels: */ - for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) - for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { - rix = &rgb[0][row-top][col-left]; - h = fcol(row,col+1); - memset (diff, 0, sizeof diff); - for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { - for (c=0; c < 2; c++, h^=2) { - g = 2*rix[0][1] - rix[i< 1) - diff[d] += SQR (rix[i< 1 && (d & 1)) - if (diff[d-1] < diff[d]) - FORC(2) color[c*2][d] = color[c*2][d-1]; - if (d < 2 || (d & 1)) { - FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); - rix += TS*TS; - } - } - } - -/* Interpolate red for blue pixels and vice versa: */ - for (row=top+3; row < mrow-3; row++) - for (col=left+3; col < mcol-3; col++) { - if ((f = 2-fcol(row,col)) == 1) continue; - rix = &rgb[0][row-top][col-left]; - c = (row-sgrow) % 3 ? TS:1; - h = 3 * (c ^ TS ^ 1); - for (d=0; d < 4; d++, rix += TS*TS) { - i = d > 1 || ((d ^ c) & 1) || - ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < - 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; - rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + - 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); - } - } - -/* Fill in red and blue for 2x2 blocks of green: */ - for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) - for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { - rix = &rgb[0][row-top][col-left]; - hex = allhex[row % 3][col % 3][1]; - for (d=0; d < ndir; d+=2, rix += TS*TS) - if (hex[d] + hex[d+1]) { - g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; - for (c=0; c < 4; c+=2) rix[0][c] = - CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); - } else { - g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; - for (c=0; c < 4; c+=2) rix[0][c] = - CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); - } - } - } - rgb = (ushort(*)[TS][TS][3]) buffer; - mrow -= top; - mcol -= left; - -/* Convert to CIELab and differentiate in all directions: */ - for (d=0; d < ndir; d++) { - for (row=2; row < mrow-2; row++) - for (col=2; col < mcol-2; col++) - cielab (rgb[d][row][col], lab[row][col]); - for (f=dir[d & 3],row=3; row < mrow-3; row++) - for (col=3; col < mcol-3; col++) { - lix = &lab[row][col]; - g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; - drv[d][row][col] = SQR(g) - + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) - + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); - } - } - -/* Build homogeneity maps from the derivatives: */ - memset(homo, 0, ndir*TS*TS); - for (row=4; row < mrow-4; row++) - for (col=4; col < mcol-4; col++) { - for (tr=FLT_MAX, d=0; d < ndir; d++) - if (tr > drv[d][row][col]) - tr = drv[d][row][col]; - tr *= 8; - for (d=0; d < ndir; d++) - for (v=-1; v <= 1; v++) - for (h=-1; h <= 1; h++) - if (drv[d][row+v][col+h] <= tr) - homo[d][row][col]++; - } - -/* Average the most homogenous pixels for the final result: */ - if (height-top < TS+4) mrow = height-top+2; - if (width-left < TS+4) mcol = width-left+2; - for (row = MIN(top,8); row < mrow-8; row++) - for (col = MIN(left,8); col < mcol-8; col++) { - for (d=0; d < ndir; d++) - for (hm[d]=0, v=-2; v <= 2; v++) - for (h=-2; h <= 2; h++) - hm[d] += homo[d][row+v][col+h]; - for (d=0; d < ndir-4; d++) - if (hm[d] < hm[d+4]) hm[d ] = 0; else - if (hm[d] > hm[d+4]) hm[d+4] = 0; - for (max=hm[0],d=1; d < ndir; d++) - if (max < hm[d]) max = hm[d]; - max -= max >> 3; - memset (avg, 0, sizeof avg); - for (d=0; d < ndir; d++) - if (hm[d] >= max) { - FORC3 avg[c] += rgb[d][row][col][c]; - avg[3]++; - } - FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; - } - } - free(buffer); - border_interpolate(8); -} -#undef fcol - - -#undef TS - -void CLASS median_filter() -{ - ushort (*pix)[4]; - int pass, c, i, j, k, med[9]; - static const uchar opt[] = /* Optimal 9-element median search */ - { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, - 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; - - for (pass=1; pass <= med_passes; pass++) { - if (verbose) - fprintf (stderr,_("Median filter pass %d...\n"), pass); - for (c=0; c < 3; c+=2) { - for (pix = image; pix < image+width*height; pix++) - pix[0][3] = pix[0][c]; - for (pix = image+width; pix < image+width*(height-1); pix++) { - if ((pix-image+1) % width < 2) continue; - for (k=0, i = -width; i <= width; i += width) - for (j = i-1; j <= i+1; j++) - med[k++] = pix[j][3] - pix[j][1]; - for (i=0; i < sizeof opt; i+=2) - if (med[opt[i]] > med[opt[i+1]]) - SWAP (med[opt[i]] , med[opt[i+1]]); - pix[0][c] = CLIP(med[4] + pix[0][1]); - } - } - } -} - -void CLASS blend_highlights() -{ - int clip=INT_MAX, row, col, c, i, j; - static const float trans[2][4][4] = - { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - static const float itrans[2][4][4] = - { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - float cam[2][4], lab[2][4], sum[2], chratio; - - if ((unsigned) (colors-3) > 1) return; - if (verbose) fprintf (stderr,_("Blending highlights...\n")); - FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - FORCC if (image[row*width+col][c] > clip) break; - if (c == colors) continue; - FORCC { - cam[0][c] = image[row*width+col][c]; - cam[1][c] = MIN(cam[0][c],clip); - } - for (i=0; i < 2; i++) { - FORCC for (lab[i][c]=j=0; j < colors; j++) - lab[i][c] += trans[colors-3][c][j] * cam[i][j]; - for (sum[i]=0,c=1; c < colors; c++) - sum[i] += SQR(lab[i][c]); - } - chratio = sqrt(sum[1]/sum[0]); - for (c=1; c < colors; c++) - lab[0][c] *= chratio; - FORCC for (cam[0][c]=j=0; j < colors; j++) - cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; - FORCC image[row*width+col][c] = cam[0][c] / colors; - } -} - -#define SCALE (4 >> shrink) -void CLASS recover_highlights() -{ - float *map, sum, wgt, grow; - int hsat[4], count, spread, change, val, i; - unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; - ushort *pixel; - static const signed char dir[8][2] = - { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; - - if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); - - grow = pow (2, 4-highlight); - FORCC hsat[c] = 32000 * pre_mul[c]; - for (kc=0, c=1; c < colors; c++) - if (pre_mul[kc] < pre_mul[c]) kc = c; - high = height / SCALE; - wide = width / SCALE; - map = (float *) calloc (high, wide*sizeof *map); - merror (map, "recover_highlights()"); - FORCC if (c != kc) { - memset (map, 0, high*wide*sizeof *map); - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - sum = wgt = count = 0; - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { - sum += pixel[c]; - wgt += pixel[kc]; - count++; - } - } - if (count == SCALE*SCALE) - map[mrow*wide+mcol] = sum / wgt; - } - for (spread = 32/grow; spread--; ) { - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - if (map[mrow*wide+mcol]) continue; - sum = count = 0; - for (d=0; d < 8; d++) { - y = mrow + dir[d][0]; - x = mcol + dir[d][1]; - if (y < high && x < wide && map[y*wide+x] > 0) { - sum += (1 + (d & 1)) * map[y*wide+x]; - count += 1 + (d & 1); - } - } - if (count > 3) - map[mrow*wide+mcol] = - (sum+grow) / (count+grow); - } - for (change=i=0; i < high*wide; i++) - if (map[i] < 0) { - map[i] = -map[i]; - change = 1; - } - if (!change) break; - } - for (i=0; i < high*wide; i++) - if (map[i] == 0) map[i] = 1; - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] > 1) { - val = pixel[kc] * map[mrow*wide+mcol]; - if (pixel[c] < val) pixel[c] = CLIP(val); - } - } - } - } - free (map); -} -#undef SCALE +//void CLASS median_filter() +//{ +// ushort (*pix)[4]; +// int pass, c, i, j, k, med[9]; +// static const uchar opt[] = /* Optimal 9-element median search */ +// { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, +// 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; +// +// for (pass=1; pass <= med_passes; pass++) { +// if (verbose) +// fprintf (stderr,_("Median filter pass %d...\n"), pass); +// for (c=0; c < 3; c+=2) { +// for (pix = image; pix < image+width*height; pix++) +// pix[0][3] = pix[0][c]; +// for (pix = image+width; pix < image+width*(height-1); pix++) { +// if ((pix-image+1) % width < 2) continue; +// for (k=0, i = -width; i <= width; i += width) +// for (j = i-1; j <= i+1; j++) +// med[k++] = pix[j][3] - pix[j][1]; +// for (i=0; i < sizeof opt; i+=2) +// if (med[opt[i]] > med[opt[i+1]]) +// SWAP (med[opt[i]] , med[opt[i+1]]); +// pix[0][c] = CLIP(med[4] + pix[0][1]); +// } +// } +// } +//} +// +//void CLASS blend_highlights() +//{ +// int clip=INT_MAX, row, col, c, i, j; +// static const float trans[2][4][4] = +// { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, +// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +// static const float itrans[2][4][4] = +// { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, +// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +// float cam[2][4], lab[2][4], sum[2], chratio; +// +// if ((unsigned) (colors-3) > 1) return; +// if (verbose) fprintf (stderr,_("Blending highlights...\n")); +// FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; +// for (row=0; row < height; row++) +// for (col=0; col < width; col++) { +// FORCC if (image[row*width+col][c] > clip) break; +// if (c == colors) continue; +// FORCC { +// cam[0][c] = image[row*width+col][c]; +// cam[1][c] = MIN(cam[0][c],clip); +// } +// for (i=0; i < 2; i++) { +// FORCC for (lab[i][c]=j=0; j < colors; j++) +// lab[i][c] += trans[colors-3][c][j] * cam[i][j]; +// for (sum[i]=0,c=1; c < colors; c++) +// sum[i] += SQR(lab[i][c]); +// } +// chratio = sqrt(sum[1]/sum[0]); +// for (c=1; c < colors; c++) +// lab[0][c] *= chratio; +// FORCC for (cam[0][c]=j=0; j < colors; j++) +// cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; +// FORCC image[row*width+col][c] = cam[0][c] / colors; +// } +//} +// +//#define SCALE (4 >> shrink) +//void CLASS recover_highlights() +//{ +// float *map, sum, wgt, grow; +// int hsat[4], count, spread, change, val, i; +// unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; +// ushort *pixel; +// static const signed char dir[8][2] = +// { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; +// +// if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); +// +// grow = pow (2, 4-highlight); +// FORCC hsat[c] = 32000 * pre_mul[c]; +// for (kc=0, c=1; c < colors; c++) +// if (pre_mul[kc] < pre_mul[c]) kc = c; +// high = height / SCALE; +// wide = width / SCALE; +// map = (float *) calloc (high, wide*sizeof *map); +// merror (map, "recover_highlights()"); +// FORCC if (c != kc) { +// memset (map, 0, high*wide*sizeof *map); +// for (mrow=0; mrow < high; mrow++) +// for (mcol=0; mcol < wide; mcol++) { +// sum = wgt = count = 0; +// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +// pixel = image[row*width+col]; +// if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { +// sum += pixel[c]; +// wgt += pixel[kc]; +// count++; +// } +// } +// if (count == SCALE*SCALE) +// map[mrow*wide+mcol] = sum / wgt; +// } +// for (spread = 32/grow; spread--; ) { +// for (mrow=0; mrow < high; mrow++) +// for (mcol=0; mcol < wide; mcol++) { +// if (map[mrow*wide+mcol]) continue; +// sum = count = 0; +// for (d=0; d < 8; d++) { +// y = mrow + dir[d][0]; +// x = mcol + dir[d][1]; +// if (y < high && x < wide && map[y*wide+x] > 0) { +// sum += (1 + (d & 1)) * map[y*wide+x]; +// count += 1 + (d & 1); +// } +// } +// if (count > 3) +// map[mrow*wide+mcol] = - (sum+grow) / (count+grow); +// } +// for (change=i=0; i < high*wide; i++) +// if (map[i] < 0) { +// map[i] = -map[i]; +// change = 1; +// } +// if (!change) break; +// } +// for (i=0; i < high*wide; i++) +// if (map[i] == 0) map[i] = 1; +// for (mrow=0; mrow < high; mrow++) +// for (mcol=0; mcol < wide; mcol++) { +// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +// pixel = image[row*width+col]; +// if (pixel[c] / hsat[c] > 1) { +// val = pixel[kc] * map[mrow*wide+mcol]; +// if (pixel[c] < val) pixel[c] = CLIP(val); +// } +// } +// } +// } +// free (map); +//} +//#undef SCALE void CLASS tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save) @@ -9533,55 +9533,55 @@ notraw: if (flip == UINT_MAX) flip = 0; } -#ifndef NO_LCMS -void CLASS apply_profile (const char *input, const char *output) -{ - char *prof; - cmsHPROFILE hInProfile=0, hOutProfile=0; - cmsHTRANSFORM hTransform; - FILE *fp; - unsigned size; - - if (strcmp (input, "embed")) - hInProfile = cmsOpenProfileFromFile (input, "r"); - else if (profile_length) { - prof = (char *) malloc (profile_length); - merror (prof, "apply_profile()"); - fseek (ifp, profile_offset, SEEK_SET); - fread (prof, 1, profile_length, ifp); - hInProfile = cmsOpenProfileFromMem (prof, profile_length); - free (prof); - } else - fprintf (stderr,_("%s has no embedded profile.\n"), ifname); - if (!hInProfile) return; - if (!output) - hOutProfile = cmsCreate_sRGBProfile(); - else if ((fp = fopen (output, "rb"))) { - fread (&size, 4, 1, fp); - fseek (fp, 0, SEEK_SET); - oprof = (unsigned *) malloc (size = ntohl(size)); - merror (oprof, "apply_profile()"); - fread (oprof, 1, size, fp); - fclose (fp); - if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { - free (oprof); - oprof = 0; - } - } else - fprintf (stderr,_("Cannot open file %s!\n"), output); - if (!hOutProfile) goto quit; - if (verbose) - fprintf (stderr,_("Applying color profile...\n")); - hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, - hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); - cmsDoTransform (hTransform, image, image, width*height); - raw_color = 1; /* Don't use rgb_cam with a profile */ - cmsDeleteTransform (hTransform); - cmsCloseProfile (hOutProfile); -quit: - cmsCloseProfile (hInProfile); -} -#endif +//#ifndef NO_LCMS +//void CLASS apply_profile (const char *input, const char *output) +//{ +// char *prof; +// cmsHPROFILE hInProfile=0, hOutProfile=0; +// cmsHTRANSFORM hTransform; +// FILE *fp; +// unsigned size; +// +// if (strcmp (input, "embed")) +// hInProfile = cmsOpenProfileFromFile (input, "r"); +// else if (profile_length) { +// prof = (char *) malloc (profile_length); +// merror (prof, "apply_profile()"); +// fseek (ifp, profile_offset, SEEK_SET); +// fread (prof, 1, profile_length, ifp); +// hInProfile = cmsOpenProfileFromMem (prof, profile_length); +// free (prof); +// } else +// fprintf (stderr,_("%s has no embedded profile.\n"), ifname); +// if (!hInProfile) return; +// if (!output) +// hOutProfile = cmsCreate_sRGBProfile(); +// else if ((fp = fopen (output, "rb"))) { +// fread (&size, 4, 1, fp); +// fseek (fp, 0, SEEK_SET); +// oprof = (unsigned *) malloc (size = ntohl(size)); +// merror (oprof, "apply_profile()"); +// fread (oprof, 1, size, fp); +// fclose (fp); +// if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { +// free (oprof); +// oprof = 0; +// } +// } else +// fprintf (stderr,_("Cannot open file %s!\n"), output); +// if (!hOutProfile) goto quit; +// if (verbose) +// fprintf (stderr,_("Applying color profile...\n")); +// hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, +// hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); +// cmsDoTransform (hTransform, image, image, width*height); +// raw_color = 1; /* Don't use rgb_cam with a profile */ +// cmsDeleteTransform (hTransform); +// cmsCloseProfile (hOutProfile); +//quit: +// cmsCloseProfile (hInProfile); +//} +//#endif /* RT: DNG Float */ diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 405f202bd..9d15a5826 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -50,7 +50,7 @@ public: ,shot_select(0),multi_out(0) ,float_raw_image(NULL) ,image(NULL) - ,bright(1.),threshold(0.) + ,bright(1.) ,half_size(0),four_color_rgb(0),document_mode(0),highlight(0) ,verbose(0) ,use_auto_wb(0),use_camera_wb(0),use_camera_matrix(1) @@ -344,23 +344,23 @@ void foveon_make_curves(short **curvep, float dq[3], float div[3], float filt); int foveon_apply_curve (short *curve, int i); void foveon_interpolate(); -void xtrans_interpolate (int passes); -void cielab (ushort rgb[3], short lab[3]); +//void xtrans_interpolate (int passes); +//void cielab (ushort rgb[3], short lab[3]); -void remove_zeroes(); -void bad_pixels (const char *cfname); -void subtract (const char *fname); +//void remove_zeroes(); +//void bad_pixels (const char *cfname); +//void subtract (const char *fname); void gamma_curve (double pwr, double ts, int mode, int imax); void pseudoinverse (double (*in)[3], double (*out)[3], int size); void cam_xyz_coeff (float rgb_cam[3][4], double cam_xyz[4][3]); -void hat_transform (float *temp, float *base, int st, int size, int sc); -void wavelet_denoise(); +//void hat_transform (float *temp, float *base, int st, int size, int sc); +//void wavelet_denoise(); void scale_colors(); void pre_interpolate(); -void border_interpolate (int border); -void median_filter(); -void blend_highlights(); -void recover_highlights(); +//void border_interpolate (int border); +//void median_filter(); +//void blend_highlights(); +//void recover_highlights(); void crop_masked_pixels(); void tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save); @@ -397,7 +397,6 @@ void simple_coeff (int index); short guess_byte_order (int words); float find_green (int bps, int bite, int off0, int off1); void identify(); -void apply_profile (const char *input, const char *output); void jpeg_thumb() {} // not needed bool dcraw_coeff_overrides(const char make[], const char model[], int iso_speed, short trans[12], int *black_level, int *white_level); void shiftXtransMatrix( const int offsy, const int offsx) { From 093fa46aa61bfa8800ca8a1a5b0eb3efae9aeb0d Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 17 Oct 2016 22:20:33 +0200 Subject: [PATCH 058/115] Updated dcraw.patch file --- rtengine/dcraw.patch | 1496 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 1443 insertions(+), 53 deletions(-) diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index 82f2ec9b8..e23136d68 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2016-09-30 21:19:28.312191811 +0200 -+++ dcraw.cc 2016-09-30 22:41:28.157442526 +0200 +--- dcraw.c 2016-10-11 13:24:24 +0000 ++++ dcraw.cc 2016-10-17 19:32:24 +0000 @@ -1,3 +1,16 @@ +/*RT*/#include +/*RT*/#include @@ -833,10 +833,468 @@ if (mask[0][3] > 0) goto mask_set; if (load_raw == &CLASS canon_load_raw || load_raw == &CLASS lossless_jpeg_load_raw) { -@@ -4366,239 +4690,8 @@ - } +@@ -3808,127 +4132,127 @@ + } } +-void CLASS remove_zeroes() +-{ +- unsigned row, col, tot, n, r, c; +- +- for (row=0; row < height; row++) +- for (col=0; col < width; col++) +- if (BAYER(row,col) == 0) { +- tot = n = 0; +- for (r = row-2; r <= row+2; r++) +- for (c = col-2; c <= col+2; c++) +- if (r < height && c < width && +- FC(r,c) == FC(row,col) && BAYER(r,c)) +- tot += (n++,BAYER(r,c)); +- if (n) BAYER(row,col) = tot/n; +- } +-} ++//void CLASS remove_zeroes() ++//{ ++// unsigned row, col, tot, n, r, c; ++// ++// for (row=0; row < height; row++) ++// for (col=0; col < width; col++) ++// if (BAYER(row,col) == 0) { ++// tot = n = 0; ++// for (r = row-2; r <= row+2; r++) ++// for (c = col-2; c <= col+2; c++) ++// if (r < height && c < width && ++// FC(r,c) == FC(row,col) && BAYER(r,c)) ++// tot += (n++,BAYER(r,c)); ++// if (n) BAYER(row,col) = tot/n; ++// } ++//} + + /* + Seach from the current directory up to the root looking for + a ".badpixels" file, and fix those pixels now. + */ +-void CLASS bad_pixels (const char *cfname) +-{ +- FILE *fp=0; +- char *fname, *cp, line[128]; +- int len, time, row, col, r, c, rad, tot, n, fixed=0; +- +- if (!filters) return; +- if (cfname) +- fp = fopen (cfname, "r"); +- else { +- for (len=32 ; ; len *= 2) { +- fname = (char *) malloc (len); +- if (!fname) return; +- if (getcwd (fname, len-16)) break; +- free (fname); +- if (errno != ERANGE) return; +- } +-#if defined(WIN32) || defined(DJGPP) +- if (fname[1] == ':') +- memmove (fname, fname+2, len-2); +- for (cp=fname; *cp; cp++) +- if (*cp == '\\') *cp = '/'; +-#endif +- cp = fname + strlen(fname); +- if (cp[-1] == '/') cp--; +- while (*fname == '/') { +- strcpy (cp, "/.badpixels"); +- if ((fp = fopen (fname, "r"))) break; +- if (cp == fname) break; +- while (*--cp != '/'); +- } +- free (fname); +- } +- if (!fp) return; +- while (fgets (line, 128, fp)) { +- cp = strchr (line, '#'); +- if (cp) *cp = 0; +- if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; +- if ((unsigned) col >= width || (unsigned) row >= height) continue; +- if (time > timestamp) continue; +- for (tot=n=0, rad=1; rad < 3 && n==0; rad++) +- for (r = row-rad; r <= row+rad; r++) +- for (c = col-rad; c <= col+rad; c++) +- if ((unsigned) r < height && (unsigned) c < width && +- (r != row || c != col) && fcol(r,c) == fcol(row,col)) { +- tot += BAYER2(r,c); +- n++; +- } +- BAYER2(row,col) = tot/n; +- if (verbose) { +- if (!fixed++) +- fprintf (stderr,_("Fixed dead pixels at:")); +- fprintf (stderr, " %d,%d", col, row); +- } +- } +- if (fixed) fputc ('\n', stderr); +- fclose (fp); +-} +- +-void CLASS subtract (const char *fname) +-{ +- FILE *fp; +- int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; +- ushort *pixel; +- +- if (!(fp = fopen (fname, "rb"))) { +- perror (fname); return; +- } +- if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; +- while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { +- if (c == '#') comment = 1; +- if (c == '\n') comment = 0; +- if (comment) continue; +- if (isdigit(c)) number = 1; +- if (number) { +- if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; +- else if (isspace(c)) { +- number = 0; nd++; +- } else error = 1; +- } +- } +- if (error || nd < 3) { +- fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); +- fclose (fp); return; +- } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { +- fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); +- fclose (fp); return; +- } +- pixel = (ushort *) calloc (width, sizeof *pixel); +- merror (pixel, "subtract()"); +- for (row=0; row < height; row++) { +- fread (pixel, 2, width, fp); +- for (col=0; col < width; col++) +- BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); +- } +- free (pixel); +- fclose (fp); +- memset (cblack, 0, sizeof cblack); +- black = 0; +-} ++//void CLASS bad_pixels (const char *cfname) ++//{ ++// FILE *fp=0; ++// char *fname, *cp, line[128]; ++// int len, time, row, col, r, c, rad, tot, n, fixed=0; ++// ++// if (!filters) return; ++// if (cfname) ++// fp = fopen (cfname, "r"); ++// else { ++// for (len=32 ; ; len *= 2) { ++// fname = (char *) malloc (len); ++// if (!fname) return; ++// if (getcwd (fname, len-16)) break; ++// free (fname); ++// if (errno != ERANGE) return; ++// } ++//#if defined(WIN32) || defined(DJGPP) ++// if (fname[1] == ':') ++// memmove (fname, fname+2, len-2); ++// for (cp=fname; *cp; cp++) ++// if (*cp == '\\') *cp = '/'; ++//#endif ++// cp = fname + strlen(fname); ++// if (cp[-1] == '/') cp--; ++// while (*fname == '/') { ++// strcpy (cp, "/.badpixels"); ++// if ((fp = fopen (fname, "r"))) break; ++// if (cp == fname) break; ++// while (*--cp != '/'); ++// } ++// free (fname); ++// } ++// if (!fp) return; ++// while (fgets (line, 128, fp)) { ++// cp = strchr (line, '#'); ++// if (cp) *cp = 0; ++// if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; ++// if ((unsigned) col >= width || (unsigned) row >= height) continue; ++// if (time > timestamp) continue; ++// for (tot=n=0, rad=1; rad < 3 && n==0; rad++) ++// for (r = row-rad; r <= row+rad; r++) ++// for (c = col-rad; c <= col+rad; c++) ++// if ((unsigned) r < height && (unsigned) c < width && ++// (r != row || c != col) && fcol(r,c) == fcol(row,col)) { ++// tot += BAYER2(r,c); ++// n++; ++// } ++// BAYER2(row,col) = tot/n; ++// if (verbose) { ++// if (!fixed++) ++// fprintf (stderr,_("Fixed dead pixels at:")); ++// fprintf (stderr, " %d,%d", col, row); ++// } ++// } ++// if (fixed) fputc ('\n', stderr); ++// fclose (fp); ++//} ++ ++//void CLASS subtract (const char *fname) ++//{ ++// FILE *fp; ++// int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; ++// ushort *pixel; ++// ++// if (!(fp = fopen (fname, "rb"))) { ++// perror (fname); return; ++// } ++// if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; ++// while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { ++// if (c == '#') comment = 1; ++// if (c == '\n') comment = 0; ++// if (comment) continue; ++// if (isdigit(c)) number = 1; ++// if (number) { ++// if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; ++// else if (isspace(c)) { ++// number = 0; nd++; ++// } else error = 1; ++// } ++// } ++// if (error || nd < 3) { ++// fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); ++// fclose (fp); return; ++// } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { ++// fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); ++// fclose (fp); return; ++// } ++// pixel = (ushort *) calloc (width, sizeof *pixel); ++// merror (pixel, "subtract()"); ++// for (row=0; row < height; row++) { ++// fread (pixel, 2, width, fp); ++// for (col=0; col < width; col++) ++// BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); ++// } ++// free (pixel); ++// fclose (fp); ++// memset (cblack, 0, sizeof cblack); ++// black = 0; ++//} + + void CLASS gamma_curve (double pwr, double ts, int mode, int imax) + { +@@ -4093,94 +4417,94 @@ + } + #endif + +-void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) +-{ +- int i; +- for (i=0; i < sc; i++) +- temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; +- for (; i+sc < size; i++) +- temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; +- for (; i < size; i++) +- temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; +-} +- +-void CLASS wavelet_denoise() +-{ +- float *fimg=0, *temp, thold, mul[2], avg, diff; +- int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; +- ushort *window[4]; +- static const float noise[] = +- { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; +- +- if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); +- +- while (maximum << scale < 0x10000) scale++; +- maximum <<= --scale; +- black <<= scale; +- FORC4 cblack[c] <<= scale; +- if ((size = iheight*iwidth) < 0x15550000) +- fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); +- merror (fimg, "wavelet_denoise()"); +- temp = fimg + size*3; +- if ((nc = colors) == 3 && filters) nc++; +- FORC(nc) { /* denoise R,G1,B,G3 individually */ +- for (i=0; i < size; i++) +- fimg[i] = 256 * sqrt(image[i][c] << scale); +- for (hpass=lev=0; lev < 5; lev++) { +- lpass = size*((lev & 1)+1); +- for (row=0; row < iheight; row++) { +- hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); +- for (col=0; col < iwidth; col++) +- fimg[lpass + row*iwidth + col] = temp[col] * 0.25; +- } +- for (col=0; col < iwidth; col++) { +- hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); +- for (row=0; row < iheight; row++) +- fimg[lpass + row*iwidth + col] = temp[row] * 0.25; +- } +- thold = threshold * noise[lev]; +- for (i=0; i < size; i++) { +- fimg[hpass+i] -= fimg[lpass+i]; +- if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; +- else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; +- else fimg[hpass+i] = 0; +- if (hpass) fimg[i] += fimg[hpass+i]; +- } +- hpass = lpass; +- } +- for (i=0; i < size; i++) +- image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); +- } +- if (filters && colors == 3) { /* pull G1 and G3 closer together */ +- for (row=0; row < 2; row++) { +- mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; +- blk[row] = cblack[FC(row,0) | 1]; +- } +- for (i=0; i < 4; i++) +- window[i] = (ushort *) fimg + width*i; +- for (wlast=-1, row=1; row < height-1; row++) { +- while (wlast < row+1) { +- for (wlast++, i=0; i < 4; i++) +- window[(i+3) & 3] = window[i]; +- for (col = FC(wlast,1) & 1; col < width; col+=2) +- window[2][col] = BAYER(wlast,col); +- } +- thold = threshold/512; +- for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { +- avg = ( window[0][col-1] + window[0][col+1] + +- window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) +- * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; +- avg = avg < 0 ? 0 : sqrt(avg); +- diff = sqrt(BAYER(row,col)) - avg; +- if (diff < -thold) diff += thold; +- else if (diff > thold) diff -= thold; +- else diff = 0; +- BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); +- } +- } +- } +- free (fimg); +-} ++//void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) ++//{ ++// int i; ++// for (i=0; i < sc; i++) ++// temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; ++// for (; i+sc < size; i++) ++// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; ++// for (; i < size; i++) ++// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; ++//} ++ ++//void CLASS wavelet_denoise() ++//{ ++// float *fimg=0, *temp, thold, mul[2], avg, diff; ++// int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ++// ushort *window[4]; ++// static const float noise[] = ++// { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; ++// ++// if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); ++// ++// while (maximum << scale < 0x10000) scale++; ++// maximum <<= --scale; ++// black <<= scale; ++// FORC4 cblack[c] <<= scale; ++// if ((size = iheight*iwidth) < 0x15550000) ++// fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); ++// merror (fimg, "wavelet_denoise()"); ++// temp = fimg + size*3; ++// if ((nc = colors) == 3 && filters) nc++; ++// FORC(nc) { /* denoise R,G1,B,G3 individually */ ++// for (i=0; i < size; i++) ++// fimg[i] = 256 * sqrt(image[i][c] << scale); ++// for (hpass=lev=0; lev < 5; lev++) { ++// lpass = size*((lev & 1)+1); ++// for (row=0; row < iheight; row++) { ++// hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); ++// for (col=0; col < iwidth; col++) ++// fimg[lpass + row*iwidth + col] = temp[col] * 0.25; ++// } ++// for (col=0; col < iwidth; col++) { ++// hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); ++// for (row=0; row < iheight; row++) ++// fimg[lpass + row*iwidth + col] = temp[row] * 0.25; ++// } ++// thold = threshold * noise[lev]; ++// for (i=0; i < size; i++) { ++// fimg[hpass+i] -= fimg[lpass+i]; ++// if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; ++// else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; ++// else fimg[hpass+i] = 0; ++// if (hpass) fimg[i] += fimg[hpass+i]; ++// } ++// hpass = lpass; ++// } ++// for (i=0; i < size; i++) ++// image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); ++// } ++// if (filters && colors == 3) { /* pull G1 and G3 closer together */ ++// for (row=0; row < 2; row++) { ++// mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; ++// blk[row] = cblack[FC(row,0) | 1]; ++// } ++// for (i=0; i < 4; i++) ++// window[i] = (ushort *) fimg + width*i; ++// for (wlast=-1, row=1; row < height-1; row++) { ++// while (wlast < row+1) { ++// for (wlast++, i=0; i < 4; i++) ++// window[(i+3) & 3] = window[i]; ++// for (col = FC(wlast,1) & 1; col < width; col+=2) ++// window[2][col] = BAYER(wlast,col); ++// } ++// thold = threshold/512; ++// for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { ++// avg = ( window[0][col-1] + window[0][col+1] + ++// window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) ++// * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; ++// avg = avg < 0 ? 0 : sqrt(avg); ++// diff = sqrt(BAYER(row,col)) - avg; ++// if (diff < -thold) diff += thold; ++// else if (diff > thold) diff -= thold; ++// else diff = 0; ++// BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); ++// } ++// } ++// } ++// free (fimg); ++//} + + void CLASS scale_colors() + { +@@ -4238,7 +4562,7 @@ + if (pre_mul[3] == 0) pre_mul[3] = colors < 4 ? pre_mul[1] : 1; + dark = black; + sat = maximum; +- if (threshold) wavelet_denoise(); ++// if (threshold) wavelet_denoise(); + maximum -= black; + for (dmin=DBL_MAX, dmax=c=0; c < 4; c++) { + if (dmin > pre_mul[c]) +@@ -4344,776 +4668,440 @@ + if (half_size) filters = 0; + } + +-void CLASS border_interpolate (int border) +-{ +- unsigned row, col, y, x, f, c, sum[8]; +- +- for (row=0; row < height; row++) +- for (col=0; col < width; col++) { +- if (col==border && row >= border && row < height-border) +- col = width-border; +- memset (sum, 0, sizeof sum); +- for (y=row-1; y != row+2; y++) +- for (x=col-1; x != col+2; x++) +- if (y < height && x < width) { +- f = fcol(y,x); +- sum[f] += image[y*width+x][f]; +- sum[f+4]++; +- } +- f = fcol(row,col); +- FORCC if (c != f && sum[c+4]) +- image[row*width+col][c] = sum[c] / sum[c+4]; +- } +-} +- -void CLASS lin_interpolate() -{ - int code[16][16][32], size=16, *ip, sum[4]; @@ -884,8 +1342,7 @@ - This algorithm is officially called: - - "Interpolation using a Threshold-based variable number of gradients" -+/* RT: delete interpolation functions */ - +- - described in http://scien.stanford.edu/pages/labsite/1999/psych221/projects/99/tingchen/algodep/vargra.html - - I've extended the basic idea to work with non-Bayer filter arrays. @@ -1071,13 +1528,271 @@ - pix[0][c] = CLIP((guess[0]+guess[1]) >> 2); - } -} - - void CLASS cielab (ushort rgb[3], short lab[3]) - { -@@ -4864,112 +4957,7 @@ - } - #undef fcol - +- +-void CLASS cielab (ushort rgb[3], short lab[3]) +-{ +- int c, i, j, k; +- float r, xyz[3]; +- static float cbrt[0x10000], xyz_cam[3][4]; +- +- if (!rgb) { +- for (i=0; i < 0x10000; i++) { +- r = i / 65535.0; +- cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; +- } +- for (i=0; i < 3; i++) +- for (j=0; j < colors; j++) +- for (xyz_cam[i][j] = k=0; k < 3; k++) +- xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; +- return; +- } +- xyz[0] = xyz[1] = xyz[2] = 0.5; +- FORCC { +- xyz[0] += xyz_cam[0][c] * rgb[c]; +- xyz[1] += xyz_cam[1][c] * rgb[c]; +- xyz[2] += xyz_cam[2][c] * rgb[c]; +- } +- xyz[0] = cbrt[CLIP((int) xyz[0])]; +- xyz[1] = cbrt[CLIP((int) xyz[1])]; +- xyz[2] = cbrt[CLIP((int) xyz[2])]; +- lab[0] = 64 * (116 * xyz[1] - 16); +- lab[1] = 64 * 500 * (xyz[0] - xyz[1]); +- lab[2] = 64 * 200 * (xyz[1] - xyz[2]); +-} +- +-#define TS 512 /* Tile Size */ +-#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] +- +-/* +- Frank Markesteijn's algorithm for Fuji X-Trans sensors +- */ +-void CLASS xtrans_interpolate (int passes) +-{ +- int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; +- int val, ndir, pass, hm[8], avg[4], color[3][8]; +- static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, +- patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, +- { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, +- dir[4] = { 1,TS,TS+1,TS-1 }; +- short allhex[3][3][2][8], *hex; +- ushort min, max, sgrow, sgcol; +- ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; +- short (*lab) [TS][3], (*lix)[3]; +- float (*drv)[TS][TS], diff[6], tr; +- char (*homo)[TS][TS], *buffer; +- +- if (verbose) +- fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); +- +- cielab (0,0); +- ndir = 4 << (passes > 1); +- buffer = (char *) malloc (TS*TS*(ndir*11+6)); +- merror (buffer, "xtrans_interpolate()"); +- rgb = (ushort(*)[TS][TS][3]) buffer; +- lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); +- drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); +- homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); +- +-/* Map a green hexagon around each non-green pixel and vice versa: */ +- for (row=0; row < 3; row++) +- for (col=0; col < 3; col++) +- for (ng=d=0; d < 10; d+=2) { +- g = fcol(row,col) == 1; +- if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; +- if (ng == 4) { sgrow = row; sgcol = col; } +- if (ng == g+1) FORC(8) { +- v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; +- h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; +- allhex[row][col][0][c^(g*2 & d)] = h + v*width; +- allhex[row][col][1][c^(g*2 & d)] = h + v*TS; +- } +- } +- +-/* Set green1 and green3 to the minimum and maximum allowed values: */ +- for (row=2; row < height-2; row++) +- for (min=~(max=0), col=2; col < width-2; col++) { +- if (fcol(row,col) == 1 && (min=~(max=0))) continue; +- pix = image + row*width + col; +- hex = allhex[row % 3][col % 3][0]; +- if (!max) FORC(6) { +- val = pix[hex[c]][1]; +- if (min > val) min = val; +- if (max < val) max = val; +- } +- pix[0][1] = min; +- pix[0][3] = max; +- switch ((row-sgrow) % 3) { +- case 1: if (row < height-3) { row++; col--; } break; +- case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; +- } +- } +- +- for (top=3; top < height-19; top += TS-16) +- for (left=3; left < width-19; left += TS-16) { +- mrow = MIN (top+TS, height-3); +- mcol = MIN (left+TS, width-3); +- for (row=top; row < mrow; row++) +- for (col=left; col < mcol; col++) +- memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); +- FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); +- +-/* Interpolate green horizontally, vertically, and along both diagonals: */ +- for (row=top; row < mrow; row++) +- for (col=left; col < mcol; col++) { +- if ((f = fcol(row,col)) == 1) continue; +- pix = image + row*width + col; +- hex = allhex[row % 3][col % 3][0]; +- color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - +- 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); +- color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + +- 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); +- FORC(2) color[1][2+c] = +- 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * +- (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); +- FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = +- LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); +- } +- +- for (pass=0; pass < passes; pass++) { +- if (pass == 1) +- memcpy (rgb+=4, buffer, 4*sizeof *rgb); +- +-/* Recalculate green from interpolated values of closer pixels: */ +- if (pass) { +- for (row=top+2; row < mrow-2; row++) +- for (col=left+2; col < mcol-2; col++) { +- if ((f = fcol(row,col)) == 1) continue; +- pix = image + row*width + col; +- hex = allhex[row % 3][col % 3][1]; +- for (d=3; d < 6; d++) { +- rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; +- val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] +- - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; +- rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); +- } +- } +- } +- +-/* Interpolate red and blue values for solitary green pixels: */ +- for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) +- for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { +- rix = &rgb[0][row-top][col-left]; +- h = fcol(row,col+1); +- memset (diff, 0, sizeof diff); +- for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { +- for (c=0; c < 2; c++, h^=2) { +- g = 2*rix[0][1] - rix[i< 1) +- diff[d] += SQR (rix[i< 1 && (d & 1)) +- if (diff[d-1] < diff[d]) +- FORC(2) color[c*2][d] = color[c*2][d-1]; +- if (d < 2 || (d & 1)) { +- FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); +- rix += TS*TS; +- } +- } +- } +- +-/* Interpolate red for blue pixels and vice versa: */ +- for (row=top+3; row < mrow-3; row++) +- for (col=left+3; col < mcol-3; col++) { +- if ((f = 2-fcol(row,col)) == 1) continue; +- rix = &rgb[0][row-top][col-left]; +- c = (row-sgrow) % 3 ? TS:1; +- h = 3 * (c ^ TS ^ 1); +- for (d=0; d < 4; d++, rix += TS*TS) { +- i = d > 1 || ((d ^ c) & 1) || +- ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < +- 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; +- rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + +- 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); +- } +- } +- +-/* Fill in red and blue for 2x2 blocks of green: */ +- for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) +- for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { +- rix = &rgb[0][row-top][col-left]; +- hex = allhex[row % 3][col % 3][1]; +- for (d=0; d < ndir; d+=2, rix += TS*TS) +- if (hex[d] + hex[d+1]) { +- g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; +- for (c=0; c < 4; c+=2) rix[0][c] = +- CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); +- } else { +- g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; +- for (c=0; c < 4; c+=2) rix[0][c] = +- CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); +- } +- } +- } +- rgb = (ushort(*)[TS][TS][3]) buffer; +- mrow -= top; +- mcol -= left; +- +-/* Convert to CIELab and differentiate in all directions: */ +- for (d=0; d < ndir; d++) { +- for (row=2; row < mrow-2; row++) +- for (col=2; col < mcol-2; col++) +- cielab (rgb[d][row][col], lab[row][col]); +- for (f=dir[d & 3],row=3; row < mrow-3; row++) +- for (col=3; col < mcol-3; col++) { +- lix = &lab[row][col]; +- g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; +- drv[d][row][col] = SQR(g) +- + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) +- + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); +- } +- } +- +-/* Build homogeneity maps from the derivatives: */ +- memset(homo, 0, ndir*TS*TS); +- for (row=4; row < mrow-4; row++) +- for (col=4; col < mcol-4; col++) { +- for (tr=FLT_MAX, d=0; d < ndir; d++) +- if (tr > drv[d][row][col]) +- tr = drv[d][row][col]; +- tr *= 8; +- for (d=0; d < ndir; d++) +- for (v=-1; v <= 1; v++) +- for (h=-1; h <= 1; h++) +- if (drv[d][row+v][col+h] <= tr) +- homo[d][row][col]++; +- } +- +-/* Average the most homogenous pixels for the final result: */ +- if (height-top < TS+4) mrow = height-top+2; +- if (width-left < TS+4) mcol = width-left+2; +- for (row = MIN(top,8); row < mrow-8; row++) +- for (col = MIN(left,8); col < mcol-8; col++) { +- for (d=0; d < ndir; d++) +- for (hm[d]=0, v=-2; v <= 2; v++) +- for (h=-2; h <= 2; h++) +- hm[d] += homo[d][row+v][col+h]; +- for (d=0; d < ndir-4; d++) +- if (hm[d] < hm[d+4]) hm[d ] = 0; else +- if (hm[d] > hm[d+4]) hm[d+4] = 0; +- for (max=hm[0],d=1; d < ndir; d++) +- if (max < hm[d]) max = hm[d]; +- max -= max >> 3; +- memset (avg, 0, sizeof avg); +- for (d=0; d < ndir; d++) +- if (hm[d] >= max) { +- FORC3 avg[c] += rgb[d][row][col][c]; +- avg[3]++; +- } +- FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; +- } +- } +- free(buffer); +- border_interpolate(8); +-} +-#undef fcol +- -/* - Adaptive Homogeneity-Directed interpolation is based on - the work of Keigo Hirakawa, Thomas Parks, and Paul Lee. @@ -1103,7 +1818,7 @@ - - for (top=2; top < height-5; top += TS-6) - for (left=2; left < width-5; left += TS-6) { - +- -/* Interpolate green horizontally and vertically: */ - for (row=top; row < top+TS && row < height-2; row++) { - col = left + (FC(row,left) & 1); @@ -1184,9 +1899,587 @@ - } - free (buffer); -} - #undef TS +-#undef TS +- +-void CLASS median_filter() +-{ +- ushort (*pix)[4]; +- int pass, c, i, j, k, med[9]; +- static const uchar opt[] = /* Optimal 9-element median search */ +- { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, +- 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; +- +- for (pass=1; pass <= med_passes; pass++) { +- if (verbose) +- fprintf (stderr,_("Median filter pass %d...\n"), pass); +- for (c=0; c < 3; c+=2) { +- for (pix = image; pix < image+width*height; pix++) +- pix[0][3] = pix[0][c]; +- for (pix = image+width; pix < image+width*(height-1); pix++) { +- if ((pix-image+1) % width < 2) continue; +- for (k=0, i = -width; i <= width; i += width) +- for (j = i-1; j <= i+1; j++) +- med[k++] = pix[j][3] - pix[j][1]; +- for (i=0; i < sizeof opt; i+=2) +- if (med[opt[i]] > med[opt[i+1]]) +- SWAP (med[opt[i]] , med[opt[i+1]]); +- pix[0][c] = CLIP(med[4] + pix[0][1]); +- } +- } +- } +-} +- +-void CLASS blend_highlights() +-{ +- int clip=INT_MAX, row, col, c, i, j; +- static const float trans[2][4][4] = +- { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, +- { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +- static const float itrans[2][4][4] = +- { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, +- { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +- float cam[2][4], lab[2][4], sum[2], chratio; +- +- if ((unsigned) (colors-3) > 1) return; +- if (verbose) fprintf (stderr,_("Blending highlights...\n")); +- FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; +- for (row=0; row < height; row++) +- for (col=0; col < width; col++) { +- FORCC if (image[row*width+col][c] > clip) break; +- if (c == colors) continue; +- FORCC { +- cam[0][c] = image[row*width+col][c]; +- cam[1][c] = MIN(cam[0][c],clip); +- } +- for (i=0; i < 2; i++) { +- FORCC for (lab[i][c]=j=0; j < colors; j++) +- lab[i][c] += trans[colors-3][c][j] * cam[i][j]; +- for (sum[i]=0,c=1; c < colors; c++) +- sum[i] += SQR(lab[i][c]); +- } +- chratio = sqrt(sum[1]/sum[0]); +- for (c=1; c < colors; c++) +- lab[0][c] *= chratio; +- FORCC for (cam[0][c]=j=0; j < colors; j++) +- cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; +- FORCC image[row*width+col][c] = cam[0][c] / colors; +- } +-} +- +-#define SCALE (4 >> shrink) +-void CLASS recover_highlights() +-{ +- float *map, sum, wgt, grow; +- int hsat[4], count, spread, change, val, i; +- unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; +- ushort *pixel; +- static const signed char dir[8][2] = +- { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; +- +- if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); +- +- grow = pow (2, 4-highlight); +- FORCC hsat[c] = 32000 * pre_mul[c]; +- for (kc=0, c=1; c < colors; c++) +- if (pre_mul[kc] < pre_mul[c]) kc = c; +- high = height / SCALE; +- wide = width / SCALE; +- map = (float *) calloc (high, wide*sizeof *map); +- merror (map, "recover_highlights()"); +- FORCC if (c != kc) { +- memset (map, 0, high*wide*sizeof *map); +- for (mrow=0; mrow < high; mrow++) +- for (mcol=0; mcol < wide; mcol++) { +- sum = wgt = count = 0; +- for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +- for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +- pixel = image[row*width+col]; +- if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { +- sum += pixel[c]; +- wgt += pixel[kc]; +- count++; +- } +- } +- if (count == SCALE*SCALE) +- map[mrow*wide+mcol] = sum / wgt; +- } +- for (spread = 32/grow; spread--; ) { +- for (mrow=0; mrow < high; mrow++) +- for (mcol=0; mcol < wide; mcol++) { +- if (map[mrow*wide+mcol]) continue; +- sum = count = 0; +- for (d=0; d < 8; d++) { +- y = mrow + dir[d][0]; +- x = mcol + dir[d][1]; +- if (y < high && x < wide && map[y*wide+x] > 0) { +- sum += (1 + (d & 1)) * map[y*wide+x]; +- count += 1 + (d & 1); +- } +- } +- if (count > 3) +- map[mrow*wide+mcol] = - (sum+grow) / (count+grow); +- } +- for (change=i=0; i < high*wide; i++) +- if (map[i] < 0) { +- map[i] = -map[i]; +- change = 1; +- } +- if (!change) break; +- } +- for (i=0; i < high*wide; i++) +- if (map[i] == 0) map[i] = 1; +- for (mrow=0; mrow < high; mrow++) +- for (mcol=0; mcol < wide; mcol++) { +- for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +- for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +- pixel = image[row*width+col]; +- if (pixel[c] / hsat[c] > 1) { +- val = pixel[kc] * map[mrow*wide+mcol]; +- if (pixel[c] < val) pixel[c] = CLIP(val); +- } +- } +- } +- } +- free (map); +-} +-#undef SCALE ++//void CLASS border_interpolate (int border) ++//{ ++// unsigned row, col, y, x, f, c, sum[8]; ++// ++// for (row=0; row < height; row++) ++// for (col=0; col < width; col++) { ++// if (col==border && row >= border && row < height-border) ++// col = width-border; ++// memset (sum, 0, sizeof sum); ++// for (y=row-1; y != row+2; y++) ++// for (x=col-1; x != col+2; x++) ++// if (y < height && x < width) { ++// f = fcol(y,x); ++// sum[f] += image[y*width+x][f]; ++// sum[f+4]++; ++// } ++// f = fcol(row,col); ++// FORCC if (c != f && sum[c+4]) ++// image[row*width+col][c] = sum[c] / sum[c+4]; ++// } ++//} ++ ++/* RT: delete interpolation functions */ ++ ++ ++//void CLASS cielab (ushort rgb[3], short lab[3]) ++//{ ++// int c, i, j, k; ++// float r, xyz[3]; ++// static float cbrt[0x10000], xyz_cam[3][4]; ++// ++// if (!rgb) { ++// for (i=0; i < 0x10000; i++) { ++// r = i / 65535.0; ++// cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; ++// } ++// for (i=0; i < 3; i++) ++// for (j=0; j < colors; j++) ++// for (xyz_cam[i][j] = k=0; k < 3; k++) ++// xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; ++// return; ++// } ++// xyz[0] = xyz[1] = xyz[2] = 0.5; ++// FORCC { ++// xyz[0] += xyz_cam[0][c] * rgb[c]; ++// xyz[1] += xyz_cam[1][c] * rgb[c]; ++// xyz[2] += xyz_cam[2][c] * rgb[c]; ++// } ++// xyz[0] = cbrt[CLIP((int) xyz[0])]; ++// xyz[1] = cbrt[CLIP((int) xyz[1])]; ++// xyz[2] = cbrt[CLIP((int) xyz[2])]; ++// lab[0] = 64 * (116 * xyz[1] - 16); ++// lab[1] = 64 * 500 * (xyz[0] - xyz[1]); ++// lab[2] = 64 * 200 * (xyz[1] - xyz[2]); ++//} ++// ++//#define TS 512 /* Tile Size */ ++//#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] ++// ++///* ++// Frank Markesteijn's algorithm for Fuji X-Trans sensors ++// */ ++//void CLASS xtrans_interpolate (int passes) ++//{ ++// int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; ++// int val, ndir, pass, hm[8], avg[4], color[3][8]; ++// static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, ++// patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, ++// { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, ++// dir[4] = { 1,TS,TS+1,TS-1 }; ++// short allhex[3][3][2][8], *hex; ++// ushort min, max, sgrow, sgcol; ++// ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; ++// short (*lab) [TS][3], (*lix)[3]; ++// float (*drv)[TS][TS], diff[6], tr; ++// char (*homo)[TS][TS], *buffer; ++// ++// if (verbose) ++// fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); ++// ++// cielab (0,0); ++// ndir = 4 << (passes > 1); ++// buffer = (char *) malloc (TS*TS*(ndir*11+6)); ++// merror (buffer, "xtrans_interpolate()"); ++// rgb = (ushort(*)[TS][TS][3]) buffer; ++// lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); ++// drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); ++// homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); ++// ++///* Map a green hexagon around each non-green pixel and vice versa: */ ++// for (row=0; row < 3; row++) ++// for (col=0; col < 3; col++) ++// for (ng=d=0; d < 10; d+=2) { ++// g = fcol(row,col) == 1; ++// if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; ++// if (ng == 4) { sgrow = row; sgcol = col; } ++// if (ng == g+1) FORC(8) { ++// v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; ++// h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; ++// allhex[row][col][0][c^(g*2 & d)] = h + v*width; ++// allhex[row][col][1][c^(g*2 & d)] = h + v*TS; ++// } ++// } ++// ++///* Set green1 and green3 to the minimum and maximum allowed values: */ ++// for (row=2; row < height-2; row++) ++// for (min=~(max=0), col=2; col < width-2; col++) { ++// if (fcol(row,col) == 1 && (min=~(max=0))) continue; ++// pix = image + row*width + col; ++// hex = allhex[row % 3][col % 3][0]; ++// if (!max) FORC(6) { ++// val = pix[hex[c]][1]; ++// if (min > val) min = val; ++// if (max < val) max = val; ++// } ++// pix[0][1] = min; ++// pix[0][3] = max; ++// switch ((row-sgrow) % 3) { ++// case 1: if (row < height-3) { row++; col--; } break; ++// case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; ++// } ++// } ++// ++// for (top=3; top < height-19; top += TS-16) ++// for (left=3; left < width-19; left += TS-16) { ++// mrow = MIN (top+TS, height-3); ++// mcol = MIN (left+TS, width-3); ++// for (row=top; row < mrow; row++) ++// for (col=left; col < mcol; col++) ++// memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); ++// FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); ++// ++///* Interpolate green horizontally, vertically, and along both diagonals: */ ++// for (row=top; row < mrow; row++) ++// for (col=left; col < mcol; col++) { ++// if ((f = fcol(row,col)) == 1) continue; ++// pix = image + row*width + col; ++// hex = allhex[row % 3][col % 3][0]; ++// color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - ++// 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); ++// color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + ++// 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); ++// FORC(2) color[1][2+c] = ++// 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * ++// (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); ++// FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = ++// LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); ++// } ++// ++// for (pass=0; pass < passes; pass++) { ++// if (pass == 1) ++// memcpy (rgb+=4, buffer, 4*sizeof *rgb); ++// ++///* Recalculate green from interpolated values of closer pixels: */ ++// if (pass) { ++// for (row=top+2; row < mrow-2; row++) ++// for (col=left+2; col < mcol-2; col++) { ++// if ((f = fcol(row,col)) == 1) continue; ++// pix = image + row*width + col; ++// hex = allhex[row % 3][col % 3][1]; ++// for (d=3; d < 6; d++) { ++// rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; ++// val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] ++// - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; ++// rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); ++// } ++// } ++// } ++// ++///* Interpolate red and blue values for solitary green pixels: */ ++// for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) ++// for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { ++// rix = &rgb[0][row-top][col-left]; ++// h = fcol(row,col+1); ++// memset (diff, 0, sizeof diff); ++// for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { ++// for (c=0; c < 2; c++, h^=2) { ++// g = 2*rix[0][1] - rix[i< 1) ++// diff[d] += SQR (rix[i< 1 && (d & 1)) ++// if (diff[d-1] < diff[d]) ++// FORC(2) color[c*2][d] = color[c*2][d-1]; ++// if (d < 2 || (d & 1)) { ++// FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); ++// rix += TS*TS; ++// } ++// } ++// } ++// ++///* Interpolate red for blue pixels and vice versa: */ ++// for (row=top+3; row < mrow-3; row++) ++// for (col=left+3; col < mcol-3; col++) { ++// if ((f = 2-fcol(row,col)) == 1) continue; ++// rix = &rgb[0][row-top][col-left]; ++// c = (row-sgrow) % 3 ? TS:1; ++// h = 3 * (c ^ TS ^ 1); ++// for (d=0; d < 4; d++, rix += TS*TS) { ++// i = d > 1 || ((d ^ c) & 1) || ++// ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < ++// 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; ++// rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + ++// 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); ++// } ++// } ++// ++///* Fill in red and blue for 2x2 blocks of green: */ ++// for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) ++// for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { ++// rix = &rgb[0][row-top][col-left]; ++// hex = allhex[row % 3][col % 3][1]; ++// for (d=0; d < ndir; d+=2, rix += TS*TS) ++// if (hex[d] + hex[d+1]) { ++// g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; ++// for (c=0; c < 4; c+=2) rix[0][c] = ++// CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); ++// } else { ++// g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; ++// for (c=0; c < 4; c+=2) rix[0][c] = ++// CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); ++// } ++// } ++// } ++// rgb = (ushort(*)[TS][TS][3]) buffer; ++// mrow -= top; ++// mcol -= left; ++// ++///* Convert to CIELab and differentiate in all directions: */ ++// for (d=0; d < ndir; d++) { ++// for (row=2; row < mrow-2; row++) ++// for (col=2; col < mcol-2; col++) ++// cielab (rgb[d][row][col], lab[row][col]); ++// for (f=dir[d & 3],row=3; row < mrow-3; row++) ++// for (col=3; col < mcol-3; col++) { ++// lix = &lab[row][col]; ++// g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; ++// drv[d][row][col] = SQR(g) ++// + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) ++// + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); ++// } ++// } ++// ++///* Build homogeneity maps from the derivatives: */ ++// memset(homo, 0, ndir*TS*TS); ++// for (row=4; row < mrow-4; row++) ++// for (col=4; col < mcol-4; col++) { ++// for (tr=FLT_MAX, d=0; d < ndir; d++) ++// if (tr > drv[d][row][col]) ++// tr = drv[d][row][col]; ++// tr *= 8; ++// for (d=0; d < ndir; d++) ++// for (v=-1; v <= 1; v++) ++// for (h=-1; h <= 1; h++) ++// if (drv[d][row+v][col+h] <= tr) ++// homo[d][row][col]++; ++// } ++// ++///* Average the most homogenous pixels for the final result: */ ++// if (height-top < TS+4) mrow = height-top+2; ++// if (width-left < TS+4) mcol = width-left+2; ++// for (row = MIN(top,8); row < mrow-8; row++) ++// for (col = MIN(left,8); col < mcol-8; col++) { ++// for (d=0; d < ndir; d++) ++// for (hm[d]=0, v=-2; v <= 2; v++) ++// for (h=-2; h <= 2; h++) ++// hm[d] += homo[d][row+v][col+h]; ++// for (d=0; d < ndir-4; d++) ++// if (hm[d] < hm[d+4]) hm[d ] = 0; else ++// if (hm[d] > hm[d+4]) hm[d+4] = 0; ++// for (max=hm[0],d=1; d < ndir; d++) ++// if (max < hm[d]) max = hm[d]; ++// max -= max >> 3; ++// memset (avg, 0, sizeof avg); ++// for (d=0; d < ndir; d++) ++// if (hm[d] >= max) { ++// FORC3 avg[c] += rgb[d][row][col][c]; ++// avg[3]++; ++// } ++// FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; ++// } ++// } ++// free(buffer); ++// border_interpolate(8); ++//} ++//#undef fcol ++// ++// ++//#undef TS ++ ++//void CLASS median_filter() ++//{ ++// ushort (*pix)[4]; ++// int pass, c, i, j, k, med[9]; ++// static const uchar opt[] = /* Optimal 9-element median search */ ++// { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, ++// 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; ++// ++// for (pass=1; pass <= med_passes; pass++) { ++// if (verbose) ++// fprintf (stderr,_("Median filter pass %d...\n"), pass); ++// for (c=0; c < 3; c+=2) { ++// for (pix = image; pix < image+width*height; pix++) ++// pix[0][3] = pix[0][c]; ++// for (pix = image+width; pix < image+width*(height-1); pix++) { ++// if ((pix-image+1) % width < 2) continue; ++// for (k=0, i = -width; i <= width; i += width) ++// for (j = i-1; j <= i+1; j++) ++// med[k++] = pix[j][3] - pix[j][1]; ++// for (i=0; i < sizeof opt; i+=2) ++// if (med[opt[i]] > med[opt[i+1]]) ++// SWAP (med[opt[i]] , med[opt[i+1]]); ++// pix[0][c] = CLIP(med[4] + pix[0][1]); ++// } ++// } ++// } ++//} ++// ++//void CLASS blend_highlights() ++//{ ++// int clip=INT_MAX, row, col, c, i, j; ++// static const float trans[2][4][4] = ++// { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, ++// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; ++// static const float itrans[2][4][4] = ++// { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, ++// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; ++// float cam[2][4], lab[2][4], sum[2], chratio; ++// ++// if ((unsigned) (colors-3) > 1) return; ++// if (verbose) fprintf (stderr,_("Blending highlights...\n")); ++// FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; ++// for (row=0; row < height; row++) ++// for (col=0; col < width; col++) { ++// FORCC if (image[row*width+col][c] > clip) break; ++// if (c == colors) continue; ++// FORCC { ++// cam[0][c] = image[row*width+col][c]; ++// cam[1][c] = MIN(cam[0][c],clip); ++// } ++// for (i=0; i < 2; i++) { ++// FORCC for (lab[i][c]=j=0; j < colors; j++) ++// lab[i][c] += trans[colors-3][c][j] * cam[i][j]; ++// for (sum[i]=0,c=1; c < colors; c++) ++// sum[i] += SQR(lab[i][c]); ++// } ++// chratio = sqrt(sum[1]/sum[0]); ++// for (c=1; c < colors; c++) ++// lab[0][c] *= chratio; ++// FORCC for (cam[0][c]=j=0; j < colors; j++) ++// cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; ++// FORCC image[row*width+col][c] = cam[0][c] / colors; ++// } ++//} ++// ++//#define SCALE (4 >> shrink) ++//void CLASS recover_highlights() ++//{ ++// float *map, sum, wgt, grow; ++// int hsat[4], count, spread, change, val, i; ++// unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; ++// ushort *pixel; ++// static const signed char dir[8][2] = ++// { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; ++// ++// if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); ++// ++// grow = pow (2, 4-highlight); ++// FORCC hsat[c] = 32000 * pre_mul[c]; ++// for (kc=0, c=1; c < colors; c++) ++// if (pre_mul[kc] < pre_mul[c]) kc = c; ++// high = height / SCALE; ++// wide = width / SCALE; ++// map = (float *) calloc (high, wide*sizeof *map); ++// merror (map, "recover_highlights()"); ++// FORCC if (c != kc) { ++// memset (map, 0, high*wide*sizeof *map); ++// for (mrow=0; mrow < high; mrow++) ++// for (mcol=0; mcol < wide; mcol++) { ++// sum = wgt = count = 0; ++// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) ++// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { ++// pixel = image[row*width+col]; ++// if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { ++// sum += pixel[c]; ++// wgt += pixel[kc]; ++// count++; ++// } ++// } ++// if (count == SCALE*SCALE) ++// map[mrow*wide+mcol] = sum / wgt; ++// } ++// for (spread = 32/grow; spread--; ) { ++// for (mrow=0; mrow < high; mrow++) ++// for (mcol=0; mcol < wide; mcol++) { ++// if (map[mrow*wide+mcol]) continue; ++// sum = count = 0; ++// for (d=0; d < 8; d++) { ++// y = mrow + dir[d][0]; ++// x = mcol + dir[d][1]; ++// if (y < high && x < wide && map[y*wide+x] > 0) { ++// sum += (1 + (d & 1)) * map[y*wide+x]; ++// count += 1 + (d & 1); ++// } ++// } ++// if (count > 3) ++// map[mrow*wide+mcol] = - (sum+grow) / (count+grow); ++// } ++// for (change=i=0; i < high*wide; i++) ++// if (map[i] < 0) { ++// map[i] = -map[i]; ++// change = 1; ++// } ++// if (!change) break; ++// } ++// for (i=0; i < high*wide; i++) ++// if (map[i] == 0) map[i] = 1; ++// for (mrow=0; mrow < high; mrow++) ++// for (mcol=0; mcol < wide; mcol++) { ++// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) ++// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { ++// pixel = image[row*width+col]; ++// if (pixel[c] / hsat[c] > 1) { ++// val = pixel[kc] * map[mrow*wide+mcol]; ++// if (pixel[c] < val) pixel[c] = CLIP(val); ++// } ++// } ++// } ++// } ++// free (map); ++//} ++//#undef SCALE - void CLASS median_filter() + void CLASS tiff_get (unsigned base, + unsigned *tag, unsigned *type, unsigned *len, unsigned *save) @@ -5139,7 +5127,7 @@ } } @@ -1783,9 +3076,141 @@ is_raw = 0; #ifdef NO_JASPER if (load_raw == &CLASS redcine_load_raw) { -@@ -9452,199 +9583,250 @@ +@@ -9402,249 +9533,300 @@ + if (flip == UINT_MAX) flip = 0; } - #endif + +-#ifndef NO_LCMS +-void CLASS apply_profile (const char *input, const char *output) +-{ +- char *prof; +- cmsHPROFILE hInProfile=0, hOutProfile=0; +- cmsHTRANSFORM hTransform; +- FILE *fp; +- unsigned size; +- +- if (strcmp (input, "embed")) +- hInProfile = cmsOpenProfileFromFile (input, "r"); +- else if (profile_length) { +- prof = (char *) malloc (profile_length); +- merror (prof, "apply_profile()"); +- fseek (ifp, profile_offset, SEEK_SET); +- fread (prof, 1, profile_length, ifp); +- hInProfile = cmsOpenProfileFromMem (prof, profile_length); +- free (prof); +- } else +- fprintf (stderr,_("%s has no embedded profile.\n"), ifname); +- if (!hInProfile) return; +- if (!output) +- hOutProfile = cmsCreate_sRGBProfile(); +- else if ((fp = fopen (output, "rb"))) { +- fread (&size, 4, 1, fp); +- fseek (fp, 0, SEEK_SET); +- oprof = (unsigned *) malloc (size = ntohl(size)); +- merror (oprof, "apply_profile()"); +- fread (oprof, 1, size, fp); +- fclose (fp); +- if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { +- free (oprof); +- oprof = 0; ++//#ifndef NO_LCMS ++//void CLASS apply_profile (const char *input, const char *output) ++//{ ++// char *prof; ++// cmsHPROFILE hInProfile=0, hOutProfile=0; ++// cmsHTRANSFORM hTransform; ++// FILE *fp; ++// unsigned size; ++// ++// if (strcmp (input, "embed")) ++// hInProfile = cmsOpenProfileFromFile (input, "r"); ++// else if (profile_length) { ++// prof = (char *) malloc (profile_length); ++// merror (prof, "apply_profile()"); ++// fseek (ifp, profile_offset, SEEK_SET); ++// fread (prof, 1, profile_length, ifp); ++// hInProfile = cmsOpenProfileFromMem (prof, profile_length); ++// free (prof); ++// } else ++// fprintf (stderr,_("%s has no embedded profile.\n"), ifname); ++// if (!hInProfile) return; ++// if (!output) ++// hOutProfile = cmsCreate_sRGBProfile(); ++// else if ((fp = fopen (output, "rb"))) { ++// fread (&size, 4, 1, fp); ++// fseek (fp, 0, SEEK_SET); ++// oprof = (unsigned *) malloc (size = ntohl(size)); ++// merror (oprof, "apply_profile()"); ++// fread (oprof, 1, size, fp); ++// fclose (fp); ++// if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { ++// free (oprof); ++// oprof = 0; ++// } ++// } else ++// fprintf (stderr,_("Cannot open file %s!\n"), output); ++// if (!hOutProfile) goto quit; ++// if (verbose) ++// fprintf (stderr,_("Applying color profile...\n")); ++// hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, ++// hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); ++// cmsDoTransform (hTransform, image, image, width*height); ++// raw_color = 1; /* Don't use rgb_cam with a profile */ ++// cmsDeleteTransform (hTransform); ++// cmsCloseProfile (hOutProfile); ++//quit: ++// cmsCloseProfile (hInProfile); ++//} ++//#endif ++ ++/* RT: DNG Float */ ++ ++#include ++#include ++ ++static void decodeFPDeltaRow(Bytef * src, Bytef * dst, size_t tileWidth, size_t realTileWidth, int bytesps, int factor) { ++ // DecodeDeltaBytes ++ for (size_t col = factor; col < realTileWidth*bytesps; ++col) { ++ src[col] += src[col - factor]; ++ } ++ // Reorder bytes into the image ++ // 16 and 32-bit versions depend on local architecture, 24-bit does not ++ if (bytesps == 3) { ++ for (size_t col = 0; col < tileWidth; ++col) { ++ dst[col*3] = src[col]; ++ dst[col*3 + 1] = src[col + realTileWidth]; ++ dst[col*3 + 2] = src[col + realTileWidth*2]; + } +- } else +- fprintf (stderr,_("Cannot open file %s!\n"), output); +- if (!hOutProfile) goto quit; +- if (verbose) +- fprintf (stderr,_("Applying color profile...\n")); +- hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, +- hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); +- cmsDoTransform (hTransform, image, image, width*height); +- raw_color = 1; /* Don't use rgb_cam with a profile */ +- cmsDeleteTransform (hTransform); +- cmsCloseProfile (hOutProfile); +-quit: +- cmsCloseProfile (hInProfile); ++ } else { ++ union X { uint32_t x; uint8_t c; }; ++ if (((union X){1}).c) { ++ for (size_t col = 0; col < tileWidth; ++col) { ++ for (size_t byte = 0; byte < bytesps; ++byte) ++ dst[col*bytesps + byte] = src[col + realTileWidth*(bytesps-byte-1)]; // Little endian ++ } ++ } else { ++ for (size_t col = 0; col < tileWidth; ++col) { ++ for (size_t byte = 0; byte < bytesps; ++byte) ++ dst[col*bytesps + byte] = src[col + realTileWidth*byte]; ++ } ++ } ++ } ++ + } +-#endif -void CLASS convert_to_rgb() -{ @@ -1872,41 +3297,6 @@ - for (j=0; j < colors; j++) - for (out_cam[i][j] = k=0; k < 3; k++) - out_cam[i][j] += out_rgb[output_color-1][i][k] * rgb_cam[k][j]; -+/* RT: DNG Float */ -+ -+#include -+#include -+ -+static void decodeFPDeltaRow(Bytef * src, Bytef * dst, size_t tileWidth, size_t realTileWidth, int bytesps, int factor) { -+ // DecodeDeltaBytes -+ for (size_t col = factor; col < realTileWidth*bytesps; ++col) { -+ src[col] += src[col - factor]; -+ } -+ // Reorder bytes into the image -+ // 16 and 32-bit versions depend on local architecture, 24-bit does not -+ if (bytesps == 3) { -+ for (size_t col = 0; col < tileWidth; ++col) { -+ dst[col*3] = src[col]; -+ dst[col*3 + 1] = src[col + realTileWidth]; -+ dst[col*3 + 2] = src[col + realTileWidth*2]; -+ } -+ } else { -+ union X { uint32_t x; uint8_t c; }; -+ if (((union X){1}).c) { -+ for (size_t col = 0; col < tileWidth; ++col) { -+ for (size_t byte = 0; byte < bytesps; ++byte) -+ dst[col*bytesps + byte] = src[col + realTileWidth*(bytesps-byte-1)]; // Little endian -+ } -+ } else { -+ for (size_t col = 0; col < tileWidth; ++col) { -+ for (size_t byte = 0; byte < bytesps; ++byte) -+ dst[col*bytesps + byte] = src[col + realTileWidth*byte]; -+ } -+ } -+ } -+ -+} -+ +// From DNG SDK dng_utils.h +static inline uint32_t DNG_HalfToFloat(uint16_t halfValue) { + int32_t sign = (halfValue >> 15) & 0x00000001; From f9f4fe90354d5c3dad516dc305000dfa01446654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 17:12:50 +0200 Subject: [PATCH 059/115] Revert `rtengine/dcraw.cc` --- rtengine/dcraw.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 8acfd6187..3593f2777 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=nullptr, (*ip)[4]; + short *rp=0, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=nullptr; + ushort *pixel=0; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return nullptr; + return 0; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return nullptr; + return 0; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4155,7 +4155,7 @@ void CLASS remove_zeroes() */ void CLASS bad_pixels (const char *cfname) { - FILE *fp=nullptr; + FILE *fp=0; char *fname, *cp, line[128]; int len, time, row, col, r, c, rad, tot, n, fixed=0; @@ -4430,7 +4430,7 @@ void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) void CLASS wavelet_denoise() { - float *fimg=nullptr, *temp, thold, mul[2], avg, diff; + float *fimg=0, *temp, thold, mul[2], avg, diff; int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ushort *window[4]; static const float noise[] = @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=nullptr, *pix; + ushort *img=0, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -4748,7 +4748,7 @@ void CLASS xtrans_interpolate (int passes) if (verbose) fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); - cielab (nullptr,nullptr); + cielab (0,0); ndir = 4 << (passes > 1); buffer = (char *) malloc (TS*TS*(ndir*11+6)); merror (buffer, "xtrans_interpolate()"); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = nullptr; + load_raw = thumb_load_raw = 0; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } goto dng_skip; } From 730c03785d4e3ae34fa0618e7578ed57ddb9d713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 18:16:05 +0200 Subject: [PATCH 060/115] Reapplied clang-tidy filters - modernize-use-nullptr - modernize-redundant-void-arg - readability-simplify-boolean-expr - misc-redundant-expression - readability-redundant-control-flow - readability-avoid-const-params-in-decls --- rtengine/EdgePreservingDecomposition.cc | 2 +- rtengine/array2D.h | 16 +++--- rtengine/cplx_wavelet_dec.h | 12 ++--- rtengine/cplx_wavelet_level.h | 6 +-- rtengine/dcraw.cc | 16 +++--- rtengine/dcraw.h | 10 ++-- rtengine/dfmanager.cc | 34 ++++++------- rtengine/ffmanager.cc | 28 +++++------ rtengine/iccstore.cc | 6 +-- rtengine/iimage.h | 6 +-- rtengine/imageio.cc | 60 +++++++++++----------- rtengine/improccoordinator.cc | 28 +++++------ rtengine/improcfun.h | 18 +++---- rtengine/iplab2rgb.cc | 4 +- rtengine/rawimage.cc | 36 +++++++------- rtengine/rawimagesource.cc | 66 ++++++++++++------------- rtengine/simpleprocess.cc | 32 ++++++------ rtengine/stdimagesource.cc | 14 +++--- rtgui/progressconnector.h | 2 +- 19 files changed, 198 insertions(+), 198 deletions(-) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index c80d5e092..7bc292c3f 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -552,7 +552,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max return true; } -void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization(void) +void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization() { delete IncompleteCholeskyFactorization; } diff --git a/rtengine/array2D.h b/rtengine/array2D.h index 2d38d2e15..2fe4ecad4 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -83,19 +83,19 @@ private: { if ((ptr) && ((h > y) || (4 * h < y))) { delete[] ptr; - ptr = NULL; + ptr = nullptr; } if ((data) && (((h * w) > (x * y)) || ((h * w) < ((x * y) / 4)))) { delete[] data; - data = NULL; + data = nullptr; } - if (ptr == NULL) { + if (ptr == nullptr) { ptr = new T*[h]; } - if (data == NULL) { + if (data == nullptr) { data = new T[h * w + offset]; } @@ -113,7 +113,7 @@ public: // use as empty declaration, resize before use! // very useful as a member object array2D() : - x(0), y(0), owner(0), ptr(NULL), data(NULL), lock(0), flags(0) + x(0), y(0), owner(0), ptr(nullptr), data(nullptr), lock(0), flags(0) { //printf("got empty array2D init\n"); } @@ -151,7 +151,7 @@ public: if (owner) { data = new T[h * w]; } else { - data = NULL; + data = nullptr; } x = w; @@ -192,12 +192,12 @@ public: { if ((owner) && (data)) { delete[] data; - data = NULL; + data = nullptr; } if (ptr) { delete [] ptr; - ptr = NULL; + ptr = nullptr; } } diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index 40639e7ea..45e829322 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -155,17 +155,17 @@ wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int E *buffer[2]; buffer[0] = new (std::nothrow) E[(m_w / 2 + 1) * (m_h / 2 + 1)]; - if(buffer[0] == NULL) { + if(buffer[0] == nullptr) { memoryAllocationFailed = true; return; } buffer[1] = new (std::nothrow) E[(m_w / 2 + 1) * (m_h / 2 + 1)]; - if(buffer[1] == NULL) { + if(buffer[1] == nullptr) { memoryAllocationFailed = true; delete[] buffer[0]; - buffer[0] = NULL; + buffer[0] = nullptr; return; } @@ -210,7 +210,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpHi = new (std::nothrow) E[width * height]; - if(tmpHi == NULL) { + if(tmpHi == nullptr) { memoryAllocationFailed = true; return; } @@ -234,7 +234,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) } else { // allocate new block of memory tmpLo = new (std::nothrow) E[width * height]; - if(tmpLo == NULL) { + if(tmpLo == nullptr) { memoryAllocationFailed = true; return; } @@ -242,7 +242,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpHi = new (std::nothrow) E[width * height]; - if(tmpHi == NULL) { + if(tmpHi == nullptr) { memoryAllocationFailed = true; if(!wavelet_decomp[0]->bigBlockOfMemoryUsed()) { diff --git a/rtengine/cplx_wavelet_level.h b/rtengine/cplx_wavelet_level.h index 5c13158b8..59c206f27 100644 --- a/rtengine/cplx_wavelet_level.h +++ b/rtengine/cplx_wavelet_level.h @@ -84,7 +84,7 @@ public: template wavelet_level(E * src, E * dst, int level, int subsamp, int w, int h, float *filterV, float *filterH, int len, int offset, int skipcrop, int numThreads) - : lvl(level), subsamp_out((subsamp >> level) & 1), numThreads(numThreads), skip(1 << level), bigBlockOfMemory(true), memoryAllocationFailed(false), wavcoeffs(NULL), m_w(w), m_h(h), m_w2(w), m_h2(h) + : lvl(level), subsamp_out((subsamp >> level) & 1), numThreads(numThreads), skip(1 << level), bigBlockOfMemory(true), memoryAllocationFailed(false), wavcoeffs(nullptr), m_w(w), m_h(h), m_w2(w), m_h2(h) { if (subsamp) { skip = 1; @@ -159,7 +159,7 @@ T ** wavelet_level::create(int n) { T * data = new (std::nothrow) T[3 * n]; - if(data == NULL) { + if(data == nullptr) { bigBlockOfMemory = false; } @@ -171,7 +171,7 @@ T ** wavelet_level::create(int n) } else { subbands[j] = new (std::nothrow) T[n]; - if(subbands[j] == NULL) { + if(subbands[j] == nullptr) { printf("Couldn't allocate memory in level %d of wavelet\n", lvl); memoryAllocationFailed = true; } diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 54fc09622..169be3c3e 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=0, (*ip)[4]; + short *rp=nullptr, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=0; + ushort *pixel=nullptr; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return 0; + return nullptr; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return 0; + return nullptr; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=0, *pix; + ushort *img=nullptr, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = 0; + load_raw = thumb_load_raw = nullptr; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = 0; + default: load_raw = nullptr; } goto dng_skip; } diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 9d15a5826..0a68b02cc 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -43,13 +43,13 @@ public: :exif_base(-1) ,ciff_base(-1) ,ciff_len(0) - ,ifp(NULL),ofp(NULL) + ,ifp(nullptr),ofp(nullptr) ,order(0x4949) - ,ifname(NULL) - ,meta_data(NULL) + ,ifname(nullptr) + ,meta_data(nullptr) ,shot_select(0),multi_out(0) - ,float_raw_image(NULL) - ,image(NULL) + ,float_raw_image(nullptr) + ,image(nullptr) ,bright(1.) ,half_size(0),four_color_rgb(0),document_mode(0),highlight(0) ,verbose(0) diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index e0dea012b..ab76ff854 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -46,7 +46,7 @@ inline dfInfo& dfInfo::operator =(const dfInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } } @@ -140,7 +140,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -202,7 +202,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -334,11 +334,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -346,11 +346,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info && info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -361,14 +361,14 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } RawImage ri (filename); int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } dfList_t::iterator iter; @@ -408,7 +408,7 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch(Gio::Error&) {} - return 0; + return nullptr; } void DFManager::getStat( int &totFiles, int &totTemplates) @@ -435,7 +435,7 @@ void DFManager::getStat( int &totFiles, int &totTemplates) dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t ) { if( dfList.empty() ) { - return 0; + return nullptr; } std::string key( dfInfo::key(mak, mod, isospeed, shut) ); @@ -469,7 +469,7 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -480,7 +480,7 @@ RawImage* DFManager::searchDarkFrame( const std::string &mak, const std::string if( df ) { return df->getRawImage(); } else { - return 0; + return nullptr; } } @@ -498,7 +498,7 @@ RawImage* DFManager::searchDarkFrame( const Glib::ustring filename ) return df->getRawImage(); } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) { @@ -508,7 +508,7 @@ std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) } } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t ) { @@ -527,7 +527,7 @@ std::vector *DFManager::getHotPixels ( const std::string &mak, const std return &df->getHotPixels(); } else { - return 0; + return nullptr; } } @@ -626,7 +626,7 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std } if(!found) { - return 0; + return nullptr; } else { return &(iter->second); } diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 29121a696..069bbf563 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -42,7 +42,7 @@ inline ffInfo& ffInfo::operator =(const ffInfo &o) if( ri ) { delete ri; - ri = NULL; + ri = nullptr; } } @@ -133,7 +133,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -195,7 +195,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -293,11 +293,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file ) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -305,11 +305,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info || info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -321,7 +321,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } @@ -329,7 +329,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } ffList_t::iterator iter; @@ -369,7 +369,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch (Gio::Error&) {} - return 0; + return nullptr; } void FFManager::getStat( int &totFiles, int &totTemplates) @@ -396,7 +396,7 @@ void FFManager::getStat( int &totFiles, int &totTemplates) ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const std::string &len, double focal, double apert, time_t t ) { if( ffList.empty() ) { - return 0; + return nullptr; } std::string key( ffInfo::key(mak, mod, len, focal, apert) ); @@ -430,7 +430,7 @@ ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const s } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -441,7 +441,7 @@ RawImage* FFManager::searchFlatField( const std::string &mak, const std::string if( ff ) { return ff->getRawImage(); } else { - return 0; + return nullptr; } } @@ -459,7 +459,7 @@ RawImage* FFManager::searchFlatField( const Glib::ustring filename ) return ff->getRawImage(); } - return 0; + return nullptr; } diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 7b52a7a53..3cb9b4a71 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -207,7 +207,7 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) } cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(iprof, 0, &bytesNeeded); + cmsSaveProfileToMem(iprof, nullptr, &bytesNeeded); if (bytesNeeded == 0) { return nullptr; @@ -522,7 +522,7 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam //lcmsMutex->lock (); Mutex acquired by the caller cmsWhitePointFromTemp(&xyD, (double)temp); - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); //5 = smoother than 4 + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); //5 = smoother than 4 cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile cmsFreeToneCurve(GammaTRC[0]); //lcmsMutex->unlock (); @@ -859,7 +859,7 @@ ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(nullptr), length(0) if (hProfile != nullptr) { cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(hProfile, 0, &bytesNeeded); + cmsSaveProfileToMem(hProfile, nullptr, &bytesNeeded); if (bytesNeeded > 0) { data = new char[bytesNeeded + 1]; diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 70f07d68f..7e88e407f 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -592,7 +592,7 @@ public: PlanarPtr g; PlanarPtr b; - PlanarRGBData() : rowstride(0), planestride(0), data (NULL) {} + PlanarRGBData() : rowstride(0), planestride(0), data (nullptr) {} PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (nullptr) { allocate(w, h); @@ -711,7 +711,7 @@ public: /** Copy the data to another PlanarRGBData */ void copyData(PlanarRGBData *dest) { - assert (dest != NULL); + assert (dest != nullptr); // Make sure that the size is the same, reallocate if necessary dest->allocate(width, height); @@ -1231,7 +1231,7 @@ public: ChunkyPtr g; ChunkyPtr b; - ChunkyRGBData() : data (NULL) {} + ChunkyRGBData() : data (nullptr) {} ChunkyRGBData(int w, int h) : data (nullptr) { allocate(w, h); diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 48d9d81b6..f869a0f3e 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -52,7 +52,7 @@ namespace // Opens a file for binary writing and request exclusive lock (cases were you need "wb" mode plus locking) FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) { - FILE* f = NULL; + FILE* f = nullptr; #ifdef WIN32 @@ -91,13 +91,13 @@ Glib::ustring ImageIO::errorMsg[6] = {"Success", "Cannot read file.", "Invalid h // For only copying the raw input data void ImageIO::setMetadata (const rtexif::TagDirectory* eroot) { - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (NULL); + rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (nullptr); // make IPTC and XMP pass through td->keepTag(0x83bb); // IPTC @@ -115,18 +115,18 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr exifChange.clear(); exifChange = exif; - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - exifRoot = ((rtexif::TagDirectory*)eroot)->clone (NULL); + exifRoot = ((rtexif::TagDirectory*)eroot)->clone (nullptr); } - if (iptc != NULL) { + if (iptc != nullptr) { iptc_data_free (iptc); - iptc = NULL; + iptc = nullptr; } // build iptc structures for libiptcdata @@ -184,7 +184,7 @@ void ImageIO::setOutputProfile (char* pdata, int plen) profileData = new char [plen]; memcpy (profileData, pdata, plen); } else { - profileData = NULL; + profileData = nullptr; } profileLength = plen; @@ -224,7 +224,7 @@ int ImageIO::getPNGSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -303,7 +303,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -331,7 +331,7 @@ int ImageIO::loadPNG (Glib::ustring fname) png_read_info(png, info); - embProfile = NULL; + embProfile = nullptr; //retrieving image information png_uint_32 width, height; @@ -388,7 +388,7 @@ int ImageIO::loadPNG (Glib::ustring fname) for (unsigned int i = 0; i < height; i++) { - png_read_row (png, (png_byte*)row, NULL); + png_read_row (png, (png_byte*)row, nullptr); if (bit_depth == 16) { // convert scanline to host byte order unsigned short* srow = (unsigned short*)row; @@ -405,7 +405,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } } - png_read_end (png, 0); + png_read_end (png, nullptr); png_destroy_read_struct (&png, &info, &end_info); delete [] row; @@ -489,7 +489,7 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -568,7 +568,7 @@ int ImageIO::loadJPEG (Glib::ustring fname) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -623,7 +623,7 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -732,7 +732,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -814,7 +814,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) loadedProfileData = new char [loadedProfileLength]; memcpy (loadedProfileData, profdata, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } allocate (width, height); @@ -837,7 +837,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { setScanline (row, linebuffer, bitspersample, minValue, maxValue); } else { - setScanline (row, linebuffer, bitspersample, NULL, NULL); + setScanline (row, linebuffer, bitspersample, nullptr, nullptr); } if (pl && !(row % 100)) { @@ -908,7 +908,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) pl->setProgress (0.0); } - png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -918,7 +918,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) png_infop info = png_create_info_struct(png); if (!info) { - png_destroy_write_struct (&png, 0); + png_destroy_write_struct (&png, nullptr); fclose (file); return IMIO_HEADERERROR; } @@ -1101,7 +1101,7 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) int bytes = 0; - if (!error && (bytes = iptc_jpeg_ps3_save_iptc (NULL, 0, iptcdata, size, buffer, 65532)) < 0) { + if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, buffer, 65532)) < 0) { if (iptcdata) { iptc_data_free_buf (iptc, iptcdata); } @@ -1307,23 +1307,23 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) //TODO Even though we are saving EXIF IFD - MakerNote still comes out screwed. - if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != nullptr) { TIFFSetField (out, TIFFTAG_MODEL, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != nullptr) { TIFFSetField (out, TIFFTAG_MAKE, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != nullptr) { TIFFSetField (out, TIFFTAG_DATETIME, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != nullptr) { TIFFSetField (out, TIFFTAG_ARTIST, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != nullptr) { TIFFSetField (out, TIFFTAG_COPYRIGHT, tag->getValue()); } @@ -1420,7 +1420,7 @@ void png_flush(png_structp png_ptr) FILE *io_ptr; io_ptr = (FILE *)(png_get_io_ptr(png_ptr)); - if (io_ptr != NULL) { + if (io_ptr != nullptr) { fflush(io_ptr); } } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 2b65e17e4..b3f5afee8 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -33,8 +33,8 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(NULL), oprevi(NULL), oprevl(NULL), nprevl(NULL), previmg(NULL), workimg(NULL), - ncie(NULL), imgsrc(NULL), shmap(NULL), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), + : orig_prev(nullptr), oprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), + ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), ipf(¶ms, true), monitorIntent(RI_RELATIVE), softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), @@ -87,7 +87,7 @@ ImProcCoordinator::ImProcCoordinator () fw(0), fh(0), tr(0), fullw(1), fullh(1), pW(-1), pH(-1), - plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), + plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) {} @@ -536,7 +536,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (oprevi, oprevl, NULL, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, + ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as); if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { @@ -608,7 +608,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); - ipf.chromiLuminanceCurve (NULL, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); + ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); ipf.vibrance(nprevl); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { @@ -762,7 +762,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) delete ncie; } - ncie = NULL; + ncie = nullptr; if (CAMBrightCurveJ) { CAMBrightCurveJ.reset(); @@ -841,19 +841,19 @@ void ImProcCoordinator::freeAll () delete oprevi; } - oprevi = NULL; + oprevi = nullptr; delete orig_prev; - orig_prev = NULL; + orig_prev = nullptr; delete oprevl; - oprevl = NULL; + oprevl = nullptr; delete nprevl; - nprevl = NULL; + nprevl = nullptr; if (ncie) { delete ncie; } - ncie = NULL; + ncie = nullptr; if (imageListener) { imageListener->delImage (previmg); @@ -867,7 +867,7 @@ void ImProcCoordinator::freeAll () delete shmap; } - shmap = NULL; + shmap = nullptr; } @@ -1086,7 +1086,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & MyMutex::MyLock lock(mProcessing); - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); @@ -1266,7 +1266,7 @@ void ImProcCoordinator::startProcessing () if (!destroying) { if (!updaterRunning) { updaterThreadStart.lock (); - thread = NULL; + thread = nullptr; updaterRunning = true; updaterThreadStart.unlock (); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 7ea7bbecf..5af2093d9 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -196,7 +196,7 @@ public: double lumimul[3]; ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(NULL), lab2outputTransform(NULL), output2monitorTransform(NULL), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} + : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} ~ImProcFunctions (); void setScale (double iscale); @@ -261,7 +261,7 @@ public: void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = NULL); + float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); @@ -296,11 +296,11 @@ public: void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); - void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = NULL); + void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); - void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = NULL); + void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); @@ -317,7 +317,7 @@ public: const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = NULL, bool madCalculated = false); + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); @@ -344,14 +344,14 @@ public: void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=NULL); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=nullptr); // CieImage *ciec; - bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); - bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); + bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); + bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); - double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = NULL); + double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 924f79e1f..4e23c6400 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -173,7 +173,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } else printf("lab2rgb / bpc=false\n"); lcmsMutex->lock (); - cmsHPROFILE LabIProf = cmsCreateLab4Profile(NULL); + cmsHPROFILE LabIProf = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (LabIProf, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, icm.outputIntent, flags); // NOCACHE is important for thread safety cmsCloseProfile(LabIProf); lcmsMutex->unlock (); @@ -284,7 +284,7 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int Image16* image = new Image16 (cw, ch); - cmsHPROFILE oprof = NULL; + cmsHPROFILE oprof = nullptr; if (ga) { lcmsMutex->lock (); iccStore->getGammaArray(icm, *ga); diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index cb1c2a9c9..382ebe0a7 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -20,11 +20,11 @@ namespace rtengine extern const Settings* settings; RawImage::RawImage( const Glib::ustring &name ) - : data(NULL) + : data(nullptr) , prefilters(0) , filename(name) - , profile_data(NULL) - , allocation(NULL) + , profile_data(nullptr) + , allocation(nullptr) , rotate_deg(0) { memset(maximum_c4, 0, sizeof(maximum_c4)); @@ -45,22 +45,22 @@ RawImage::~RawImage() if(allocation) { delete [] allocation; - allocation = NULL; + allocation = nullptr; } if(float_raw_image) { delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } if(data) { delete [] data; - data = NULL; + data = nullptr; } if(profile_data) { delete [] profile_data; - profile_data = NULL; + profile_data = nullptr; } } @@ -401,9 +401,9 @@ skip_block: int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistener, double progressRange) { ifname = filename.c_str(); - image = NULL; + image = nullptr; verbose = settings->verbose; - oprof = NULL; + oprof = nullptr; ifp = gfopen (ifname); // Maps to either file map or direct fopen @@ -415,18 +415,18 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene thumb_length = 0; thumb_offset = 0; - thumb_load_raw = 0; + thumb_load_raw = nullptr; use_camera_wb = 0; highlight = 1; half_size = 0; - raw_image = 0; + raw_image = nullptr; //***************** Read ALL raw file info identify (); if (!is_raw) { fclose(ifp); - ifp = NULL; + ifp = nullptr; if (plistener) { plistener->setProgress(1.0 * progressRange); @@ -532,7 +532,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene crop_masked_pixels(); free (raw_image); - raw_image = NULL; + raw_image = nullptr; } else { if (cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; @@ -644,7 +644,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if ( closeFile ) { fclose(ifp); - ifp = NULL; + ifp = nullptr; } if (plistener) { @@ -657,7 +657,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene float** RawImage::compress_image() { if( !image ) { - return NULL; + return nullptr; } if (isBayer() || isXtrans()) { @@ -700,7 +700,7 @@ float** RawImage::compress_image() } delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } else if (filters != 0 && !isXtrans()) { #pragma omp parallel for @@ -734,7 +734,7 @@ float** RawImage::compress_image() } free(image); // we don't need this anymore - image = NULL; + image = nullptr; return data; } @@ -783,7 +783,7 @@ void RawImage::getRgbCam (float rgbcam[3][4]) bool RawImage::get_thumbSwap() const { - return ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) ? true : false; + return (order == 0x4949) == (ntohs(0x1234) == 0x1234); } } //namespace rtengine diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 12ac4330a..b2e3e5e56 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -424,10 +424,10 @@ extern const Settings* settings; RawImageSource::RawImageSource () : ImageSource() , W(0), H(0) - , plistener(NULL) + , plistener(nullptr) , border(4) - , ri(NULL) - , cache(NULL) + , ri(nullptr) + , cache(nullptr) , rawData(0, 0) , green(0, 0) , red(0, 0) @@ -463,8 +463,8 @@ RawImageSource::RawImageSource () , defGain(0.0) , threshold(0) { - camProfile = NULL; - embProfile = NULL; + camProfile = nullptr; + embProfile = nullptr; rgbSourceModified = false; } @@ -889,12 +889,12 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - DCPProfile *dcpProf = NULL; + DCPProfile *dcpProf = nullptr; cmsHPROFILE dummy; - findInputProfile(cmp.input, NULL, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); + findInputProfile(cmp.input, nullptr, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); - if (dcpProf == NULL) { - return NULL; + if (dcpProf == nullptr) { + return nullptr; } dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset, as); @@ -1645,7 +1645,7 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) plistener->setProgress (1.0); } - plistener = NULL; // This must be reset, because only load() is called through progressConnector + plistener = nullptr; // This must be reset, because only load() is called through progressConnector t2.set(); if( settings->verbose ) { @@ -1664,7 +1664,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le t1.set(); Glib::ustring newDF = raw.dark_frame; - RawImage *rid = NULL; + RawImage *rid = nullptr; if (!raw.df_autoselect) { if( !raw.dark_frame.empty()) { @@ -1702,7 +1702,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } //FLATFIELD start - RawImage *rif = NULL; + RawImage *rif = nullptr; if (!raw.ff_AutoSelect) { if( !raw.ff_file.empty()) { @@ -1713,7 +1713,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } - bool hasFlatField = (rif != NULL); + bool hasFlatField = (rif != nullptr); if( hasFlatField && settings->verbose) { printf( "Flat Field Correction:%s\n", rif->get_filename().c_str()); @@ -1739,7 +1739,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } // If darkframe selected, correct hotpixels found on darkframe - bp = 0; + bp = nullptr; if( raw.df_autoselect ) { bp = dfm.getHotPixels(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS()); @@ -2320,7 +2320,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC dLcurve(32768); } - FlatCurve* chcurve = NULL;//curve c=f(H) + FlatCurve* chcurve = nullptr;//curve c=f(H) bool chutili = false; if (deh.enabled && deh.retinexMethod == "highli") { @@ -2329,7 +2329,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC if (!chcurve || chcurve->isIdentity()) { if (chcurve) { delete chcurve; - chcurve = NULL; + chcurve = nullptr; } } else { chutili = true; @@ -2638,7 +2638,7 @@ void RawImageSource::flushRawData() { if(cache) { delete [] cache; - cache = 0; + cache = nullptr; } if (rawData) { @@ -3705,9 +3705,9 @@ void RawImageSource::getProfilePreprocParams(cmsHPROFILE in, float& gammaFac, fl copyright[0] = 0; if (cmsGetProfileInfoASCII(in, cmsInfoCopyright, cmsNoLanguage, cmsNoCountry, copyright, 256) > 0) { - if (strstr(copyright, "Phase One") != NULL) { + if (strstr(copyright, "Phase One") != nullptr) { gammaFac = 0.55556; // 1.8 - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { gammaFac = 0.5; lineFac = -0.4; lineSum = 1.35; // determined in reverse by measuring NX an RT developed colorchecker PNGs @@ -3776,7 +3776,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (dcpProf != NULL) { + if (dcpProf != nullptr) { // DCP processing const DCPProfile::Triple pre_mul_row = { pre_mul[0], @@ -3793,7 +3793,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (in == NULL) { + if (in == nullptr) { // use default camprofile, supplied by dcraw // in this case we avoid using the slllllooooooowwww lcms @@ -3869,10 +3869,10 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam camera_icc_type = CAMERA_ICC_TYPE_GENERIC; // Note: order the identification with the most detailed matching first since the more general ones may also match the more detailed - if ((strstr(copyright, "Leaf") != NULL || - strstr(copyright, "Phase One A/S") != NULL || - strstr(copyright, "Kodak") != NULL || - strstr(copyright, "Creo") != NULL) && + if ((strstr(copyright, "Leaf") != nullptr || + strstr(copyright, "Phase One A/S") != nullptr || + strstr(copyright, "Kodak") != nullptr || + strstr(copyright, "Creo") != nullptr) && (strstr(description, "LF2 ") == description || strstr(description, "LF3 ") == description || strstr(description, "LeafLF2") == description || @@ -3881,9 +3881,9 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam strstr(description, "MamiyaLF2") == description || strstr(description, "MamiyaLF3") == description)) { camera_icc_type = CAMERA_ICC_TYPE_LEAF; - } else if (strstr(copyright, "Phase One A/S") != NULL) { + } else if (strstr(copyright, "Phase One A/S") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_PHASE_ONE; - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_NIKON; } } @@ -3902,7 +3902,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam transform_via_pcs_lab = true; separate_pcs_lab_highlights = true; // We transform to Lab because we can and that we avoid getting an unnecessary unmatched gamma conversion which we would need to revert. - hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, NULL, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); + hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, nullptr, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { @@ -3926,7 +3926,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam lcmsMutex->unlock (); - if (hTransform == NULL) { + if (hTransform == nullptr) { // Fallback: create transform from camera profile. Should not happen normally. lcmsMutex->lock (); hTransform = cmsCreateTransform (camprofile, TYPE_RGB_FLT, prophoto, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); @@ -4136,8 +4136,8 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam // Determine RAW input and output profiles. Returns TRUE on success bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in) { - in = NULL; // cam will be taken on NULL - *dcpProf = NULL; + in = nullptr; // cam will be taken on NULL + *dcpProf = nullptr; if (inProfile == "(none)") { return false; @@ -4149,7 +4149,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed // DCPs have higher quality, so use them first *dcpProf = DCPStore::getInstance()->getStdProfile(camName); - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getStdProfile(camName); } } else if (inProfile != "(camera)" && inProfile != "") { @@ -4163,7 +4163,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed *dcpProf = DCPStore::getInstance()->getProfile(normalName); } - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getProfile (inProfile); } } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index e31103929..9e7d5f58f 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -54,7 +54,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (errorCode) { delete job; - return NULL; + return nullptr; } } @@ -165,7 +165,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; - Imagefloat *calclum = NULL ; + Imagefloat *calclum = nullptr ; params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// @@ -754,7 +754,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } // update blurmap - SHMap* shmap = NULL; + SHMap* shmap = nullptr; if (params.sh.enabled) { shmap = new SHMap (fw, fh, true); @@ -858,7 +858,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); if (settings->verbose) { printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); @@ -881,13 +881,13 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // Freeing baseImg because not used anymore delete baseImg; - baseImg = NULL; + baseImg = nullptr; if (shmap) { delete shmap; } - shmap = NULL; + shmap = nullptr; if (pl) { pl->setProgress (0.55); @@ -933,7 +933,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); - ipf.chromiLuminanceCurve (NULL, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); + ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { ipf.EPDToneMap(labView, 5, 1); @@ -1071,7 +1071,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete cieView; - cieView = NULL; + cieView = nullptr; @@ -1147,8 +1147,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } - Image16* readyImg = NULL; - cmsHPROFILE jprof = NULL; + Image16* readyImg = nullptr; + cmsHPROFILE jprof = nullptr; bool customGamma = false; bool useLCMS = false; bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; @@ -1163,7 +1163,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p //or selected Free gamma useLCMS = false; - if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == NULL) { + if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) { useLCMS = true; } @@ -1179,7 +1179,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete labView; - labView = NULL; + labView = nullptr; @@ -1229,7 +1229,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // if iccStore->getProfile send back an object, then iccStore->getContent will do too cmsHPROFILE jprof = iccStore->getProfile(params.icm.output); //get outProfile - if (jprof == NULL) { + if (jprof == nullptr) { if (settings->verbose) { printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); } @@ -1243,7 +1243,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } else { // No ICM - readyImg->setOutputProfile (NULL, 0); + readyImg->setOutputProfile (nullptr, 0); } } @@ -1286,13 +1286,13 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo if (errorCode) { bpl->error (M("MAIN_MSG_CANNOTLOAD")); - currentJob = NULL; + currentJob = nullptr; } else { try { currentJob = bpl->imageReady (img); } catch (Glib::Exception& ex) { bpl->error (ex.what()); - currentJob = NULL; + currentJob = nullptr; } } } diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index 826c8a49b..6017a1ca6 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -51,11 +51,11 @@ template T** allocArray (int W, int H) } #define HR_SCALE 2 -StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL), full(false), max{}, rgbSourceModified(false) +StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr), full(false), max{}, rgbSourceModified(false) { - embProfile = NULL; - idata = NULL; + embProfile = nullptr; + idata = nullptr; } StdImageSource::~StdImageSource () @@ -163,7 +163,7 @@ int StdImageSource::load (const Glib::ustring &fname, bool batch) if (error) { delete img; - img = NULL; + img = nullptr; return error; } @@ -228,7 +228,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement { bool skipTransform = false; - cmsHPROFILE in = NULL; + cmsHPROFILE in = nullptr; cmsHPROFILE out = iccStore->workingSpace (cmp.working); if (cmp.input == "(embedded)" || cmp.input == "" || cmp.input == "(camera)" || cmp.input == "(cameraICC)") { @@ -245,9 +245,9 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (cmp.input != "(none)") { in = iccStore->getProfile (cmp.input); - if (in == NULL && embedded) { + if (in == nullptr && embedded) { in = embedded; - } else if (in == NULL) { + } else if (in == nullptr) { if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { skipTransform = true; } else { diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index f62b645c3..fce1f17f5 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -90,7 +90,7 @@ class ProgressConnector public: - ProgressConnector (): retval( 0 ), workThread( nullptr ) { } + ProgressConnector (): retval( nullptr ), workThread( nullptr ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) { From ae98d4cb1f49476694ce3906e6f3898cf0d2b35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 18:18:25 +0200 Subject: [PATCH 061/115] Revert `rtengine/dcraw.cc` --- rtengine/dcraw.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 169be3c3e..54fc09622 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -947,7 +947,7 @@ void CLASS lossless_jpeg_load_raw() void CLASS canon_sraw_load_raw() { struct jhead jh; - short *rp=nullptr, (*ip)[4]; + short *rp=0, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; @@ -2152,7 +2152,7 @@ void CLASS hasselblad_load_raw() void CLASS leaf_hdr_load_raw() { - ushort *pixel=nullptr; + ushort *pixel=0; unsigned tile=0, r, c, row, col; if (!filters) { @@ -3555,7 +3555,7 @@ const char * CLASS foveon_camf_param (const char *block, const char *param) return dp+sget4(cp+4); } } - return nullptr; + return 0; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) @@ -3589,7 +3589,7 @@ void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) return mat; } fprintf (stderr,_("%s: \"%s\" matrix not found!\n"), ifname, name); - return nullptr; + return 0; } int CLASS foveon_fixed (void *ptr, int size, const char *name) @@ -4512,7 +4512,7 @@ void CLASS scale_colors() int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; - ushort *img=nullptr, *pix; + ushort *img=0, *pix; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); @@ -7012,7 +7012,7 @@ void CLASS parse_foveon() case 5: load_flags = 1; case 6: load_raw = &CLASS foveon_sd_load_raw; break; case 30: load_raw = &CLASS foveon_dp_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } raw_width = wide; raw_height = high; @@ -8493,7 +8493,7 @@ void CLASS identify() memset (white, 0, sizeof white); memset (mask, 0, sizeof mask); thumb_offset = thumb_length = thumb_width = thumb_height = 0; - load_raw = thumb_load_raw = nullptr; + load_raw = thumb_load_raw = 0; write_thumb = &CLASS jpeg_thumb; data_offset = meta_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; @@ -8755,7 +8755,7 @@ void CLASS identify() case 7: load_raw = &CLASS lossless_dng_load_raw; break; case 8: load_raw = &CLASS deflate_dng_load_raw; break; case 34892: load_raw = &CLASS lossy_dng_load_raw; break; - default: load_raw = nullptr; + default: load_raw = 0; } goto dng_skip; } From fb8941cd887191b15069ab3e11657f2c99bb419b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 18 Oct 2016 18:30:25 +0200 Subject: [PATCH 062/115] Manually simplify bool expressions and fix `rtgui/progressconnector.h` --- rtgui/editorpanel.cc | 5 +++-- rtgui/filecatalog.cc | 3 ++- rtgui/progressconnector.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 8abbe6e27..8dba7e38e 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1968,11 +1968,12 @@ void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & his bool EditorPanel::CheckSidePanelsVisibility() { if (tbTopPanel_1) { - return !(!tbTopPanel_1->get_active() && !tbRightPanel_1->get_active() && !hidehp->get_active()); + return tbTopPanel_1->get_active() || tbRightPanel_1->get_active() || hidehp->get_active(); } - return !(!tbRightPanel_1->get_active() && !hidehp->get_active()); + return tbRightPanel_1->get_active() || hidehp->get_active(); } + void EditorPanel::toggleSidePanels() { // Maximize preview panel: diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 0c58b3038..97407fb1e 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -2123,8 +2123,9 @@ void FileCatalog::tbRightPanel_1_toggled () bool FileCatalog::CheckSidePanelsVisibility() { - return !(!tbLeftPanel_1->get_active() && !tbRightPanel_1->get_active()); + return tbLeftPanel_1->get_active() || tbRightPanel_1->get_active(); } + void FileCatalog::toggleSidePanels() { // toggle left AND right panels diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index fce1f17f5..f62b645c3 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -90,7 +90,7 @@ class ProgressConnector public: - ProgressConnector (): retval( nullptr ), workThread( nullptr ) { } + ProgressConnector (): retval( 0 ), workThread( nullptr ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) { From 44aabc39269bd2e574c731ab1aeadf1cde09ff11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kyral?= Date: Tue, 18 Oct 2016 20:58:17 +0200 Subject: [PATCH 063/115] Czech translation file update --- rtdata/languages/Czech | 210 +++++++++++++++++++++-------------------- 1 file changed, 108 insertions(+), 102 deletions(-) diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index f3142f30d..99cb4cc95 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -34,7 +34,10 @@ #33 2015-02-22 updated by mkyral #34 2015-07-09 updated by mkyral #38 2015-11-24 updated by mkyral - +#36 2015-10-26 updated by mkyral +#37 2015-11-21 updated by mkyral +#38 2016-07-21 updated by mkyral +#39 2016-10-18 updated by mkyral ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy ABOUT_TAB_LICENSE;Licence @@ -203,6 +206,7 @@ FILEBROWSER_SHOWEDITEDHINT;Ukázat upravené obrázky.\nZkratka: 7 FILEBROWSER_SHOWEDITEDNOTHINT;Ukázat neupravené obrázky.\nZkratka: 6 FILEBROWSER_SHOWEXIFINFO;Zobrazit Exif informace.\n\nZkratky:\ni - režim více karet editoru,\nAlt-i - režim jedné karty editoru. FILEBROWSER_SHOWNOTTRASHHINT;Zobrazit pouze nesmazané obrázky. +FILEBROWSER_SHOWORIGINALHINT;Zobrazí pouze originální obrázky.\n\nPokud existuje několik obrázků se stejným názvem, ale rozdílnými příponami, bude jako originál vybrán ten, jehož přípona je nejvýše v seznamu příponve Volby > Prohlížeč souborů > Analyzované přípony. FILEBROWSER_SHOWRANK1HINT;Ukázat obrázky hodnocené jednou hvězdičkou.\nZkratka: 1 FILEBROWSER_SHOWRANK2HINT;Ukázat obrázky hodnocené dvěma hvězdičkami.\nZkratka: 2 FILEBROWSER_SHOWRANK3HINT;Ukázat obrázky hodnocené třemi hvězdičkami.\nZkratka: 3 @@ -231,6 +235,7 @@ FILECHOOSER_FILTER_SAME;Stejný formát jako aktuální fotka FILECHOOSER_FILTER_TIFF;Soubory TIFF GENERAL_ABOUT;O programu GENERAL_AFTER;Poté +GENERAL_APPLY;Použít GENERAL_ASIMAGE;Jako obrázek GENERAL_AUTO;Automaticky GENERAL_BEFORE;Před @@ -246,6 +251,7 @@ GENERAL_NA;n/a GENERAL_NO;Ne GENERAL_NONE;Nic GENERAL_OK;OK +GENERAL_OPEN;Otevřít GENERAL_PORTRAIT;Na výšku GENERAL_SAVE;Uložit GENERAL_UNCHANGED;(Beze změny) @@ -289,8 +295,8 @@ HISTORY_MSG_23;Doostření - Práh HISTORY_MSG_24;Doostření - Pouze okraje HISTORY_MSG_25;Doostření - Poloměr detekce okrajů HISTORY_MSG_26;Doostření - Tolerance okrajů -HISTORY_MSG_27;Doostření - Omezení haló art. -HISTORY_MSG_28;Doostření - Míra omezení haló art. +HISTORY_MSG_27;Doostření - Omezení halo efektu +HISTORY_MSG_28;Doostření - Míra omezení halo efektu HISTORY_MSG_29;Doostření - Metoda HISTORY_MSG_30;RLD - Poloměr HISTORY_MSG_31;RLD - Míra @@ -428,6 +434,7 @@ HISTORY_MSG_162;Mapování tónů HISTORY_MSG_163;RGB křivky - Červená HISTORY_MSG_164;RGB křivky - Zelená HISTORY_MSG_165;RGB křivky - Modrá +HISTORY_MSG_166;Expozice - Obnovení HISTORY_MSG_167;Metoda demozajkování HISTORY_MSG_168;L*a*b* - CC křivka HISTORY_MSG_169;L*a*b* - CH Křivka @@ -627,7 +634,7 @@ HISTORY_MSG_363;Vlnka - Zůstatek - Síla komprese HISTORY_MSG_364;Vlnka - Dokončení - Vyrovnání kontrastu HISTORY_MSG_365;Vlnka - Dokončení - Vyvážení rozdílů HISTORY_MSG_366;Vlnka - Zůstatek - Gama komprese -HISTORY_MSG_367;Vlnka - DH - Křivka místního kontrastu +HISTORY_MSG_367;Vlnka - Finální "Po" křivka kontrastu HISTORY_MSG_368;Vlnka - Dokončení - Vyrovnání kontrastu HISTORY_MSG_369;Vlnka - Dokončení - Metoda vyvážení HISTORY_MSG_370;Vlnka - Dokončení - Křivka místního kontrastu @@ -638,8 +645,8 @@ HISTORY_MSG_374;Doostření MR - Práh HISTORY_MSG_375;Doostření MR - Pouze hrany HISTORY_MSG_376;Doostření MR- Poloměr detekce hran HISTORY_MSG_377;Doostření MR - Tolerance hran -HISTORY_MSG_378;Doostření MR - Omezení haló art. -HISTORY_MSG_379;Doostření MR - Míra omezení haló art. +HISTORY_MSG_378;Doostření MR - Omezení halo efektu +HISTORY_MSG_379;Doostření MR - Míra omezení halo efektu HISTORY_MSG_380;Doostření - Metoda HISTORY_MSG_381;Doostření RDL - Poloměr HISTORY_MSG_382;Doostření RDL - Míra @@ -668,12 +675,12 @@ HISTORY_MSG_404;Vlnka - DH - Základní zesílení HISTORY_MSG_405;Vlnka - Odšumění - Úroveň 4 HISTORY_MSG_406;Vlnka - DH - Sousední pixely HISTORY_MSG_407;Retinex - Metoda -HISTORY_MSG_408;Retinex - Sousední -HISTORY_MSG_409;Retinex - Zisk +HISTORY_MSG_408;Retinex - Poloměr +HISTORY_MSG_409;Retinex - Kontrast HISTORY_MSG_410;Retinex - Posun HISTORY_MSG_411;Retinex - Síla -HISTORY_MSG_412;Retinex - Míra -HISTORY_MSG_413;Retinex - odchylka +HISTORY_MSG_412;Retinex - Gaussův gradient +HISTORY_MSG_413;Retinex - Kontrast HISTORY_MSG_414;Retinex - Histogram - Lab HISTORY_MSG_415;Retinex - přenos HISTORY_MSG_416;Retinex @@ -687,6 +694,23 @@ HISTORY_MSG_423;Retinex - Sklon gamy HISTORY_MSG_424;Retinex - Práh zachování jasů HISTORY_MSG_425;Retinex - Základní log HISTORY_MSG_426;Retinex - Korekce odstínu +HISTORY_MSG_427;Výstupní záměr reprodukce +HISTORY_MSG_428;Záměr reprodukce monitoru +HISTORY_MSG_429;Retinex - Průchody +HISTORY_MSG_430;Retinex - Přenos gradientu +HISTORY_MSG_431;Retinex - Síla gradientu +HISTORY_MSG_432;Retinex - M - Světla +HISTORY_MSG_433;Retinex - M - Světla TW +HISTORY_MSG_434;Retinex - Stíny +HISTORY_MSG_435;Retinex - Stíny TW +HISTORY_MSG_436;Retinex - M - poloměr +HISTORY_MSG_437;Retinex - M - Metoda +HISTORY_MSG_438;Retinex - M - Korekce +HISTORY_MSG_439;Retinex - Zpracování +HISTORY_MSG_440;Metoda KdDÚ +HISTORY_MSG_441;Retinex - přenos zisku +HISTORY_MSG_442;Retinex - Měřítko +HISTORY_MSG_443;Kompenzace výstupního černého bodu HISTORY_NEWSNAPSHOT;Přidat HISTORY_NEWSNAPSHOT_TOOLTIP;Zkratka: Alt-s HISTORY_SNAPSHOT;Snímek @@ -739,6 +763,7 @@ MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronizovat prohlížeč souborů s editorem pro MAIN_BUTTON_PREFERENCES;Volby MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Vložit současný obrázek do fronty zpracování.\nZkratka: Ctrl+b MAIN_BUTTON_SAVE_TOOLTIP;Uložit současný obrázek.\nZkratka: Ctrl+s +MAIN_BUTTON_SENDTOEDITOR;Upravit obrázek v externím editoru MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Editovat současný obrázek v externím editoru.\nZkratka: Ctrl+e MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Zobrazit/skrýt všechny postranní panely.\nZkratka: m MAIN_BUTTON_UNFULLSCREEN;Ukončit mód celé obrazovky @@ -803,6 +828,7 @@ MAIN_TOOLTIP_SHOWHIDERP1;Zobrazit/skrýt pravý panel.\nZkratka: Alt-l MAIN_TOOLTIP_SHOWHIDETP1;Zobrazit/skrýt horní panel.\nZkratka: Shift-l MAIN_TOOLTIP_THRESHOLD;Práh MAIN_TOOLTIP_TOGGLE;Přepnout pohled Před a Po.\nZkratka: Shift-b +MONITOR_PROFILE_SYSTEM;Nastavení systému NAVIGATOR_B;B: NAVIGATOR_G;G: NAVIGATOR_H;H: @@ -862,6 +888,7 @@ PARTIALPASTE_PREPROCESS_DEADPIXFILT;Filtr mrtvých pixelů PARTIALPASTE_PREPROCESS_GREENEQUIL;Vyrovnání zelené PARTIALPASTE_PREPROCESS_HOTPIXFILT;Filtr vypálených pixelů PARTIALPASTE_PREPROCESS_LINEDENOISE;Filtrovat linkové rušení +PARTIALPASTE_PRSHARPENING;Doostření po změně velikosti PARTIALPASTE_RAWCACORR_AUTO;Automatická korekce CA PARTIALPASTE_RAWCACORR_CABLUE;CA modrá PARTIALPASTE_RAWCACORR_CARED;CA červená @@ -1010,6 +1037,9 @@ PREFERENCES_MENUGROUPRANK;Skupina "Hodnocení" PREFERENCES_MENUOPTIONS;Volby místní nabídky PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Velmi malá (100x115) +PREFERENCES_MONBPC;Kompenzace černého bodu pro L*a*b*->Přizpůsobení pro monitor +PREFERENCES_MONINTENT;Výchozí záměr monitoru +PREFERENCES_MONPROFILE;Výchozí profil monitoru PREFERENCES_MULTITAB;Mód více karet editoru PREFERENCES_MULTITABDUALMON;Mód více karet editoru ve vlastním okně PREFERENCES_NAVGUIDEBRUSH;Barva vodítek navigátoru @@ -1024,10 +1054,12 @@ PREFERENCES_OVERLAY_FILENAMES;Překrýt jména souborů na náhledech v prohlí PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Překrýt jména souborů na náhledech v editoru PREFERENCES_OVERWRITEOUTPUTFILE;Přepsat existující soubory PREFERENCES_PANFACTORLABEL;Zrychlení posunu výřezu -PREFERENCES_PARSEDEXT;Zachytávané přípony +PREFERENCES_PARSEDEXT;Analyzované přípony PREFERENCES_PARSEDEXTADD;Přidat příponu PREFERENCES_PARSEDEXTADDHINT;Vymazat označenou příponu ze seznamu. PREFERENCES_PARSEDEXTDELHINT;Vymazat označenou příponu ze seznamu. +PREFERENCES_PARSEDEXTDOWNHINT;Vybranou příponu posunout na seznamu níže. +PREFERENCES_PARSEDEXTUPHINT;Vybranou příponu posunout na seznamu výše. PREFERENCES_PREVDEMO;Metoda demozajkování náhledu PREFERENCES_PREVDEMO_FAST;Rychlá PREFERENCES_PREVDEMO_LABEL;Metoda demozajkování pro náhled při přiblížení menším než 100%: @@ -1038,13 +1070,15 @@ PREFERENCES_PROFILEPRCACHE;Profil v mezipaměti PREFERENCES_PROFILEPRFILE;Profil uložený se zdrojovým souborem PREFERENCES_PROFILESAVECACHE;Ukládat parametry zpracování do mezipaměti PREFERENCES_PROFILESAVEINPUT;Ukládat parametry zpracování spolu se zdrojovým souborem +PREFERENCES_PROFILE_NONE;Nic PREFERENCES_PROPERTY;Vlastnost PREFERENCES_PSPATH;Instalační složka Adobe Photoshop PREFERENCES_REMEMBERZOOMPAN;Zapamatovat si procento přiblížení a posun obrázku PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Zapamatovat si procento přiblížení a posun aktuálního obrázku a použít tyto hodnoty při otevírání nového obrázku.\n\nTato volba funguje pouze v režimu "Mód jedné karty editoru" a volba "Metoda demozajkování pro náhled při přiblížení menším než 100%" je nastavena na "Stejně jako v PP3". PREFERENCES_RGBDTL_LABEL;Maximální počet vláken pro redukci šumu a úrovně vlnky PREFERENCES_RGBDTL_TOOLTIP;Pro automatické nastavení maximálního možného počtu vláken ponechte nastaveno na "0". Čím více vláken běží paralelně, tím rychlejší je výpočet. Paměťové nároky najdete na RawPedii. -PREFERENCES_SELECTFONT;Vybrat písmo +PREFERENCES_SELECTFONT;Vyberte globální písmo +PREFERENCES_SELECTFONT_COLPICKER;Vybrat písmo pro Průzkumníka barev PREFERENCES_SELECTLANG;Volba jazyka PREFERENCES_SELECTTHEME;Zvolit vzhled PREFERENCES_SERIALIZE_TIFF_READ;Nastavení čtení Tiff @@ -1140,6 +1174,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Nejlepší komprese:\nJ:a:b 4:2:0\nh/v 2/2\nO polovinu s SAVEDLG_TIFFUNCOMPRESSED;Nekomprimovaný TIFF SAVEDLG_WARNFILENAME;Soubor bude pojmenován SHCSELECTOR_TOOLTIP;Klikněte pravým tlačítkem myši pro obnovení výchozí pozice těchto tří posuvníků. +SOFTPROOF_GAMUTCHECK_TOOLTIP;Pokud je aktivní, indikuje šedou barvou pixely, které se dostaly mimo paletu výstupního profilu. +SOFTPROOF_TOOLTIP;Jemně korekční\nPokud je aktivní. můžete simulovat vykreslení generované výstupním profilem nástroje ICM. Velmi užitečné pro simulaci tiskových výstupů. THRESHOLDSELECTOR_B;Dole THRESHOLDSELECTOR_BL;Dole vlevo THRESHOLDSELECTOR_BR;Dole vpravo @@ -1147,8 +1183,9 @@ THRESHOLDSELECTOR_HINT;Držte klávesu Shift pro přesun individuálních THRESHOLDSELECTOR_T;Nahoře THRESHOLDSELECTOR_TL;Nahoře vlevo THRESHOLDSELECTOR_TR;Nahoře vpravo +TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je povolen:\nPřidáte průzkumníka barev kliknutím levým tlačítkem myši do náhledu\nPodržením levého tlačítka myši a tažením průzkumníka přesunete\nPokud na průzkumníka kliknete pravým tlačítkem, dojde k jeho smazání\nSmazání všech průzkumníků po stisknutí klávesy Shift a pravého tlačítka myši\nKliknutím pravým tlačítkem kdekoli mimo průzkumníka přepne zpět na nástroj posunu TOOLBAR_TOOLTIP_CROP;Oříznutí výběru.\nZkratka: c\nOblast výřezu posunete pomocí Shift + tažení myši -TOOLBAR_TOOLTIP_HAND;Nástroj ruka.\nZkratka: h +TOOLBAR_TOOLTIP_HAND;Posun.\nZkratka: h TOOLBAR_TOOLTIP_STRAIGHTEN;Vyznačení roviny / rotace.\nZkratka: s\n\nZobrazení míry rotace pomocí vodící linky na náhledu snímky. Úhel rotace je zobrazen vedle vodící linky. Střed rotace je geometrický střed snímku. TOOLBAR_TOOLTIP_WB;Bodové vyvážení bílé.\nZkratka: w TP_BWMIX_ALGO;Algoritmus OYCPM @@ -1214,6 +1251,10 @@ TP_BWMIX_VAL;L TP_CACORRECTION_BLUE;Modrá TP_CACORRECTION_LABEL;Korekce chromatické aberace TP_CACORRECTION_RED;Červená +TP_CBDL_AFT;Po černobílé +TP_CBDL_BEF;Před černobílou +TP_CBDL_METHOD;Umístění procesu +TP_CBDL_METHOD_TOOLTIP;Vyberte, zda bude nástroj Kontrast dle detailu úrovní po nástroji Černobílá, což znamená, že bude pracovat v prostoru L*a*b, nebo před ním, což znamená, že bude pracovat v RGB prostoru. TP_CHMIXER_BLUE;Modrý kanál TP_CHMIXER_GREEN;Zelený kanál TP_CHMIXER_LABEL;Míchání kanálů @@ -1235,7 +1276,7 @@ TP_COLORAPP_ALGO_JS;Světlost + Nasycení (JS) TP_COLORAPP_ALGO_QM;Jas a pestrobarevnost (QM) TP_COLORAPP_ALGO_TOOLTIP;Umožňuje vybrat mezi podmnožinou nebo všemi parametry. TP_COLORAPP_BADPIXSL;Filtr vypálených/mrtvých pixelů -TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussový.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. +TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussovo.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. TP_COLORAPP_BRIGHT;Jas (O) TP_COLORAPP_BRIGHT_TOOLTIP;Jas v CIECAM02 bere v potaz svítivost bílé a rozdíly jasů mezi L*a*b* a RGB. TP_COLORAPP_CHROMA;Barevnost (C) @@ -1354,6 +1395,12 @@ TP_DARKFRAME_LABEL;Tmavý snímek TP_DEFRINGE_LABEL;Odstranění lemu TP_DEFRINGE_RADIUS;Poloměr TP_DEFRINGE_THRESHOLD;Práh +TP_DIRPYRDENOISE_3X3;3×3 +TP_DIRPYRDENOISE_3X3_SOFT;3×3 jemný +TP_DIRPYRDENOISE_5X5;5×5 +TP_DIRPYRDENOISE_5X5_SOFT;5×5 jemný +TP_DIRPYRDENOISE_7X7;7×7 +TP_DIRPYRDENOISE_9X9;9×9 TP_DIRPYRDENOISE_ABM;Pouze barevnost TP_DIRPYRDENOISE_AUT;Automatická celková TP_DIRPYRDENOISE_AUTO;Automatická celková @@ -1396,10 +1443,12 @@ TP_DIRPYRDENOISE_METHOD11;Kvalita TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Kvalita může být přizpůsobena vzoru šumu. Nastavení "Vysoká" vylepší efekt redukce šumu za cenu navýšení času zpracování. TP_DIRPYRDENOISE_METHOD_TOOLTIP;Pro raw obrázky může být použita jak RGB tak i L*a*b* metoda.\n\nPro ostatní obrázky bude vždy použita metoda L*a*b* bez ohledu na výběr. TP_DIRPYRDENOISE_METM_TOOLTIP;Pokud je použito 'Pouze Jas' a 'L*a*b*' metody, bude při odstranění šumu použit filtr medián hned po vlnkové transformaci.\nPokud je použit "RGB" mód, bude filtr použit až na úplný závěr procesu redukce šumu. +TP_DIRPYRDENOISE_MET_TOOLTIP;Aplikuje filtr medián požadované velikosti okna. Čím větší velikost okna, tím déle bude zpracování trvat.\n\n3×3 jemný: upraví 5 pixelů v okně 3x3 pixely.\n3×3: upraví 9 pixelů v okně 3x3 pixely.\n5×5 jemný; upraví 13 pixelů v okně 5x5 pixelů.\n5×5: upraví 25 pixelů v okně 5x5 pixelů.\n7×7: upraví 49 pixelů v okně 7x7 pixelů.\n9×9: upraví 81 pixelů v okně 9x9 pixelů.\n\nV některých případech může být větší kvality dosaženo pomocí několika průběhů s menšími okny než jedním průběhem s velkým oknem. TP_DIRPYRDENOISE_NOISELABEL;Náhled šumu: Průměr=%1 Výšky=%2 TP_DIRPYRDENOISE_NOISELABELEMPTY;Náhled šumu: Průměr= - Výšky= - TP_DIRPYRDENOISE_NRESID_TOOLTIP;Zobrazuje zbývající úroveň zašumění části obrázku viditelného v náhledu po vlnkové transformaci.\n\n>300 Hodně šumu\n100-300 Šum\n50-100 Málo šumu\n<50 Velmi málo šumu\n\nUpozornění: hodnoty RGB a L*a*b* režimu se budou lišit. Protože v RGB režimu nedochází ke kompletnímu oddělení jasu a barev jsou RGB hodnoty jméně přesné TP_DIRPYRDENOISE_PASSES;Počet průchodů mediánu +TP_DIRPYRDENOISE_PASSES_TOOLTIP;Aplikování tří průchodů filtru medián s oknem 3×3 často vede k lepšímu výsledku než jednou aplikovaný filtr medián s oknem 7×7. TP_DIRPYRDENOISE_PON;Více zónová automatika TP_DIRPYRDENOISE_PRE;Více zónový náhled TP_DIRPYRDENOISE_PREV;Náhled @@ -1464,6 +1513,7 @@ TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Běžný vážený TP_EXPOS_BLACKPOINT_LABEL;Raw černé body TP_EXPOS_WHITEPOINT_LABEL;Raw bílé body TP_FILMSIMULATION_LABEL;Simulace filmu +TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee je nakonfigurován aby hledal Hald CLUT obrázky pro nástroj Simulace filmu ve složce, jejíž načítání trvá velmi dlouho.\nZkontrolujte prosím nastavení v menu Volby > Zpracování obrázku > Simulace filmu.\nNastavená složka by měla buď obsahovat jen a pouze Hald CLUT obrázky nebo být prázdná, pokud nechcete nástroj Simulace filmu používat.\n\nVíce informací získáte v článku o nástroji Simulace filmu na RawPedii.\n\nChcete zrušit právě probíhající prohledávání složky? TP_FILMSIMULATION_STRENGTH;Síla TP_FILMSIMULATION_ZEROCLUTSFOUND;Nastavte složku HaldCLUT v nastaveních TP_FLATFIELD_AUTOSELECT;Automatický výběr @@ -1513,6 +1563,8 @@ TP_ICM_APPLYLOOKTABLE;Tabulka vzhledu TP_ICM_APPLYLOOKTABLE_TOOLTIP;Použije vloženou DCP tabulku vzhledu. Nastavení je dostupné pouze pokud ji vybrané DCP obsahuje. TP_ICM_BLENDCMSMATRIX;Smísení ICC světel s matici TP_ICM_BLENDCMSMATRIX_TOOLTIP;Povolit obnovení vypálených jasů při použití ICC profilů založených na LUT. +TP_ICM_BPC;Kompenzace černého bodu +TP_ICM_BPC_TOOLTIP;Povolte pokud chcete, aby se kanál svítivosti vešel do výstupního barevného prostoru s pevným bílým bodem TP_ICM_DCPILLUMINANT;Osvětlení TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolované TP_ICM_DCPILLUMINANT_TOOLTIP;Vyberte které vložené DCP osvětlení se má použít. Ve výchozím stavu se použije "interpolované", což je mix mezi dvěma osvětleními založenými na vyvážení bílé. Nastavené je dostupné pouze v případě, že je povoleno dvojité DCP osvětlení s podporou interpolace. @@ -1531,6 +1583,7 @@ TP_ICM_INPUTPROFILE;Vstupní profil TP_ICM_LABEL;Správa barev TP_ICM_NOICM;Bez ICM: sRGB výstup TP_ICM_OUTPUTPROFILE;Výstupní barevný prostor +TP_ICM_PROFILEINTENT;Záměr reprodukce TP_ICM_SAVEREFERENCE;Uložit referenční obrázek pro profilování TP_ICM_SAVEREFERENCE_APPLYWB;Aplikovat vyvážení bílé TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Obecně se vyvážení bílé aplikuje při ukládání obrázku pro vytvoření ICC profilů a neaplikuje při vytváření DCP profilů. @@ -1584,6 +1637,7 @@ TP_LENSPROFILE_LABEL;Korekční profil objektivu TP_LENSPROFILE_USECA;Korekce chromatické aberace TP_LENSPROFILE_USEDIST;Korekce zkreslení TP_LENSPROFILE_USEVIGN;Korekce vinětace +TP_NEUTRAL;Obnovit TP_NEUTRAL_TIP;Nastaví posuvníky expozice na neutrální hodnoty,\nPoužije stejné kontroly jako volba "Automatické úrovně" bez ohledu na to, zda jsou nebo nejsou Automatické úrovně použity. TP_PCVIGNETTE_FEATHER;Rozptyl TP_PCVIGNETTE_FEATHER_TOOLTIP;Rozptyl:\n0 = pouze rohy,\n50 = napůl do středu,\n100 = do středu. @@ -1610,6 +1664,7 @@ TP_PRSHARPENING_TOOLTIP;Obrázek po zmenšení doostří. Funguje pouze pokud je TP_RAWCACORR_AUTO;Automatická korekce TP_RAWCACORR_CABLUE;Modrá TP_RAWCACORR_CARED;Červená +TP_RAWCACORR_CASTR;Síla TP_RAWEXPOS_BLACKS;Úrovně černé TP_RAWEXPOS_BLACK_0;Zelená 1 (řídící) TP_RAWEXPOS_BLACK_1;Červená @@ -1654,51 +1709,83 @@ TP_RESIZE_WIDTH;Šířka TP_RETINEX_CONTEDIT_HSL;HSV korekce histogramu TP_RETINEX_CONTEDIT_LAB;Histogram korekce L*a*b* TP_RETINEX_CONTEDIT_LH;Korekce odstínu +TP_RETINEX_CONTEDIT_MAP;Korekce masky TP_RETINEX_CURVEEDITOR_CD;L=f(L) TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Jas dle jasu L=f(L).\nUpraví raw data pro snížení výskytu halo efektu a vzniku artefaktů. TP_RETINEX_CURVEEDITOR_LH;Síla=f(O) TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Síla dle odstínu Síla=f(O)\nPokud je použita retinex metoda "světla" působí tato křivka také na barevnost. +TP_RETINEX_CURVEEDITOR_MAP;L=f(L) +TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;Tato křivka může být aplikována samostatně, nebo spolu s Gaussovou nebo vlnkovou maskou.\nPozor na artefakty! +TP_RETINEX_EQUAL;Korekce TP_RETINEX_FREEGAMMA;Volná gama TP_RETINEX_GAIN;Zisk +TP_RETINEX_GAINOFFS;Zisk a posun (jasu) +TP_RETINEX_GAINTRANSMISSION;Přenos zisku +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Zesílí nebo zeslabí mapu přenosu pro dosažení jasu.\nÚsečka: přenos -min od 0. průměr. a hodnot (max).\nPořadnice: zisk. TP_RETINEX_GAIN_TOOLTIP;Působí na obnovený obrázek.\n\nToto je velmi odlišné od ostatních nastavení. Použito pro černé nebo bílé pixely a pro vyvážení histogramu. TP_RETINEX_GAMMA;Gama TP_RETINEX_GAMMA_FREE;Volná TP_RETINEX_GAMMA_HIGH;Vysoká TP_RETINEX_GAMMA_LOW;Nízká TP_RETINEX_GAMMA_MID;Střední -TP_RETINEX_GAMMA_NONE;Nic +TP_RETINEX_GAMMA_NONE;Žádná TP_RETINEX_GAMMA_TOOLTIP;Obnoví tóny aplikováním gamy před a po Retinex. To je odlišné od Retinex křivek nebo ostatních křivek (Lab, Expozice, atd.) +TP_RETINEX_GRAD;Přenos gradientu +TP_RETINEX_GRADS;Gradient síly +TP_RETINEX_GRADS_TOOLTIP;Pokud je posuvník na nule jsou všechny průchody stejné,\nPokud je větší než nula, tak je Síla s přibývajícími průběhy omezována. A obráceně. +TP_RETINEX_GRAD_TOOLTIP;Pokud je posuvník na nule jsou všechny průchody stejné,\nPokud je větší než nula, tak jsou Odchylka a Práh s přibývajícími průběhy omezovány. A obráceně. TP_RETINEX_HIGH;Silné TP_RETINEX_HIGHLIG;Světla TP_RETINEX_HIGHLIGHT;Práh světel TP_RETINEX_HIGHLIGHT_TOOLTIP;Zvýší působení algoritmu Silné.\nMůže vyžadovat nové přizpůsobení "Sousedních pixelů" a zvýšení "Korekce bílého bodu" v kartě Raw -> Raw bílé body. TP_RETINEX_HSLSPACE_LIN;HSV - Lineární TP_RETINEX_HSLSPACE_LOG;HSV - Logaritmická +TP_RETINEX_ITER;Průchody (Mapování tónů) +TP_RETINEX_ITERF;Mapování tónů +TP_RETINEX_ITER_TOOLTIP;Simuluje operátor Mapování tónů.\nVyšší hodnoty prodlužují čas zpracování. TP_RETINEX_LABEL;Retinex +TP_RETINEX_LABEL_MASK;Maska TP_RETINEX_LABSPACE;L*a*b* TP_RETINEX_LOW;Slabé +TP_RETINEX_MAP;Metoda masky +TP_RETINEX_MAP_GAUS;Gaussova maska +TP_RETINEX_MAP_MAPP;Ostrá maska (částečná vlnka) +TP_RETINEX_MAP_MAPT;Ostrá maska (kompletní vlnka) +TP_RETINEX_MAP_METHOD_TOOLTIP;Použít masku generovanou Gaussovou funkcí výše (poloměr, metoda) pro omezení halo efektu a artefaktů.\n\nPouze křivka: na masku je aplikována diagonální křivka kontrastu.\nPozor na artefakty!\n\nGaussova maska: originální maska je upravena Gaussovým rozostřením.\nRychlé.\n\nOstrá maska: na originální masku se použije vlnka.\nPomalé. +TP_RETINEX_MAP_NONE;Žádná TP_RETINEX_MEDIAN;Přenos filtru mediánu TP_RETINEX_METHOD;Metoda -TP_RETINEX_METHOD_TOOLTIP;Slabé = Posílí slabé světlo,\nJednolité = vyvážená akce,\nSilné = Posílí silné světlo,\nSvětla = Odstraní purpurovou ve světlech. +TP_RETINEX_METHOD_TOOLTIP;Slabé = Posílí slabé světlo,\nJednolité = Vyvážená akce,\nSilné = Posílí silné světlo,\nSvětla = Odstraní purpurovou ve světlech. TP_RETINEX_MLABEL;Obnovený bez závoje Min=%1 Max=%2 TP_RETINEX_MLABEL_TOOLTIP;Mělo by být poblíž min=0 max=32768\nObnovený obraz bez příměsí. -TP_RETINEX_NEIGHBOR;Sousední pixely +TP_RETINEX_NEIGHBOR;Poloměr TP_RETINEX_NEUTRAL;Obnovit TP_RETINEX_NEUTRAL_TIP;Obnoví původní hodnoty u všech posuvníků a křivek. -TP_RETINEX_OFFSET;Posun +TP_RETINEX_OFFSET;Posun (jasu) +TP_RETINEX_SCALES;Gaussův gradient +TP_RETINEX_SCALES_TOOLTIP;Pokud je posuvník na nule jsou všechny průchody stejné,\nPokud je větší než nula, tak jsou Rozsah a Průměr s přibývajícími průběhy omezovány. A obráceně. TP_RETINEX_SETTINGS;Nastavení +TP_RETINEX_SKAL;Měřítko TP_RETINEX_SLOPE;Sklon volné gamy TP_RETINEX_STRENGTH;Síla TP_RETINEX_THRESHOLD;Práh TP_RETINEX_THRESHOLD_TOOLTIP;Omezuje Vstup/Výstup.\nVstup = zdroj obrázku,\nVýstup = gauss obrázku. TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Průměr=%3 Sigma=%4 TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 -TP_RETINEX_TLABEL_TOOLTIP;Výsledek Mapy přenosu .\nMin a Max jsou použity Odchylkou.\nPrůměr a Sigma\nTm=Min TM=Max Mapy přenosu. +TP_RETINEX_TLABEL_TOOLTIP;Výsledek Mapy přenosu .\nMin a Max jsou použity Odchylkou.\nPrůměr a Sigma\nTm=Min TM=Max mapy přenosu. +TP_RETINEX_TRANF;Přenos TP_RETINEX_TRANSMISSION;Mapa přenosu TP_RETINEX_TRANSMISSION_TOOLTIP;Přenos podle přenosu.\nÚsečka: přenos z negativních hodnot (min), průměru a kladných hodnot (max).\nPořadnice: zesílení nebo zeslabení. TP_RETINEX_UNIFORM;Jednolité -TP_RETINEX_VARIANCE;Odchylka +TP_RETINEX_VARIANCE;Kontrast TP_RETINEX_VARIANCE_TOOLTIP;Nízká odchylka zvyšuje místní kontrast a nasycení, ale může vést ke vzniku artefaktů. +TP_RETINEX_VIEW;Zpracování +TP_RETINEX_VIEW_MASK;Maska +TP_RETINEX_VIEW_METHOD_TOOLTIP;Běžné - běžné zobrazení.\nMaska - zobrazí masku.\nNeostrá maska - zobrazí obrázek s neostrou maskou s velkým poloměrem.\nPřenos - Auto/Pevný - zobrazí soubor mapy přenosu před jakoukoli úpravou kontrastu a jasu.\n\nUpozornění: maska neodpovídá realitě. Je zesílena, aby byla lépe vidět. +TP_RETINEX_VIEW_NONE;Běžné +TP_RETINEX_VIEW_TRAN;Přenos - Automatický +TP_RETINEX_VIEW_TRAN2;Přenos - Pevný +TP_RETINEX_VIEW_UNSHARP;Maskování rozostření TP_RGBCURVES_BLUE;B TP_RGBCURVES_CHANNEL;Kanál TP_RGBCURVES_GREEN;G @@ -1725,7 +1812,7 @@ TP_SHARPENEDGE_THREE;Pouze jas TP_SHARPENING_AMOUNT;Míra TP_SHARPENING_EDRADIUS;Poloměr TP_SHARPENING_EDTOLERANCE;Tolerance k hranám -TP_SHARPENING_HALOCONTROL;Omezení haló artefatů +TP_SHARPENING_HALOCONTROL;Omezení halo efektu TP_SHARPENING_HCAMOUNT;Míra TP_SHARPENING_LABEL;Doostření TP_SHARPENING_METHOD;Metoda @@ -1982,84 +2069,3 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Přizpůsobit obrazovce\nZkratka: Alt-ff ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. -!GENERAL_APPLY;Apply -!GENERAL_OPEN;Open -!HISTORY_MSG_166;Exposure - Reset -!HISTORY_MSG_427;Output rendering intent -!HISTORY_MSG_428;Monitor rendering intent -!HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient -!HISTORY_MSG_432;Retinex - M - Highlights -!HISTORY_MSG_433;Retinex - M - Highlights TW -!HISTORY_MSG_434;Retinex - M - Shadows -!HISTORY_MSG_435;Retinex - M - Shadows TW -!HISTORY_MSG_436;Retinex - M - Radius -!HISTORY_MSG_437;Retinex - M - Method -!HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Process -!HISTORY_MSG_440;CbDL - Method -!HISTORY_MSG_441;Retinex - Gain transmission -!HISTORY_MSG_442;Retinex - Scale -!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor -!MONITOR_PROFILE_SYSTEM;System default -!PARTIALPASTE_PRSHARPENING;Post-resize sharpening -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile -!PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. -!PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. -!PREFERENCES_PROFILE_NONE;None -!TP_CBDL_AFT;After Black-and-White -!TP_CBDL_BEF;Before Black-and-White -!TP_CBDL_METHOD;Process located -!TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_DIRPYRDENOISE_3X3;3×3 -!TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft -!TP_DIRPYRDENOISE_5X5;5×5 -!TP_DIRPYRDENOISE_5X5_SOFT;5×5 soft -!TP_DIRPYRDENOISE_7X7;7×7 -!TP_DIRPYRDENOISE_9X9;9×9 -!TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. -!TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. -!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? -!TP_ICM_PROFILEINTENT;Rendering Intent -!TP_NEUTRAL;Reset -!TP_RAWCACORR_CASTR;Strength -!TP_RETINEX_CONTEDIT_MAP;Mask equalizer -!TP_RETINEX_CURVEEDITOR_MAP;L=f(L) -!TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! -!TP_RETINEX_EQUAL;Equalizer -!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) -!TP_RETINEX_GAINTRANSMISSION;Gain transmission -!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. -!TP_RETINEX_GRAD;Transmission gradient -!TP_RETINEX_GRADS;Strength gradient -!TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. -!TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. -!TP_RETINEX_ITER;Iterations (Tone-mapping) -!TP_RETINEX_ITERF;Tone mapping -!TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. -!TP_RETINEX_LABEL_MASK;Mask -!TP_RETINEX_MAP;Mask method -!TP_RETINEX_MAP_GAUS;Gaussian mask -!TP_RETINEX_MAP_MAPP;Sharp mask (wavelet partial) -!TP_RETINEX_MAP_MAPT;Sharp mask (wavelet total) -!TP_RETINEX_MAP_METHOD_TOOLTIP;Use the mask generated by the Gaussian function above (Radius, Method) to reduce halos and artifacts.\n\nCurve only: apply a diagonal contrast curve on the mask.\nBeware of artifacts!\n\nGaussian mask: generate and use a Gaussian blur of the original mask.\nQuick.\n\nSharp mask: generate and use a wavelet on the original mask.\nSlow. -!TP_RETINEX_MAP_NONE;None -!TP_RETINEX_SCALES;Gaussian gradient -!TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. -!TP_RETINEX_SKAL;Scale -!TP_RETINEX_TRANF;Transmission -!TP_RETINEX_VIEW;Process -!TP_RETINEX_VIEW_MASK;Mask -!TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - Normal display.\nMask - Displays the mask.\nUnsharp mask - Displays the image with a high radius unsharp mask.\nTransmission - Auto/Fixed - Displays the file transmission-map, before any action on contrast and brightness.\n\nAttention: the mask does not correspond to reality, but is amplified to make it more visible. -!TP_RETINEX_VIEW_NONE;Standard -!TP_RETINEX_VIEW_TRAN;Transmission - Auto -!TP_RETINEX_VIEW_TRAN2;Transmission - Fixed -!TP_RETINEX_VIEW_UNSHARP;Unsharp mask From 70d14740e0c9e903b73387b80ac259ab7a16eee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kyral?= Date: Tue, 18 Oct 2016 21:24:33 +0200 Subject: [PATCH 064/115] Czech translation file update - small fixes --- rtdata/languages/Czech | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 99cb4cc95..5f48f657d 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -33,11 +33,8 @@ #32 2014-10-24 updated by mkyral #33 2015-02-22 updated by mkyral #34 2015-07-09 updated by mkyral -#38 2015-11-24 updated by mkyral -#36 2015-10-26 updated by mkyral -#37 2015-11-21 updated by mkyral -#38 2016-07-21 updated by mkyral -#39 2016-10-18 updated by mkyral +#35 2015-11-24 updated by mkyral +#36 2016-10-18 updated by mkyral ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy ABOUT_TAB_LICENSE;Licence @@ -663,11 +660,11 @@ HISTORY_MSG_392;Vlnka - Zůstatek - VB vrátit HISTORY_MSG_393;DCP - tabulka vzhledu HISTORY_MSG_394;DCP - základní expozice HISTORY_MSG_395;DCP - základní tabulka -HISTORY_MSG_396;Vlnka - Kontrast -HISTORY_MSG_397;Vlnka - Barevnost +HISTORY_MSG_396;Vlnka - Kontrast +HISTORY_MSG_397;Vlnka - Barevnost HISTORY_MSG_398;Vlnka - Doostření hran HISTORY_MSG_399;Vlnka - Zůstatek -HISTORY_MSG_400;Vlnka - Dokončení +HISTORY_MSG_400;Vlnka - Dokončení HISTORY_MSG_401;Vlnka - Tónování HISTORY_MSG_402;Vlnka - Odšumění HISTORY_MSG_403;Vlnka - DH - Citlivost detekce hran @@ -682,7 +679,7 @@ HISTORY_MSG_411;Retinex - Síla HISTORY_MSG_412;Retinex - Gaussův gradient HISTORY_MSG_413;Retinex - Kontrast HISTORY_MSG_414;Retinex - Histogram - Lab -HISTORY_MSG_415;Retinex - přenos +HISTORY_MSG_415;Retinex - Přenos HISTORY_MSG_416;Retinex HISTORY_MSG_417;Retinex - Medián přenosu HISTORY_MSG_418;Retinex - Práh @@ -692,7 +689,7 @@ HISTORY_MSG_421;Retinex - Gama HISTORY_MSG_422;Retinex - Gama HISTORY_MSG_423;Retinex - Sklon gamy HISTORY_MSG_424;Retinex - Práh zachování jasů -HISTORY_MSG_425;Retinex - Základní log +HISTORY_MSG_425;Retinex - Základ log. HISTORY_MSG_426;Retinex - Korekce odstínu HISTORY_MSG_427;Výstupní záměr reprodukce HISTORY_MSG_428;Záměr reprodukce monitoru @@ -700,15 +697,15 @@ HISTORY_MSG_429;Retinex - Průchody HISTORY_MSG_430;Retinex - Přenos gradientu HISTORY_MSG_431;Retinex - Síla gradientu HISTORY_MSG_432;Retinex - M - Světla -HISTORY_MSG_433;Retinex - M - Světla TW -HISTORY_MSG_434;Retinex - Stíny -HISTORY_MSG_435;Retinex - Stíny TW +HISTORY_MSG_433;Retinex - M - Světla tóny +HISTORY_MSG_434;Retinex - M - Stíny +HISTORY_MSG_435;Retinex - M - Stíny tóny HISTORY_MSG_436;Retinex - M - poloměr HISTORY_MSG_437;Retinex - M - Metoda HISTORY_MSG_438;Retinex - M - Korekce HISTORY_MSG_439;Retinex - Zpracování HISTORY_MSG_440;Metoda KdDÚ -HISTORY_MSG_441;Retinex - přenos zisku +HISTORY_MSG_441;Retinex - Přenos zisku HISTORY_MSG_442;Retinex - Měřítko HISTORY_MSG_443;Kompenzace výstupního černého bodu HISTORY_NEWSNAPSHOT;Přidat @@ -1268,7 +1265,7 @@ TP_COLORAPP_ADAPTSCENE;Svítivost scény TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolutní jas scény prostředí(cd/m²).\n 1) Vypočítáno z Exifu:\nRychlost závěrky - citlivost - clona - expoziční korekce fotoaparátu.\n 2) Vypočítáno z hodnoty raw bílého bodu a expoziční kompenzace Rawtherapee. TP_COLORAPP_ADAPTVIEWING;Svítivost prohlížení (cd/m²) TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolutní jas prostředí prohlížení\n(obvykle 16cd/m²). -TP_COLORAPP_ADAP_AUTO_TOOLTIP;Pokud je povoleno (doporučeno), RT vypočítá optimální hodnotu z Exif dat.\nPokud si přejete zadat hodnotu ručně, nejprve zrušte zatržení tohoto pole. +TP_COLORAPP_ADAP_AUTO_TOOLTIP;Pokud je povoleno (doporučeno), RT vypočítá optimální hodnotu z Exif dat.\nPokud si přejete zadat hodnotu ručně, nejprve zrušte zatržení tohoto pole. TP_COLORAPP_ALGO;Algoritmus TP_COLORAPP_ALGO_ALL;Vše TP_COLORAPP_ALGO_JC;Světlost + Barevnost (JC) @@ -1276,7 +1273,7 @@ TP_COLORAPP_ALGO_JS;Světlost + Nasycení (JS) TP_COLORAPP_ALGO_QM;Jas a pestrobarevnost (QM) TP_COLORAPP_ALGO_TOOLTIP;Umožňuje vybrat mezi podmnožinou nebo všemi parametry. TP_COLORAPP_BADPIXSL;Filtr vypálených/mrtvých pixelů -TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussovo.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. +TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussovo.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. TP_COLORAPP_BRIGHT;Jas (O) TP_COLORAPP_BRIGHT_TOOLTIP;Jas v CIECAM02 bere v potaz svítivost bílé a rozdíly jasů mezi L*a*b* a RGB. TP_COLORAPP_CHROMA;Barevnost (C) From c027c3295a73adc02025b9596af2b49b3e30b3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kyral?= Date: Tue, 18 Oct 2016 21:28:39 +0200 Subject: [PATCH 065/115] Czech translation file update - remove spare spaces at EOL --- rtdata/languages/Czech | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 5f48f657d..5581937fc 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -660,11 +660,11 @@ HISTORY_MSG_392;Vlnka - Zůstatek - VB vrátit HISTORY_MSG_393;DCP - tabulka vzhledu HISTORY_MSG_394;DCP - základní expozice HISTORY_MSG_395;DCP - základní tabulka -HISTORY_MSG_396;Vlnka - Kontrast -HISTORY_MSG_397;Vlnka - Barevnost +HISTORY_MSG_396;Vlnka - Kontrast +HISTORY_MSG_397;Vlnka - Barevnost HISTORY_MSG_398;Vlnka - Doostření hran HISTORY_MSG_399;Vlnka - Zůstatek -HISTORY_MSG_400;Vlnka - Dokončení +HISTORY_MSG_400;Vlnka - Dokončení HISTORY_MSG_401;Vlnka - Tónování HISTORY_MSG_402;Vlnka - Odšumění HISTORY_MSG_403;Vlnka - DH - Citlivost detekce hran @@ -1265,7 +1265,7 @@ TP_COLORAPP_ADAPTSCENE;Svítivost scény TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolutní jas scény prostředí(cd/m²).\n 1) Vypočítáno z Exifu:\nRychlost závěrky - citlivost - clona - expoziční korekce fotoaparátu.\n 2) Vypočítáno z hodnoty raw bílého bodu a expoziční kompenzace Rawtherapee. TP_COLORAPP_ADAPTVIEWING;Svítivost prohlížení (cd/m²) TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolutní jas prostředí prohlížení\n(obvykle 16cd/m²). -TP_COLORAPP_ADAP_AUTO_TOOLTIP;Pokud je povoleno (doporučeno), RT vypočítá optimální hodnotu z Exif dat.\nPokud si přejete zadat hodnotu ručně, nejprve zrušte zatržení tohoto pole. +TP_COLORAPP_ADAP_AUTO_TOOLTIP;Pokud je povoleno (doporučeno), RT vypočítá optimální hodnotu z Exif dat.\nPokud si přejete zadat hodnotu ručně, nejprve zrušte zatržení tohoto pole. TP_COLORAPP_ALGO;Algoritmus TP_COLORAPP_ALGO_ALL;Vše TP_COLORAPP_ALGO_JC;Světlost + Barevnost (JC) @@ -1273,7 +1273,7 @@ TP_COLORAPP_ALGO_JS;Světlost + Nasycení (JS) TP_COLORAPP_ALGO_QM;Jas a pestrobarevnost (QM) TP_COLORAPP_ALGO_TOOLTIP;Umožňuje vybrat mezi podmnožinou nebo všemi parametry. TP_COLORAPP_BADPIXSL;Filtr vypálených/mrtvých pixelů -TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussovo.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. +TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussovo.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. TP_COLORAPP_BRIGHT;Jas (O) TP_COLORAPP_BRIGHT_TOOLTIP;Jas v CIECAM02 bere v potaz svítivost bílé a rozdíly jasů mezi L*a*b* a RGB. TP_COLORAPP_CHROMA;Barevnost (C) From c00b7c72231df01c7a067090a29d0837a5fc4b8e Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 19 Oct 2016 10:12:15 +0200 Subject: [PATCH 066/115] Regenerated translation files --- rtdata/languages/Catala | 8 ++++++++ rtdata/languages/Chinese (Simplified) | 10 +++++++++- rtdata/languages/Chinese (Traditional) | 10 +++++++++- rtdata/languages/Czech | 2 ++ rtdata/languages/Dansk | 10 +++++++++- rtdata/languages/Deutsch | 12 ++++++++++++ rtdata/languages/English (UK) | 10 +++++++++- rtdata/languages/English (US) | 10 +++++++++- rtdata/languages/Espanol | 8 ++++++++ rtdata/languages/Euskara | 10 +++++++++- rtdata/languages/Francais | 2 +- rtdata/languages/Greek | 10 +++++++++- rtdata/languages/Hebrew | 10 +++++++++- rtdata/languages/Italiano | 8 ++++++++ rtdata/languages/Japanese | 8 ++++++++ rtdata/languages/Latvian | 10 +++++++++- rtdata/languages/Magyar | 8 ++++++++ rtdata/languages/Nederlands | 8 ++++++++ rtdata/languages/Norsk BM | 10 +++++++++- rtdata/languages/Polish | 8 ++++++++ rtdata/languages/Polish (Latin Characters) | 8 ++++++++ rtdata/languages/Portugues (Brasil) | 10 +++++++++- rtdata/languages/Russian | 8 ++++++++ rtdata/languages/Serbian (Cyrilic Characters) | 8 ++++++++ rtdata/languages/Serbian (Latin Characters) | 8 ++++++++ rtdata/languages/Slovak | 8 ++++++++ rtdata/languages/Suomi | 10 +++++++++- rtdata/languages/Swedish | 8 ++++++++ rtdata/languages/Turkish | 10 +++++++++- 29 files changed, 236 insertions(+), 14 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index d54566400..4f851613f 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1306,6 +1306,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1406,6 +1407,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1423,6 +1425,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1449,6 +1452,9 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PROGRESSBAR_SNAPSHOT_ADDED;Snapshot added !SAVEDLG_FORCEFORMATOPTS;Force saving options !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1724,6 +1730,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 9b6385249..6e6459968 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1223,6 +1223,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). @@ -1353,6 +1354,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1375,7 +1377,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1417,6 +1420,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PROGRESSDLG_PROFILECHANGEDINBROWSER;Processing profile changed in browser !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1424,6 +1429,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_TOOLTIP;Linear: will produce a normal linear response.\nSpecial effects: will produce special effects by mixing channels non-linearly. !TP_BWMIX_AUTOCH_TIP;Calculate values optimizing Channel Mixer. @@ -1660,6 +1666,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index c797a80d8..56f7803ae 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -958,6 +958,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1160,6 +1161,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1183,7 +1185,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1240,6 +1243,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1247,6 +1252,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1584,6 +1590,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 5581937fc..81ce01646 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -35,6 +35,7 @@ #34 2015-07-09 updated by mkyral #35 2015-11-24 updated by mkyral #36 2016-10-18 updated by mkyral + ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy ABOUT_TAB_LICENSE;Licence @@ -2066,3 +2067,4 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Přizpůsobit obrazovce\nZkratka: Alt-ff ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - + diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 67ab884c8..a01187876 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1582,6 +1588,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 9c7478cf7..03b723edc 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -2054,3 +2054,15 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen\nTaste: f ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: + ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!HISTORY_MSG_443;Output Black Point Compensation +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index f960286c8..6e6dc220e 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -37,7 +37,10 @@ PREFERENCES_INTENT_ABSOLUTE;Absolute Colourimetric PREFERENCES_INTENT_RELATIVE;Relative Colourimetric PREFERENCES_MENUGROUPLABEL;Group "Colour label" PREFERENCES_NAVGUIDEBRUSH;Navigator guide colour +PREFERENCES_SELECTFONT_COLPICKER;Select Colour Picker's font PREFERENCES_TAB_COLORMGR;Colour Management +SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colours from the output profile. +TOOLBAR_TOOLTIP_COLORPICKER;Lockable Colour Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a colour picker\nDrag it around while pressing the left mouse button\nDelete the colour picker with a right mouse button click\nDelete all colour pickers with Shift + Right mouse button click\nRight click away from any colour picker to go back to the Hand tool TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image preview. Angle of rotation will be shown next to the guide line. Centre of rotation is the geometrical centre of the image. TP_BWMIX_CC_ENABLED;Adjust complementary colour TP_BWMIX_CC_TOOLTIP;Enable to allow automatic adjustment of complementary colours in ROYGCBPM mode. @@ -77,6 +80,7 @@ TP_GRADIENT_CENTER;Centre TP_GRADIENT_CENTER_X;Centre X TP_GRADIENT_CENTER_Y;Centre Y TP_HLREC_COLOR;Colour Propagation +TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output colour space with a fix White Point TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input colour profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple colour matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. TP_ICM_INPUTCUSTOM_TOOLTIP;Select your own DCP/ICC colour profile file for the camera. @@ -752,6 +756,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1063,6 +1068,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1101,7 +1107,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font !PREFERENCES_SELECTLANG;Select language !PREFERENCES_SELECTTHEME;Select theme !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings @@ -1196,6 +1202,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1543,6 +1550,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index f38615acd..38a9c16ce 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -675,6 +675,7 @@ !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1001,6 +1002,7 @@ !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1040,7 +1042,8 @@ !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SELECTLANG;Select language !PREFERENCES_SELECTTHEME;Select theme !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings @@ -1136,6 +1139,8 @@ !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1143,6 +1148,7 @@ !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TOOLBAR_TOOLTIP_CROP;Crop selection.\nShortcut: c\nMove the crop area using Shift-mouse drag !TOOLBAR_TOOLTIP_HAND;Hand tool.\nShortcut: h !TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image preview. Angle of rotation will be shown next to the guide line. Center of rotation is the geometrical center of the image. @@ -1522,6 +1528,8 @@ !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index fc06babc8..25b466438 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1702,6 +1702,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1753,6 +1754,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1767,6 +1769,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1783,6 +1786,9 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1837,6 +1843,8 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 1d4df36ae..6a640949b 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1582,6 +1588,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index deca1cdd2..c189abd09 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -954,8 +954,8 @@ PREFERENCES_MENUGROUPPROFILEOPERATIONS;Opérations sur les profils PREFERENCES_MENUGROUPRANK;Classement PREFERENCES_MENUOPTIONS;Options du menu PREFERENCES_METADATA;Metadonnées -PREFERENCES_MONBPC;Compensation du Point Noir pour la transformation L*a*b*->Moniteur PREFERENCES_MIN;Mini (100x115) +PREFERENCES_MONBPC;Compensation du Point Noir pour la transformation L*a*b*->Moniteur PREFERENCES_MULTITAB;Éditeurs multiple PREFERENCES_MULTITABDUALMON;Éditeurs multiple, si possible sur un second moniteur PREFERENCES_NAVGUIDEBRUSH;Couleur du cadre dans le Navigateur diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 13d87c84c..e25776b49 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -953,6 +953,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1157,6 +1158,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1180,7 +1182,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1237,6 +1240,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1244,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1581,6 +1587,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index f91ac1f95..9f9a3a32b 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1582,6 +1588,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index eabb2ff60..45a52454d 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1574,6 +1574,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1623,6 +1624,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1637,6 +1639,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1653,6 +1656,9 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1764,6 +1770,8 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 34211dbb3..15c1afe2a 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1954,17 +1954,23 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RETINEX;Retinex +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. !PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1978,6 +1984,8 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. !TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_NEUTRAL;Reset !TP_RAWCACORR_CASTR;Strength diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index 8e93725bb..42a6c48bb 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1582,6 +1588,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index dc4129b8f..a24849353 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1235,6 +1235,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1343,6 +1344,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MENUGROUPEXTPROGS;Group "Open with" !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1360,6 +1362,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1393,6 +1396,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1400,6 +1405,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1686,6 +1692,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 54e0a68e1..6d2f83e91 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -2034,6 +2034,12 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_AUTOCH;Auto !TP_DIRPYRDENOISE_3X3;3×3 !TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft @@ -2043,6 +2049,8 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !TP_DIRPYRDENOISE_9X9;9×9 !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. !TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_RETINEX_GAINOFFS;Gain and Offset (brightness) !TP_RETINEX_GAINTRANSMISSION;Gain transmission !TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index a3554ca16..2854053ae 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -953,6 +953,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1157,6 +1158,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1180,7 +1182,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1237,6 +1240,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1244,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1581,6 +1587,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 584409e96..43ccb1225 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1659,6 +1659,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1701,6 +1702,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1715,6 +1717,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1731,6 +1734,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1785,6 +1791,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 5ff2cc31b..fc68c15cf 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1659,6 +1659,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1701,6 +1702,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1715,6 +1717,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1731,6 +1734,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1785,6 +1791,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index 9891c07b3..57e7bd26f 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1582,6 +1588,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index b792e92bc..56e7ab0ce 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1517,6 +1517,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1579,6 +1580,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1594,6 +1596,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1610,6 +1613,9 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_SET_RGBABS;Absolute RGB !TP_BWMIX_SET_RGBREL;Relative RGB !TP_BWMIX_SET_ROYGCBPMABS;Absolute ROYGCBPM @@ -1765,6 +1771,8 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 5145322d2..5ef963d62 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1684,6 +1684,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1745,6 +1746,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1760,6 +1762,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1774,7 +1777,10 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_BL;Bottom-left +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_FILTER_TOOLTIP;The color filter simulates shots taken with a colored filter placed in front of the lens. Colored filters reduce the transmission of specific color ranges and therefore affect their lightness. E.g. a red filter darkens blue skies. !TP_BWMIX_FILTER_YELLOW;Yellow !TP_BWMIX_GAMMA;Gamma Correction @@ -1898,6 +1904,8 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index c770ad345..e831a85a5 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1684,6 +1684,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1745,6 +1746,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1760,6 +1762,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1774,7 +1777,10 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_BL;Bottom-left +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_FILTER_TOOLTIP;The color filter simulates shots taken with a colored filter placed in front of the lens. Colored filters reduce the transmission of specific color ranges and therefore affect their lightness. E.g. a red filter darkens blue skies. !TP_BWMIX_FILTER_YELLOW;Yellow !TP_BWMIX_GAMMA;Gamma Correction @@ -1898,6 +1904,8 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 90eef3409..0075a1814 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -1017,6 +1017,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1208,6 +1209,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode @@ -1228,6 +1230,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1277,6 +1280,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1284,6 +1289,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1610,6 +1616,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 612df257d..43088a7ef 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -955,6 +955,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1159,6 +1160,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1182,7 +1184,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1582,6 +1588,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index fbdb4c3ae..0f62e099a 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1787,6 +1787,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_COLORTONING;Color toning @@ -1800,17 +1801,22 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PREFERENCES_MAX;Maxi (Tile) !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. !PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_TINB;Number of tiles !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !SAVEDLG_SUBSAMP;Subsampling !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1868,6 +1874,8 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_NEUTRAL;Reset !TP_PRSHARPENING_LABEL;Post-Resize Sharpening diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index 0af0611d5..4ef016622 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1237,6 +1240,8 @@ TP_WBALANCE_TEMPERATURE;Isı !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1244,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;Isı !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1581,6 +1587,8 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. From e684bfaaa54e973d42596da094fcac5bb05a7818 Mon Sep 17 00:00:00 2001 From: frspp Date: Thu, 20 Oct 2016 00:57:35 +0300 Subject: [PATCH 067/115] Update camconst.json support for olympus omd e10 mk2 raw (was pink issue). --- rtengine/camconst.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index cf3e976ce..e8cba2ff5 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1410,7 +1410,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know }, { // Quality b, crop correction - "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10 Mark II" ], + "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10 Mark II", "OLYMPUS E-M10MarkII" ], "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], "raw_crop": [ 0, 0, 4624, 3472 ], // largest valid - full frame is 4640x3472 // "raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 From 0ba6258fc84e1aa4f73f990f7da9ec07aeea91b6 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Thu, 20 Oct 2016 20:00:09 +0200 Subject: [PATCH 068/115] Removed 3 Noise Reduction tooltips as they were intrusive and/or incorrect, no issue - IRC --- rtdata/languages/Catala | 3 --- rtdata/languages/Chinese (Simplified) | 3 --- rtdata/languages/Chinese (Traditional) | 3 --- rtdata/languages/Czech | 3 --- rtdata/languages/Dansk | 3 --- rtdata/languages/Deutsch | 3 --- rtdata/languages/English (UK) | 3 --- rtdata/languages/English (US) | 3 --- rtdata/languages/Espanol | 3 --- rtdata/languages/Euskara | 3 --- rtdata/languages/Francais | 3 --- rtdata/languages/Greek | 3 --- rtdata/languages/Hebrew | 3 --- rtdata/languages/Italiano | 3 --- rtdata/languages/Japanese | 3 --- rtdata/languages/Latvian | 3 --- rtdata/languages/Magyar | 3 --- rtdata/languages/Nederlands | 3 --- rtdata/languages/Norsk BM | 3 --- rtdata/languages/Polish | 3 --- rtdata/languages/Polish (Latin Characters) | 3 --- rtdata/languages/Portugues (Brasil) | 3 --- rtdata/languages/Russian | 3 --- rtdata/languages/Serbian (Cyrilic Characters) | 3 --- rtdata/languages/Serbian (Latin Characters) | 3 --- rtdata/languages/Slovak | 3 --- rtdata/languages/Suomi | 3 --- rtdata/languages/Swedish | 3 --- rtdata/languages/Turkish | 3 --- rtdata/languages/default | 3 --- rtgui/dirpyrdenoise.cc | 4 ---- 31 files changed, 94 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 4f851613f..3752bdd34 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1650,7 +1650,6 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Gamma varies noise reduction strength across the range of tones. Smaller values will target shadows, while larger values will stretch the effect to the brighter tones. @@ -1661,13 +1660,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 6e6459968..81226c2bf 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1585,7 +1585,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1597,13 +1596,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index 56f7803ae..49ef3bc77 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -1459,7 +1459,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1474,13 +1473,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 81ce01646..015dc1a7d 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -1414,7 +1414,6 @@ TP_DIRPYRDENOISE_CUR;Křivka TP_DIRPYRDENOISE_CURVEEDITOR_CC;Barevnost TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Zvýší (násobí) hodnoty všech barevných posuvníků.\nKřivka vám umožní nastavit sílu redukce barevného šumu jako funkci barvy. Například pro zvýšení účinku v oblastech s nízkým nasycení a snížení v oblastech s vysokým nasycením. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduluje akci 'jasového' odstranění šumu -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Může být použito jak pro raw tak i pro ostatní obrázky.\n\nPokud je použito pro ostatní obrázky, závisí redukce šumu dle jasu na gamě vstupního barevného profilu. Předpokládá se sRGB gama a proto se může výsledek u obrázků s rozdílnou gamou barevného profilu lišit. TP_DIRPYRDENOISE_ENH;Vylepšený režim TP_DIRPYRDENOISE_ENH_TOOLTIP;Zvýší kvalitu odstranění šumu, ale zároveň prodlouží dobu zpracování o 20%. TP_DIRPYRDENOISE_GAMMA;Gama @@ -1429,13 +1428,11 @@ TP_DIRPYRDENOISE_LPLABM;Vyvážená L* (trochu) + a*b* (normální) TP_DIRPYRDENOISE_LTYPE;Ovládání jasu TP_DIRPYRDENOISE_LUMA;Jas TP_DIRPYRDENOISE_LUMAFR;Jas -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Vlnková transformace na svítivost a Fourierova transformace pro detail svítivosti TP_DIRPYRDENOISE_MAN;Ručně TP_DIRPYRDENOISE_MANU;Ručně TP_DIRPYRDENOISE_MED;Filtr medián TP_DIRPYRDENOISE_MEDMETHOD;Metoda mediánu TP_DIRPYRDENOISE_MEDTYPE;Typ mediánu -TP_DIRPYRDENOISE_MED_TOOLTIP;Povolit odstranění šumu Medián TP_DIRPYRDENOISE_METHOD;Metoda TP_DIRPYRDENOISE_METHOD11;Kvalita TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Kvalita může být přizpůsobena vzoru šumu. Nastavení "Vysoká" vylepší efekt redukce šumu za cenu navýšení času zpracování. diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index a01187876..3a008127b 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -1457,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1472,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 03b723edc..8d1c44b60 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -1402,7 +1402,6 @@ TP_DIRPYRDENOISE_CUR;Kurve TP_DIRPYRDENOISE_CURVEEDITOR_CC;Farbe TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Erhöht den Wert aller Chrominanz-Regler und regelt die Chrominanz-Rauschreduzierung als Funktion der Chromatizität. Die Intensität kann über Kontrollpunkte für schwach bis intensiv gesättigte Farben unterschiedlich eingestellt werden. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduliert die Wirkung der Luminanz-Rauschreduzierung -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Kann für RAW und Nicht-RAW-Bilder verwendet werden.\n\nBei Nicht-Raw-Bildern hängt die Rauschreduzierung der Luminanz vom Gamma des Eingangsfarbprofils ab. Es wird ein sRGB-Gamma angenommen, daher wird die Luminanz-Rauschreduzierung variieren, wenn das Eingangsbild ein Farbprofil mit anderem Gamma verwendet. TP_DIRPYRDENOISE_ENH;Erweiterter Modus TP_DIRPYRDENOISE_ENH_TOOLTIP;Erhöht die Qualität der Rauschreduzierung auf Kosten einer um 20% erhöhten Verarbeitungszeit. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1417,13 +1416,11 @@ TP_DIRPYRDENOISE_LPLABM;Gewichtet L* (wenig) + a*b* (normal) TP_DIRPYRDENOISE_LTYPE;Luminanzkontrolle TP_DIRPYRDENOISE_LUMA;Luminanz TP_DIRPYRDENOISE_LUMAFR;Luminanz -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet mit Luminanz- und Fourierumwandlung für Luminanzdetails. TP_DIRPYRDENOISE_MAN;Benutzerdefiniert TP_DIRPYRDENOISE_MANU;Benutzerdefiniert TP_DIRPYRDENOISE_MED;Medianfilter TP_DIRPYRDENOISE_MEDMETHOD;Medianmethode TP_DIRPYRDENOISE_MEDTYPE;Mediantyp -TP_DIRPYRDENOISE_MED_TOOLTIP;Medianrauschreduzierung einschalten TP_DIRPYRDENOISE_METHOD;Methode TP_DIRPYRDENOISE_METHOD11;Qualität TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Einstellung der Qualität der Rauschreduzierung. Die Einstellung “Hoch“ verbessert die Rauschreduzierung auf Kosten der Verarbeitungszeit. diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index 6e6dc220e..4b7e2979f 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -68,7 +68,6 @@ TP_COLORTONING_SPLITLR;Saturation 2 colours TP_COLORTONING_TWO2;Special chroma '2 colours' 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 colours:\nMore predictable. TP_DIRPYRDENOISE_CTYPE_TOOLTIP;Manual\nActs on the full image.\nYou control the noise reduction settings manually.\n\nAutomatic global\nActs on the full image.\n9 zones are used to calculate a global chrominance noise reduction setting.\n\nAutomatic multi-zones\nNo preview - works only during saving, but using the "Preview" method by matching the tile size and centre to the preview size and centre you can get an idea of the expected results.\nThe image is divided into tiles (about 10 to 70 depending on image size) and each tile receives its own chrominance noise reduction settings.\n\nPreview\nActs on the whole image.\nThe part of the image visible in the preview is used to calculate global chrominance noise reduction settings. -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 colour profile. An sRGB gamma is assumed, thus if the image uses an input colour profile of a different gamma, the effects of luminance noise reduction will differ. TP_DIRPYRDENOISE_PREVLABEL;Preview size=%1, Centre: Px=%2 Py=%3 TP_DIRPYRDENOISE_TILELABEL;Tile size=%1, Centre: Tx=%2 Ty=%3 TP_DIRPYREQUALIZER_ALGO;Skin Colour Range @@ -1429,13 +1428,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 38a9c16ce..3691fc6d4 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -1381,7 +1381,6 @@ !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1396,13 +1395,11 @@ !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 25b466438..24bd6c21d 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1165,7 +1165,6 @@ TP_DEFRINGE_THRESHOLD;Umbral TP_DIRPYRDENOISE_BLUE;Crominancia: Azul-Amarillo TP_DIRPYRDENOISE_CHROMA;Crominancia: Maestra TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modula la acción de eliminación de ruido 'de luminancia' -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Puede usarse en imágenes Raw y no Raw.\n\nPara imágenes no Raw la reducción del ruido en la luminancia depende de la gamma en el perfil de color de entrada. Se asume la gamma de sRGB, de manera que si la imagen tiene un perfil de color con otra gamma, la reducción del ruido en la luminancia va a variar. TP_DIRPYRDENOISE_ENH;Modo mejorado TP_DIRPYRDENOISE_ENH_TOOLTIP;Incrementa la calidad de la Reducción de Ruido a costa de un incremento de 20% en el tiempo de procesamiento TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1179,7 +1178,6 @@ TP_DIRPYRDENOISE_LUMA;Luminancia TP_DIRPYRDENOISE_MED;Median TP_DIRPYRDENOISE_MEDMETHOD;Método Median TP_DIRPYRDENOISE_MEDTYPE;Tipo Median -TP_DIRPYRDENOISE_MED_TOOLTIP;Eliminador de ruido Median activado TP_DIRPYRDENOISE_METHOD;Método TP_DIRPYRDENOISE_METHOD11;Calidad TP_DIRPYRDENOISE_METHOD11_TOOLTIP;La Calidad puede ser adaptada a un patrón de ruido. Al seleccionar "Alto" se incrementa el efecto de reducción de ruido a costa de prolongar el tiempo de procesamiento. @@ -1818,7 +1816,6 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 6a640949b..8399eb268 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -1457,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1472,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index c189abd09..6dadfaf06 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1316,7 +1316,6 @@ TP_DIRPYRDENOISE_CUR;Courbe TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Augmente (multiplie) la valeur de tousles curseurs de chrominance.\nCette courbe vous permet d'ajuster la force de la réduction de bruit chromatique en fonction de la chromaticité, par exemple pour augmenter l'action dans les zones peu saturées et pour la réduire dans ceux celles très saturées. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Module l'action du débruitage de 'Luminance' -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. TP_DIRPYRDENOISE_ENH;Mode amélioré TP_DIRPYRDENOISE_ENH_TOOLTIP;Augmente la qualité du débruitage, mais augmente le temps de traitement d'environ 20% TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1331,13 +1330,11 @@ TP_DIRPYRDENOISE_LPLABM;L* pondéré (faiblement) + a*b* (normal) TP_DIRPYRDENOISE_LTYPE;Contrôle de luminance TP_DIRPYRDENOISE_LUMA;Luminance TP_DIRPYRDENOISE_LUMAFR;Luminance -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Ondelettes pour la luminance et transformé de Fourier pour les détails de luminance TP_DIRPYRDENOISE_MAN;Manuel TP_DIRPYRDENOISE_MANU;Manuel TP_DIRPYRDENOISE_MED;Filtre Médian TP_DIRPYRDENOISE_MEDMETHOD;Méthode TP_DIRPYRDENOISE_MEDTYPE;Type de médiane -TP_DIRPYRDENOISE_MED_TOOLTIP;Active le débruitage médian TP_DIRPYRDENOISE_METHOD;Méthode TP_DIRPYRDENOISE_METHOD11;Qualité TP_DIRPYRDENOISE_METHOD11_TOOLTIP;La qualité peut être adapté à la trame du bruit. Régler sur "haut" augmentera l'effet de la réduction de bruit au prix d'un temps de traitement plus long. diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index e25776b49..5adbda9f6 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -1456,7 +1456,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1471,13 +1470,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index 9f9a3a32b..a8a387782 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -1457,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1472,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index 45a52454d..f6241e8dd 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1029,7 +1029,6 @@ TP_DEFRINGE_RADIUS;Raggio TP_DEFRINGE_THRESHOLD;Soglia TP_DIRPYRDENOISE_BLUE;Crominanza - Blu-Giallo TP_DIRPYRDENOISE_CHROMA;Crominanza (Principale) -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Utilizzabile su immagini raw e non raw.\n\nPer immagini non raw, la riduzione rumore di luminanza dipende dal gamma del profilo colore di ingresso. Si presume un gamma sRGB, quindi se l'immagine di ingresso ha un profilo colore di un gamma diverso, la riduzione rumore di luminanza cambierà. TP_DIRPYRDENOISE_ENH;Modalità Migliorata TP_DIRPYRDENOISE_ENH_TOOLTIP;Aumenta la qualità della riduzione rumore al costo di un incremento del 20% del tempo di elaborazione. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1727,13 +1726,11 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" 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. diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 15c1afe2a..b13b2bd81 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1344,7 +1344,6 @@ TP_DIRPYRDENOISE_CUR;カーブ TP_DIRPYRDENOISE_CURVEEDITOR_CC;色度 TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;色度のスライダーの値を全て増やします(乗数)\nこれは色度に応じて色ノイズの低減効果の強弱を調節するカーブです。例えば、色度の低い部分で低減効果を高めるとか、色度の高い部分で低減効果を緩める、という具合です。 TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;‘輝度’の位置でノイズ低減の強さを加減します -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;rawと非raw画像に使用することができます\n\n非raw画像の場合、輝度ノイズ低減は、入力カラープロファイルのガンマを使って行います。その際sRGBのガンマが想定されていますので、入力画像が異なるガンマのカラープロファイルであれば、輝度ノイズ低減の結果も異なります。 TP_DIRPYRDENOISE_ENH;強化モード TP_DIRPYRDENOISE_ENH_TOOLTIP;ノイズ低減の効果を髙めますが、代わりに演算時間が約20%増えます。 TP_DIRPYRDENOISE_GAMMA;ガンマ @@ -1359,13 +1358,11 @@ TP_DIRPYRDENOISE_LPLABM;加重平均 L* (少なめ) + a*b* (普通) TP_DIRPYRDENOISE_LTYPE;輝度ノイズの調整法 TP_DIRPYRDENOISE_LUMA;輝度 TP_DIRPYRDENOISE_LUMAFR;輝度ノイズ -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;輝度の低減で、全体的にはウェーブレット変換、ディテールにはフーリエ変換を使います TP_DIRPYRDENOISE_MAN;手動 TP_DIRPYRDENOISE_MANU;手動 TP_DIRPYRDENOISE_MED;メディアンフィルター TP_DIRPYRDENOISE_MEDMETHOD;方式 TP_DIRPYRDENOISE_MEDTYPE;フィルターの種類 -TP_DIRPYRDENOISE_MED_TOOLTIP;メディアンフィルターによるノイズ低減を有効にします TP_DIRPYRDENOISE_METHOD;方式 TP_DIRPYRDENOISE_METHOD11;ノイズ低減の質 TP_DIRPYRDENOISE_METHOD11_TOOLTIP;ノイズの状態に応じて低減効果の質を選べます:1-標準 2-高い\n2の方がノイズ低減効果は高くなりますが、その分処理時間が増えます。 diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index 42a6c48bb..c756e6741 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -1457,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1472,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index a24849353..7d6f6be3a 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1602,7 +1602,6 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Gamma varies noise reduction strength across the range of tones. Smaller values will target shadows, while larger values will stretch the effect to the brighter tones. @@ -1614,13 +1613,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 6d2f83e91..bf47b01ad 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -1375,7 +1375,6 @@ TP_DIRPYRDENOISE_CUR;Curve TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Vergroot (vermenigvuldigt) de waarde van alle chrominantie schuifbalken.\nMet deze curve kun je de sterkte aanpassen van de chromatische ruisonderdrukking. Bijvoorbeeld door de werking te vergroten in gebieden met lage verzadiging en te verminderen in gebieden met hoge verzadiging. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Luminantie ruisonderdrukking. Werkt niet lineair maar modulerend -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Kan worden gebruikt op raw en niet-raw afbeeldingen.\n\nVoor niet-raw afbeeldingen geldt dat ruisonderdrukking van de luminantie afhangt van het gamma van het invoerprofiel. Standaard wordt uitgegaan van het gamma van sRGB. Als de afbeelding dus een kleurprofiel heeft met een afwijkend gamma, zal de luminantie ruisonderdrukking verschillen. TP_DIRPYRDENOISE_ENH;Verbeteren TP_DIRPYRDENOISE_ENH_TOOLTIP;Verbetert de ruisonderdrukking, maar vergroot de verwerkingstijd met ongeveer 20% TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1390,13 +1389,11 @@ TP_DIRPYRDENOISE_LPLABM;Gewogen L* (weinig) + a*b* (normaal) TP_DIRPYRDENOISE_LTYPE;Type gereedschap TP_DIRPYRDENOISE_LUMA;Luminantie TP_DIRPYRDENOISE_LUMAFR;Luminantie -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet voor Luminantie- en Fourier transformatie voor betere details bij luminantie TP_DIRPYRDENOISE_MAN;Handmatig TP_DIRPYRDENOISE_MANU;Handmatig TP_DIRPYRDENOISE_MED;Mediaan filter TP_DIRPYRDENOISE_MEDMETHOD;Methode TP_DIRPYRDENOISE_MEDTYPE;Type -TP_DIRPYRDENOISE_MED_TOOLTIP;Mediaan ruisonderdrukking TP_DIRPYRDENOISE_METHOD;Methode TP_DIRPYRDENOISE_METHOD11;Kwaliteit TP_DIRPYRDENOISE_METHOD11_TOOLTIP;De kwaliteit kan worden aangepast aan de hoeveelheid ruis. \nHoog verbetert de ruisonderdrukking, maar verlengt de verwerkingstijd diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 2854053ae..166edeff1 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -1456,7 +1456,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1471,13 +1470,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 43ccb1225..e0bad2dff 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1120,7 +1120,6 @@ TP_DEFRINGE_THRESHOLD;Próg TP_DIRPYRDENOISE_BLUE;Chrominancja - Błękit-żółć TP_DIRPYRDENOISE_CHROMA;Chrominancja - Główna TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduluje działanie usuwania szumów luminancji -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Działa z obrazami typu raw i nie-raw.\n\nDla obrazów typu raw, działanie redukcji szumów luminancji zależy od gammy wejściowego profilu ICC. Z góry założona jest gamma sRGB, zatem jeśli obraz wejściowy ma profil o innej gammie można się spodziewać zmian w działaniu rekucji szumów luminancji. TP_DIRPYRDENOISE_ENH;Tryb ulepszony TP_DIRPYRDENOISE_ENH_TOOLTIP;Ulepsza jakość usuwania szumów kosztem około 20% wzrostu czasu przetwarzania. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1134,7 +1133,6 @@ TP_DIRPYRDENOISE_LUMA;Luminacja TP_DIRPYRDENOISE_MED;Filtr Mediana TP_DIRPYRDENOISE_MEDMETHOD;Metoda mediana TP_DIRPYRDENOISE_MEDTYPE;Rodzaj mediana -TP_DIRPYRDENOISE_MED_TOOLTIP;Włącz odszumianie metodą mediana. TP_DIRPYRDENOISE_METHOD;Metoda TP_DIRPYRDENOISE_METHOD11;Jakość TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Jakość może zostać dopasowana do wzoru szumów. Ustawienie "wysoka" ulepsza odszumianie około 20% wzrostu czasu przetwarzania. @@ -1766,7 +1764,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index fc68c15cf..a3675ab7b 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1120,7 +1120,6 @@ TP_DEFRINGE_THRESHOLD;Prog TP_DIRPYRDENOISE_BLUE;Chrominancja - Blekit-zolc TP_DIRPYRDENOISE_CHROMA;Chrominancja - Glowna TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduluje dzialanie usuwania szumow luminancji -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Dziala z obrazami typu raw i nie-raw.\n\nDla obrazow typu raw, dzialanie redukcji szumow luminancji zalezy od gammy wejsciowego profilu ICC. Z gory zalozona jest gamma sRGB, zatem jesli obraz wejsciowy ma profil o innej gammie mozna sie spodziewac zmian w dzialaniu rekucji szumow luminancji. TP_DIRPYRDENOISE_ENH;Tryb ulepszony TP_DIRPYRDENOISE_ENH_TOOLTIP;Ulepsza jakosc usuwania szumow kosztem okolo 20% wzrostu czasu przetwarzania. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1134,7 +1133,6 @@ TP_DIRPYRDENOISE_LUMA;Luminacja TP_DIRPYRDENOISE_MED;Filtr Mediana TP_DIRPYRDENOISE_MEDMETHOD;Metoda mediana TP_DIRPYRDENOISE_MEDTYPE;Rodzaj mediana -TP_DIRPYRDENOISE_MED_TOOLTIP;Wlacz odszumianie metoda mediana. TP_DIRPYRDENOISE_METHOD;Metoda TP_DIRPYRDENOISE_METHOD11;Jakosc TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Jakosc moze zostac dopasowana do wzoru szumow. Ustawienie "wysoka" ulepsza odszumianie okolo 20% wzrostu czasu przetwarzania. @@ -1766,7 +1764,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index 57e7bd26f..d7a4af77d 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -1457,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1472,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 56e7ab0ce..c42c45e44 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -973,7 +973,6 @@ TP_DEFRINGE_RADIUS;Радиус TP_DEFRINGE_THRESHOLD;Порог TP_DIRPYRDENOISE_BLUE;Цветность: синий-жёлтый TP_DIRPYRDENOISE_CHROMA;Цветность -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Может использоваться как для raw, так и для обычных изображений.\n\nДля не-raw файлов подавление яркостного шума зависит от гаммы входящего цветового профиля, причём подразумевается гамма sRGB. Поэтому, если снимок имеет цветовой профиль с иной гаммой, результаты операции могут варьировать. TP_DIRPYRDENOISE_ENH;Улучшенный режим TP_DIRPYRDENOISE_ENH_TOOLTIP;Улучшает качество шумоподавления путём увеличения времени обработки на 20%. TP_DIRPYRDENOISE_GAMMA;Гамма @@ -1721,13 +1720,11 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" 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. diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 5ef963d62..4540da0b3 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1080,7 +1080,6 @@ TP_DEFRINGE_THRESHOLD;Праг TP_DETAIL_AMOUNT;Количина TP_DIRPYRDENOISE_BLUE;Хроминанса: Плава-Жута TP_DIRPYRDENOISE_CHROMA;Боја -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Може се употребити за raw или не-raw слике.\n\nЗа слике које нису у raw формату уклањање шума луминансе зависи од гаме улазног профила боја. Подразумева се употреба sRGB профила, па ће ефекат уклањања шума луминансе бити различит уколико се користи профил боја са другом вредношћу гаме. TP_DIRPYRDENOISE_ENH;Побољшани режим TP_DIRPYRDENOISE_ENH_TOOLTIP;Повећава квалитет уклањања шума на уштрб око 20% времена за обраду. TP_DIRPYRDENOISE_GAMMA;Гама @@ -1854,13 +1853,11 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" 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. diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index e831a85a5..e469a3cd7 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1080,7 +1080,6 @@ TP_DEFRINGE_THRESHOLD;Prag TP_DETAIL_AMOUNT;Količina TP_DIRPYRDENOISE_BLUE;Hrominansa: Plava-Žuta TP_DIRPYRDENOISE_CHROMA;Boja -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Može se upotrebiti za raw ili ne-raw slike.\n\nZa slike koje nisu u raw formatu uklanjanje šuma luminanse zavisi od game ulaznog profila boja. Podrazumeva se upotreba sRGB profila, pa će efekat uklanjanja šuma luminanse biti različit ukoliko se koristi profil boja sa drugom vrednošću game. TP_DIRPYRDENOISE_ENH;Poboljšani režim TP_DIRPYRDENOISE_ENH_TOOLTIP;Povećava kvalitet uklanjanja šuma na uštrb oko 20% vremena za obradu. TP_DIRPYRDENOISE_GAMMA;Gama @@ -1854,13 +1853,11 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" 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. diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 0075a1814..98b726e42 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -1495,7 +1495,6 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Gamma varies noise reduction strength across the range of tones. Smaller values will target shadows, while larger values will stretch the effect to the brighter tones. @@ -1507,13 +1506,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 43088a7ef..6f5d0ed27 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -1457,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1472,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 0f62e099a..5b7f64af3 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1248,7 +1248,6 @@ TP_DIRPYRDENOISE_CHROMA;Kroma TP_DIRPYRDENOISE_CHROMAFR;Krominans TP_DIRPYRDENOISE_CUR;Kurva TP_DIRPYRDENOISE_CURVEEDITOR_CC;Kroma -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Kan användas på rå- och icke-råbilder.\n\nFör icke-råbilder beror brusreduceringen (~luminans) på in-profilens gamma. Gamma hos sRGB antas, och således: om bildens profil har ett annat gammavärde, så kommer brusreduceringen att variera. TP_DIRPYRDENOISE_ENH;Förbättrat läge TP_DIRPYRDENOISE_ENH_TOOLTIP;Ökar kvaliteten på brusreduceringen till priset av 20 % längre beräkningstid TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1847,11 +1846,9 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" 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 window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index 4ef016622..efb0a6d9f 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -1456,7 +1456,6 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!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. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1471,13 +1470,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtdata/languages/default b/rtdata/languages/default index 605c2ea63..df9aaec7c 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1380,7 +1380,6 @@ TP_DIRPYRDENOISE_CUR;Curve TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -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. TP_DIRPYRDENOISE_ENH;Enhanced mode TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1395,13 +1394,11 @@ TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) TP_DIRPYRDENOISE_LTYPE;Luminance control TP_DIRPYRDENOISE_LUMA;Luminance TP_DIRPYRDENOISE_LUMAFR;Luminance -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail TP_DIRPYRDENOISE_MAN;Manual TP_DIRPYRDENOISE_MANU;Manual TP_DIRPYRDENOISE_MED;Median Filter TP_DIRPYRDENOISE_MEDMETHOD;Median method TP_DIRPYRDENOISE_MEDTYPE;Median type -TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising TP_DIRPYRDENOISE_METHOD;Method TP_DIRPYRDENOISE_METHOD11;Quality TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index ee747269a..f4ad271b3 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -36,12 +36,9 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP nextred = 0.; nextblue = 0.; - setEnabledTooltipMarkup(M("TP_DIRPYRDENOISE_ENABLED_TOOLTIP")); - std::vector defaultCurve; Gtk::Frame* lumaFrame = Gtk::manage (new Gtk::Frame (M("TP_DIRPYRDENOISE_LUMAFR")) ); - lumaFrame->set_tooltip_text(M("TP_DIRPYRDENOISE_LUMAFR_TOOLTIP")); lumaFrame->set_border_width(0); lumaFrame->set_label_align(0.025, 0.5); @@ -200,7 +197,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP median = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_MED") + ":")); median->set_active (true); - median->set_tooltip_text (M("TP_DIRPYRDENOISE_MED_TOOLTIP")); medianFrame->set_label_widget(*median); From 8cad2f8863de38c7d7d89249cbd1b180ff520c18 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 21 Oct 2016 00:41:27 +0200 Subject: [PATCH 069/115] CbDL badly interacts with Graduated and Vignetting Filter if CbDL is set to 'before Black-and-White', fixes #3473 --- rtengine/dcrop.cc | 6 +++--- rtengine/improccoordinator.cc | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 1b1d460f3..9f5b071ea 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -678,7 +678,7 @@ void Crop::update (int todo) createBuffer(cropw, croph); // transform - if (needstransform) { + if (needstransform || ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) { if (!transCrop) { transCrop = new Imagefloat (cropw, croph); } @@ -687,6 +687,8 @@ void Crop::update (int todo) parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, SKIPS(parent->fw, skip), SKIPS(parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), parent->imgsrc->getMetaData()->getFocusDist(), parent->imgsrc->getRotateDegree(), false); + else + baseCrop->copyData(transCrop); if (transCrop) { baseCrop = transCrop; @@ -1107,8 +1109,6 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte ProcParams& params = parent->params; parent->ipf.transCoord (parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh); - int tr = getCoarseBitMask(params.coarse); - PreviewProps cp (orx, ory, orw, orh, skip); int orW, orH; parent->imgsrc->getSize (cp, orW, orH); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index b3f5afee8..5a17ef1f5 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -372,19 +372,21 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Remove transformation if unneeded bool needstransform = ipf.needsTransform(); - if (!needstransform && orig_prev != oprevi) { + if (!needstransform && !((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { delete oprevi; oprevi = orig_prev; } - if (needstransform && orig_prev == oprevi) { - oprevi = new Imagefloat (pW, pH); + if ((needstransform || ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { + if(!oprevi || oprevi == orig_prev) + oprevi = new Imagefloat (pW, pH); + if ((todo & M_TRANSFORM) && needstransform) + ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), + imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), false); + else + orig_prev->copyData(oprevi); } - if ((todo & M_TRANSFORM) && needstransform) - ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), - imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), false); - if ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = oprevi->getWidth(); const int H = oprevi->getHeight(); From 17ea8b162c4975f3f1b40d6e7fa6f54d48c031d2 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 21 Oct 2016 02:09:14 +0200 Subject: [PATCH 070/115] Removed printf relicts from softproofing branch --- rtengine/iplab2rgb.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 4e23c6400..6b04bb8f2 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -293,16 +293,16 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int printf("iccStore->createGammaProfile(icm, *ga);\n"); } else { oprof = iccStore->getProfile (icm.output); - printf("iccStore->getProfile (%s);\n", icm.output.c_str()); +// printf("iccStore->getProfile (%s);\n", icm.output.c_str()); } if (oprof) { cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; if (icm.outputBPC) { flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; - printf("lab2rgb16 / icm.outputBPC=true / outputIntent=%d\n", icm.outputIntent); +// printf("lab2rgb16 / icm.outputBPC=true / outputIntent=%d\n", icm.outputIntent); } - else printf("lab2rgb16 / icm.outputBPC=false / outputIntent=%d\n", icm.outputIntent); +// else printf("lab2rgb16 / icm.outputBPC=false / outputIntent=%d\n", icm.outputIntent); lcmsMutex->lock (); cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, oprof, TYPE_RGB_16, icm.outputIntent, flags); From 968f2b06ca362f90210e1babddae0c4d5f1e06c6 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 21 Oct 2016 12:09:47 +0200 Subject: [PATCH 071/115] Segfault on EAHD, fixes #3474, kudos to Floessie --- rtengine/rawimagesource_i.h | 48 ++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/rtengine/rawimagesource_i.h b/rtengine/rawimagesource_i.h index 4e953becb..1cd25d6fc 100644 --- a/rtengine/rawimagesource_i.h +++ b/rtengine/rawimagesource_i.h @@ -140,7 +140,21 @@ inline void RawImageSource::interpolate_row_g (float* agh, float* agv, int i) inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, float* cg, float* ng, int i) { - if ((ri->ISRED(i, 0) || ri->ISRED(i, 1)) && pg && ng) { + const auto getPg = [pg](int index) { + return + pg + ? pg[index] + : 0.f; + }; + + const auto getNg = [ng](int index) { + return + ng + ? ng[index] + : 0.f; + }; + + if ((ri->ISRED(i, 0) || ri->ISRED(i, 1))) { // RGRGR or GRGRGR line for (int j = 0; j < W; j++) { if (ri->ISRED(i, j)) { @@ -151,28 +165,28 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int n = 0; if (i > 0 && j > 0) { - b += rawData[i - 1][j - 1] - pg[j - 1]; + b += rawData[i - 1][j - 1] - getPg(j - 1); n++; } if (i > 0 && j < W - 1) { - b += rawData[i - 1][j + 1] - pg[j + 1]; + b += rawData[i - 1][j + 1] - getPg(j + 1); n++; } if (i < H - 1 && j > 0) { - b += rawData[i + 1][j - 1] - ng[j - 1]; + b += rawData[i + 1][j - 1] - getNg(j - 1); n++; } if (i < H - 1 && j < W - 1) { - b += rawData[i + 1][j + 1] - ng[j + 1]; + b += rawData[i + 1][j + 1] - getNg(j + 1); n++; } b = cg[j] + b / n; ab[j] = b; - } else if(ng && pg) { + } else { // linear R-G interp. horizontally int r; @@ -189,17 +203,17 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int b; if (i == 0) { - b = ng[j] + rawData[1][j] - cg[j]; + b = getNg(j) + rawData[1][j] - cg[j]; } else if (i == H - 1) { - b = pg[j] + rawData[H - 2][j] - cg[j]; + b = getPg(j) + rawData[H - 2][j] - cg[j]; } else { - b = cg[j] + (rawData[i - 1][j] - pg[j] + rawData[i + 1][j] - ng[j]) / 2; + b = cg[j] + (rawData[i - 1][j] - getPg(j) + rawData[i + 1][j] - getNg(j)) / 2; } ab[j] = b; } } - } else if(ng && pg) { + } else { // BGBGB or GBGBGB line for (int j = 0; j < W; j++) { if (ri->ISBLUE(i, j)) { @@ -210,22 +224,22 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int n = 0; if (i > 0 && j > 0) { - r += rawData[i - 1][j - 1] - pg[j - 1]; + r += rawData[i - 1][j - 1] - getPg(j - 1); n++; } if (i > 0 && j < W - 1) { - r += rawData[i - 1][j + 1] - pg[j + 1]; + r += rawData[i - 1][j + 1] - getPg(j + 1); n++; } if (i < H - 1 && j > 0) { - r += rawData[i + 1][j - 1] - ng[j - 1]; + r += rawData[i + 1][j - 1] - getNg(j - 1); n++; } if (i < H - 1 && j < W - 1) { - r += rawData[i + 1][j + 1] - ng[j + 1]; + r += rawData[i + 1][j + 1] - getNg(j + 1); n++; } @@ -249,11 +263,11 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int r; if (i == 0) { - r = ng[j] + rawData[1][j] - cg[j]; + r = getNg(j) + rawData[1][j] - cg[j]; } else if (i == H - 1) { - r = pg[j] + rawData[H - 2][j] - cg[j]; + r = getPg(j) + rawData[H - 2][j] - cg[j]; } else { - r = cg[j] + (rawData[i - 1][j] - pg[j] + rawData[i + 1][j] - ng[j]) / 2; + r = cg[j] + (rawData[i - 1][j] - getPg(j) + rawData[i + 1][j] - getNg(j)) / 2; } ar[j] = r; From 09b319fe0b15a57263a4c5c1f81332add5072494 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 22 Oct 2016 00:21:01 +0200 Subject: [PATCH 072/115] Speedup for Vignette and Graduated Filter --- rtengine/iptransform.cc | 141 ++++++++++++++++++++++++++++------------ 1 file changed, 101 insertions(+), 40 deletions(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index d22fe08f2..92cbcbccb 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -24,8 +24,68 @@ #include "mytime.h" #include "rt_math.h" #include "sleef.c" +#define BENCHMARK +#include "StopWatch.h" using namespace std; +namespace +{ + +float pow3(float x) +{ + return x * x * x; +} + +float pow4(float x) +{ + return (x * x) * (x * x); +} + +float pown(float x, int n) +{ + + switch (n) { + case 0: + return 1; + + case 2: + return x * x; + + case 4: + return pow4(x); + + case 6: + return (x * x) * pow4(x); + + case 8: + return pow4(x) * pow4(x); + + default: + return pow_F(x, n); + } +} + +float normn(float a, float b, int n) +{ + switch (n) { + case 2: + return sqrtf(a * a + b * b); + + case 4: + return sqrtf(sqrtf(pow4(a) + pow4(b))); + + case 6: + return sqrtf(xcbrtf(pow3(a) * pow3(a) + pow3(b) * pow3(b))); + + case 8: + return sqrtf(sqrtf(sqrtf(pow4(a) * pow4(a) + pow4(b) * pow4(b)))); + + default: + return pow_F(pown(a, n) + pown(b, n), 1.f / n); + } +} +} + namespace rtengine { #undef CLIPTOC @@ -382,13 +442,15 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) float val = ((float)(gy - gp.top_edge_0) * gp.ys_inv); if (gp.bright_top) { - val = 1.0 - val; + val = 1.f - val; } - if (gp.scale < 1.0) { - val = pow(xsinf(val * M_PI / 2), 3); + val *= (M_PI / 2); + + if (gp.scale < 1.f) { + val = pow3(xsinf(val)); } else { - val = 1.0 - pow(xcosf(val * M_PI / 2), 3); + val = 1.f - pow3(xcosf(val)); } return gp.scale + val * (1.0 - gp.scale); @@ -396,7 +458,7 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) } else { int gy = gp.transpose ? x : y; int gx = gp.transpose ? gp.h - y - 1 : x; - float top_edge = gp.yc - gp.ys / 2.0 - gp.ta * (gx - gp.xc); + float top_edge = gp.top_edge_0 - gp.ta * (gx - gp.xc); if (gy < top_edge) { return gp.topmul; @@ -405,14 +467,14 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) } else { float val = ((float)(gy - top_edge) * gp.ys_inv); - if (gp.bright_top) { - val = 1.0 - val; - } + val = gp.bright_top ? 1.f - val : val; - if (gp.scale < 1.0) { - val = pow(xsinf(val * M_PI / 2), 3); + val *= (M_PI / 2); + + if (gp.scale < 1.f) { + val = pow3(xsinf(val)); } else { - val = 1.0 - pow(xcosf(val * M_PI / 2), 3); + val = 1.f - pow3(xcosf(val)); } return gp.scale + val * (1.0 - gp.scale); @@ -459,7 +521,7 @@ static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignett pcv.sepmix = 0; pcv.oe_a = sqrt(2.0) * long_side * 0.5; pcv.oe_b = pcv.oe_a * short_side / long_side; - pcv.ie_mul = 1.0 / sqrt(2.0); + pcv.ie_mul = (1.0 / sqrt(2.0)) * (1.0 - pcv.feather); pcv.is_super_ellipse_mode = false; pcv.is_portrait = (pcv.w < pcv.h); @@ -471,10 +533,10 @@ static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignett pcv.sepmix = (sepf - pcv.sep) * 0.5; // 0.0 to 1.0 pcv.oe1_a = powf(2.0, 1.0 / pcv.sep) * long_side * 0.5; pcv.oe1_b = pcv.oe1_a * short_side / long_side; - pcv.ie1_mul = 1.0 / powf(2.0, 1.0 / pcv.sep); + pcv.ie1_mul = (1.0 / powf(2.0, 1.0 / pcv.sep)) * (1.0 - pcv.feather); pcv.oe2_a = powf(2.0, 1.0 / (pcv.sep + 2)) * long_side * 0.5; pcv.oe2_b = pcv.oe2_a * short_side / long_side; - pcv.ie2_mul = 1.0 / powf(2.0, 1.0 / (pcv.sep + 2)); + pcv.ie2_mul = (1.0 / powf(2.0, 1.0 / (pcv.sep + 2))) * (1.0 - pcv.feather); } if (roundness > 0.5) { @@ -496,7 +558,7 @@ static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignett static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) { - float fo = 1.0; + float fo = 1.f; if (x < pcv.x1 || x > pcv.x2 || y < pcv.y1 || y > pcv.y2) { /* @@ -517,22 +579,18 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) fo = sqrtf(dist_x * dist_x + dist_y * dist_y) * pcv.fadeout_mul; - if (fo >= 1.0) { - return 1.0; + if (fo >= 1.f) { + return 1.f; } } - float val, a, b; + float a = fabs((x - pcv.x1) - pcv.w * 0.5f); + float b = fabs((y - pcv.y1) - pcv.h * 0.5f); - if (pcv.is_portrait) { - a = fabs((y - pcv.y1) - pcv.h * 0.5); - b = fabs((x - pcv.x1) - pcv.w * 0.5); - } else { - a = fabs((x - pcv.x1) - pcv.w * 0.5); - b = fabs((y - pcv.y1) - pcv.h * 0.5); + if(pcv.is_portrait) { + std::swap(a, b); } - float angle = xatan2f(b, a); float dist = sqrtf(a * a + b * b); float dist_oe, dist_ie; float2 sincosval; @@ -546,37 +604,39 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) } if (pcv.is_super_ellipse_mode) { - float dist_oe1 = pcv.oe1_a * pcv.oe1_b / pow_F(pow(pcv.oe1_b * sincosval.y, pcv.sep) + pow(pcv.oe1_a * sincosval.x, pcv.sep), 1.0 / pcv.sep); - float dist_oe2 = pcv.oe2_a * pcv.oe2_b / pow_F(pow(pcv.oe2_b * sincosval.y, pcv.sep + 2) + pow(pcv.oe2_a * sincosval.x, pcv.sep + 2), 1.0 / (pcv.sep + 2)); - float dist_ie1 = pcv.ie1_mul * dist_oe1 * (1.0 - pcv.feather); - float dist_ie2 = pcv.ie2_mul * dist_oe2 * (1.0 - pcv.feather); - dist_oe = dist_oe1 * (1.0 - pcv.sepmix) + dist_oe2 * pcv.sepmix; - dist_ie = dist_ie1 * (1.0 - pcv.sepmix) + dist_ie2 * pcv.sepmix; + float dist_oe1 = pcv.oe1_a * pcv.oe1_b / normn(pcv.oe1_b * sincosval.y, pcv.oe1_a * sincosval.x, pcv.sep); + float dist_oe2 = pcv.oe2_a * pcv.oe2_b / normn(pcv.oe2_b * sincosval.y, pcv.oe2_a * sincosval.x, pcv.sep + 2); + float dist_ie1 = pcv.ie1_mul * dist_oe1; + float dist_ie2 = pcv.ie2_mul * dist_oe2; + dist_oe = dist_oe1 * (1.f - pcv.sepmix) + dist_oe2 * pcv.sepmix; + dist_ie = dist_ie1 * (1.f - pcv.sepmix) + dist_ie2 * pcv.sepmix; } else { dist_oe = pcv.oe_a * pcv.oe_b / sqrtf(SQR(pcv.oe_b * sincosval.y) + SQR(pcv.oe_a * sincosval.x)); - dist_ie = pcv.ie_mul * dist_oe * (1.0 - pcv.feather); + dist_ie = pcv.ie_mul * dist_oe; } if (dist <= dist_ie) { - return 1.0; + return 1.f; } + float val; + if (dist >= dist_oe) { val = pcv.scale; } else { - val = (dist - dist_ie) / (dist_oe - dist_ie); + val = (M_PI / 2) * (dist - dist_ie) / (dist_oe - dist_ie); - if (pcv.scale < 1.0) { - val = pow(xcosf(val * M_PI / 2), 4); + if (pcv.scale < 1.f) { + val = pow4(xcosf(val)); } else { - val = 1 - pow(xsinf(val * M_PI / 2), 4); + val = 1 - pow4(xsinf(val)); } - val = pcv.scale + val * (1.0 - pcv.scale); + val = pcv.scale + val * (1.f - pcv.scale); } - if (fo < 1.0) { - val = 1.0 * fo + val * (1.0 - fo); + if (fo < 1.f) { + val = fo + val * (1.f - fo); } return val; @@ -584,6 +644,7 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH) { + BENCHFUN const bool applyVignetting = needsVignetting(); const bool applyGradient = needsGradient(); const bool applyPCVignetting = needsPCVignetting(); From 2c7325b2fd470583a1a664dcb9033b2ab3fab0ba Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 22 Oct 2016 18:11:14 +0200 Subject: [PATCH 073/115] Removed StopWatch --- rtengine/iptransform.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 92cbcbccb..594753526 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -24,8 +24,7 @@ #include "mytime.h" #include "rt_math.h" #include "sleef.c" -#define BENCHMARK -#include "StopWatch.h" + using namespace std; namespace @@ -644,7 +643,7 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH) { - BENCHFUN + const bool applyVignetting = needsVignetting(); const bool applyGradient = needsGradient(); const bool applyPCVignetting = needsPCVignetting(); From fca99676b6a398a1bb6b16be8d9b78a7b8f39c09 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sat, 22 Oct 2016 18:29:53 +0200 Subject: [PATCH 074/115] Fix a bug I introduced some commits ago. Fixes #3476 --- rtengine/dcrop.cc | 2 +- rtengine/improccoordinator.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 9f5b071ea..e308ab13b 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -683,7 +683,7 @@ void Crop::update (int todo) transCrop = new Imagefloat (cropw, croph); } - if ((todo & M_TRANSFORM) && needstransform) + if (needstransform) parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, SKIPS(parent->fw, skip), SKIPS(parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), parent->imgsrc->getMetaData()->getFocusDist(), parent->imgsrc->getRotateDegree(), false); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 5a17ef1f5..ca1d44cbf 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -380,7 +380,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) if ((needstransform || ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { if(!oprevi || oprevi == orig_prev) oprevi = new Imagefloat (pW, pH); - if ((todo & M_TRANSFORM) && needstransform) + if (needstransform) ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), false); else From 22d8869953e294af6aa25f67a844a9bf9fb4d914 Mon Sep 17 00:00:00 2001 From: Hombre Date: Mon, 24 Oct 2016 01:14:35 +0200 Subject: [PATCH 075/115] Hotfix for issue #3480. --- rtgui/crophandler.cc | 10 ++++++++++ rtgui/crophandler.h | 1 + rtgui/cropwindow.cc | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index 961b83c7c..c22b5b529 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -110,6 +110,16 @@ void CropHandler::sizeChanged (int x, int y, int ow, int oh) // the ipc notif */ } +bool CropHandler::isFullDisplay () +{ + int w, h; + getFullImageSize(w, h); + if (!w) { + return false; + } + return cropW == w && cropH == h; +} + double CropHandler::getFitCropZoom () { double z1 = (double) wh / cropParams.h; diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index 1350df27e..3bf7e58da 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -100,6 +100,7 @@ public: float getZoomFactor (); double getFitZoom (); double getFitCropZoom(); + bool isFullDisplay (); void setWSize (int w, int h); void getWSize (int& w, int &h); void getAnchorPosition (int& x, int& y); diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 2bf446842..10b188a21 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -1728,7 +1728,7 @@ void CropWindow::expose (Cairo::RefPtr cr) if (cropHandler.cropParams.enabled) { int cropX, cropY; cropHandler.getPosition (cropX, cropY); - drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom() ); + drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, cropHandler.isFullDisplay ()); } if (observedCropWin) { @@ -1805,7 +1805,7 @@ void CropWindow::expose (Cairo::RefPtr cr) iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), rough, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0); if (cropHandler.cropParams.enabled) { - drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom()); + drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, cropHandler.isFullDisplay ()); } if (observedCropWin) { From 2a2dd2af8b2fb12da1a86dda3d121a6fe3437a8e Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 24 Oct 2016 21:04:13 +0200 Subject: [PATCH 076/115] Small fix to Preferences > Default Theme frame, no issue. --- rtgui/preferences.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 4364894de..820545f6b 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -938,21 +938,20 @@ Gtk::Widget* Preferences::getGeneralPanel () hbtheme->pack_start (*fontbutton); vbftheme->pack_start(*hbtheme, Gtk::PACK_SHRINK, 0); - Gtk::Label* cpfontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT_COLPICKER") + ":") ); + Gtk::Label* cpfontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT_COLPICKER") + ":", Gtk::ALIGN_RIGHT) ); colorPickerFontButton = Gtk::manage( new Gtk::FontButton ()); colorPickerFontButton->set_use_size(true); colorPickerFontButton->set_font_name(options.colorPickerFont); - Gtk::HBox* hbcolorchooser = Gtk::manage( new Gtk::HBox () ); hbcolorchooser->set_spacing(4); hbcolorchooser->pack_start (*cutOverlayLabel, Gtk::PACK_SHRINK, 0); hbcolorchooser->pack_start (*butCropCol, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_start (*butNavGuideCol, Gtk::PACK_SHRINK, 0); hbcolorchooser->pack_start (*navGuideLabel, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*butNavGuideCol, Gtk::PACK_SHRINK, 0); hbcolorchooser->pack_start (*cpfontlab, Gtk::PACK_EXPAND_WIDGET, 0); - hbcolorchooser->pack_start (*colorPickerFontButton, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*colorPickerFontButton, Gtk::PACK_EXPAND_WIDGET, 0); vbftheme->pack_start(*hbcolorchooser, Gtk::PACK_SHRINK, 0); From 3a346d919d172e1d15aa31bf2dccf428c5516d7b Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 27 Oct 2016 13:40:30 +0200 Subject: [PATCH 077/115] hphd demosaic : left quarter is not demosaiced correctly, fixes #3485 --- rtengine/demosaic_algos.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index 0d85db8b8..e641ed777 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -521,10 +521,6 @@ void RawImageSource::hphd_demosaic () plistener->setProgress (0.33); } - for (int i = 0; i < H; i++) { - memset(hpmap[i], 0, W * sizeof(char)); - } - #ifdef _OPENMP #pragma omp parallel { From e35e46e0adcba0ac675e6ead888a39cb03b2d971 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 30 Oct 2016 20:52:13 +0100 Subject: [PATCH 078/115] Fixes Preferences > Color Management layout, #3488 --- rtgui/preferences.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 820545f6b..748531f15 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -721,11 +721,11 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::Table* colt = Gtk::manage (new Gtk::Table (3, 2)); int row = 0; - colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #if !defined(__APPLE__) // monitor profile not supported on apple ++row; - colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #if defined(WIN32) ++row; @@ -733,7 +733,7 @@ Gtk::Widget* Preferences::getColorManagementPanel () #endif #endif ++row; - colt->attach (*milabel, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*milabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); mvbcm->pack_start (*colt, Gtk::PACK_SHRINK, 4); From 99382aa4829ab74cad227bca9fa28b6022f8ea04 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 30 Oct 2016 22:49:13 +0100 Subject: [PATCH 079/115] Fix non SSE build failure reported by Marcin, no Issue --- rtengine/improcfun.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 8e8a333a6..586243391 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2751,13 +2751,14 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Cbuffer[j] = ncie_C_p; hbuffer[j] = ncie->h_p[i][j]; #else + float xx, yy, zz; Ciecam02::jch2xyz_ciecam02float( xx, yy, zz, ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j], xw2, yw2, zw2, f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj); - x = (float)xx * 655.35f; - y = (float)yy * 655.35f; - z = (float)zz * 655.35f; + float x = (float)xx * 655.35f; + float y = (float)yy * 655.35f; + float z = (float)zz * 655.35f; float Ll, aa, bb; //convert xyz=>lab Color::XYZ2Lab(x, y, z, Ll, aa, bb); From 789235188a9ae2641c033ebde18241b9ee93392a Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 31 Oct 2016 09:32:12 +0100 Subject: [PATCH 080/115] camconst.json updated by iliasg, #3298 --- rtengine/camconst.json | 50 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index e8cba2ff5..80d8189c9 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1410,7 +1410,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know }, { // Quality b, crop correction - "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10 Mark II", "OLYMPUS E-M10MarkII" ], + "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10MarkII" ], "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], "raw_crop": [ 0, 0, 4624, 3472 ], // largest valid - full frame is 4640x3472 // "raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 @@ -1716,6 +1716,19 @@ Quality X: unknown, ie we knowing to little about the camera properties to know ] } }, + { // Quality C, Color matrix guessed, Intemediate ISOs missing + "make_model": [ "Panasonic DMC-LX10", "Panasonic DMC-LX15" ], + "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], //copy from TZ100 dcp_v8.6 d65 + "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. + "ranges": { + "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset. + "white": [ + { "iso": 80, "levels": 2800 }, // gaussian 2800-3000 exif_linearitylimit 2626 + { "iso": 100, "levels": 3500 }, // gaussian 3500-3700 exif_linearitylimit 3277 + { "iso": [ 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4060 } // nominal 4095 + ] + } + }, { // Quality B, per ISO info missing "make_model": "PENTAX K-x", @@ -1723,6 +1736,24 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4080 } // nominal at ISO200 4094 }, + { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid + "make_model": [ "RICOH PENTAX K-70", "PENTAX K-70" ], + "dcraw_matrix": [ 8050,-2061,-1264,-4359,12953,1515,-1096,1965,6075 ], // PENTAX DNG D65 + "raw_crop": [ 58, 28, 6022, 4024 ], // full frame 6080x4064, cropped to official DNG raw_crop 28,58,6080,4052, official jpeg crop 6000x4000 + "ranges": { + "white": [ + { "iso": 100, "levels": 16300 }, // 16319-16377 + { "iso": 200, "levels": 16250 }, // 16319-16315 + { "iso": 400, "levels": 16200 }, // 16255-16251 + { "iso": 800, "levels": 16050 }, // 16255-16120 + { "iso": 1600, "levels": 15750 }, // 15860 + { "iso": [ 3200, 6400 ], "levels": 16200 }, // 16350 + { "iso": [ 12800, 25600 ], "levels": 16100 }, // 16300 + { "iso": [ 51200, 102400 ], "levels": 16000 } // 16200 + ] + } + }, + { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX K-3", "PENTAX K-3" ], "dcraw_matrix": [ 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 ], // adobe dcp d65 @@ -1737,7 +1768,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 ] - } + } }, { // Quality B, intermediate ISOs info missing @@ -1919,7 +1950,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 512, "white": 16300 } }, { // Quality A, - "make_model": [ "Sony DSC-RX100M3", "Sony DSC-RX100M4" ], + "make_model": [ "Sony DSC-RX100M3", "Sony DSC-RX100M4", "Sony DSC-RX100M5" ], "dcraw_matrix": [ 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 ], // DNG_v9.1.1 D65 "ranges": { "black": 800, "white": 16300 } }, @@ -1929,6 +1960,19 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 800, "white": 16300 } }, + { // Quality C, No proper color data, beta samples, frame set to official jpeg, WL corrections need adobe_coeff setting in dcraw.cc to become active + "make_model": "XIAOYI M1", + "dcraw_matrix": [ 7158,-1911,-606,-3603,10669,2530,-659,1236,5530 ], // XIAO YI DNG D65 + "raw_crop": [ 4, 3, 5192, 3896 ], // full raw 5200x3902, official jpeg 5184X3888 + "ranges": { + "white": [ + { "iso": 100, "levels": 4080 }, // typical 4092-4094 + { "iso": [ 200, 400, 800, 1600, 3200, 6400 ], "levels": 4080 }, // 4092-4095 + { "iso": [ 12800, 25600, 51200 ], "levels": 4080 } // 4090-4095 + ] + } + }, + /* Phase One: color matrices borrowed from Adobe DNG Converter, black/white levels tested on actual raw files. Note: the dcraw decoder makes black level subtraction and various corrections to the raw values based on metadata embedded in the IIQ format, so what we see here is the result after that, ie black level is 0, From d2526e0f942848ac8f91b3d0f2e8d3d31ab3f78d Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Mon, 31 Oct 2016 12:04:34 +0100 Subject: [PATCH 081/115] Formatting, spelling, grammar and structural changes to camconst.json --- rtengine/camconst.json | 2179 ++++++++++++++++++++-------------------- 1 file changed, 1078 insertions(+), 1101 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 80d8189c9..cbef6d132 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1,105 +1,96 @@ /* - DO NOT EDIT THIS FILE! +DO NOT EDIT THIS FILE! - All changes made here will be lost on software update. - If you want to add custom values or changes existing ones, - create a "camconst.json" file next to your personal "options" file. - Its values will then override and/or complete the ones of this file. +All changes made here will be lost on software update. If you want to add custom values or change existing ones, create +a "camconst.json" file next to your personal "options" file. Its values will then override and/or complete the ones of +this file. - If you add values for your own camera and are okay to share them with - RawTherapee's community, please drop a link on the user's forum +If you add values for your own camera, consider sharing them with the community for everyone's benefit. You can do so +via our forum or GitHub page: +- https://discuss.pixls.us/c/software/rawtherapee +- https://github.com/Beep6581/RawTherapee/issues - IMPORTANT: - ---------- +Value priority: +1. If you set the dcraw matrix in your user camconst.json file for a camera entry which already exists in RT's file + (same camera, same model), your values will replace RT's ones. +2. If you set the black level values in your user camconst.json file for a camera entry which already exists in RT's + file, your values will replace RT's ones, even if RT's ones are more complete and/or detailed. You might want to + copy/paste RT's levels first (if provided) to your user's file and complete/modify them. +3. Same for the white levels, independent of the black levels. - 1. If you set the dcraw matrix in your user file for an already existing entry - in RT's file (same camera, same model), your values will replace RT's ones. - 2. If you set the Black level(s) values in your user file for an already existing - entry in RT's file, your values will replace RT's ones, even if RT's ones are - more complete and/or detailed. You might want to copy/paste RT's levels first - (if provided) to your user's file and complete/modify it. +This file is in JSON format and contains camera constants which RawTherapee uses when parsing raw files. - Same for the White level(s), independently from the Black level(s). +Raw files themselves unfortunately do not contain all information needed for making a raw conversion. Typically color +response information and black/white levels are missing. That's why this file is needed. +This file is read once during startup, so if the file is updated you need to restart RawTherapee in order for changes to +take effect. The file is not intended for modification by the casual user, but advanced users can add missing camera +information to this file. If you do so, please report using the links above so that we can incorporate your changes for +everyone's benefit. ----------------------------------------------------------------------------------- +RawTherapee uses dcraw as the raw format parser. dcraw contains hard-coded camera constants, but not for all cameras, +and the values are not always accurate. For example dcraw only supports one white level, while some cameras have +different white levels per channel and per ISO. If a camera is not listed in this file the constants from dcraw will be +used. If listed here this information will override the constants in dcraw (if any). - -This file is in JSON format and contains camera constants which RawTherapee uses -when parsing raw files. - -Raw files themselves unfortunately do not contain all information needed for making -a raw conversion, typically color response information and black/white levels are -missing. That's why this file is needed. - -It's read once during startup, so if the file is updated you need to restart -RawTherapee in order to take effect. The file is not intended for modification by -the casual user, but advanced users can add missing camera information to this file. -If you do so please report at https://github.com/Beep6581/RawTherapee/issues so we can -extend the distributed version of this file so your provided camera information -becomes available to all. - -RawTherapee uses DCRAW as the raw format parser. DCRAW contains hard-coded camera -constants, but not for all cameras and not always accurate information. For example -DCRAW only support one white level, while some cameras have different white levels -per channel and per ISO. If a camera is not listed in this file the constants from -DCRAW will be used, if listed here this information will override any constants in -DCRAW (if any). - -Some cameras may only have partial information here, for example if the raw file -itself contains a color matrix it's not entered here. A camera whose black level -is measured on special pixels in the raw file should only have white levels here -etc. +Partial information is supported. For example if the raw file itself contains a color matrix then there is no need to +enter it here. A camera whose black level is measured on special pixels in the raw file should only have white levels +here. And so forth. Examples: { - // make and model separated with single space, must match make - // and model as provided by dcraw (case-insensitive). + // Make and model separated with single space, must match make and model as provided by dcraw (case-insensitive): "make_model": "ManufacturerA ModelB", - Some Panasonics and some Canon Dslrs (of the low category like Canon 550D) exist - under alternate naming in various marketplaces (EOS 550D, EOS Rebel T2i, EOS Kiss X4). - For new models that are still not supported by the Dcraw version used in current RT, - we have to fill all the alternate names or else RT will not recognize the alternate model names - For models supported by Dcraw, filling the alternate names is simply desired (for better user info). - The format of multiple naming is to write all names in brackets i.e - instead of .. "make_model": "Canon EOS 550D", - type .. "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], - // ColorMatrix with D65 Calibration Illuminant, in dcraw format + // Some Panasonic and Canon DSLRs (of the lower category, such as Canon 550D) exist/ under alternate naming in + // various marketplaces (EOS 550D, EOS Rebel T2i, EOS Kiss X4). + // For new models that are still not supported by the dcraw version used in current RT, we have to fill all the + // alternate names or else RT will not recognize the alternate model names. + // For models supported by dcraw, filling the alternate names is simply desired (for better user info). + // The format of multiple naming is to write all names in brackets i.e instead of + // "make_model": "Canon EOS 550D", + // type + // "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], + + // ColorMatrix with CIE Standard Illuminant D65, in dcraw format: "dcraw_matrix": [ 7530, -1942, -255, -4318, 11390, 3362, -926, 1694, 7649 ], - // black level (or black offset if a base black is already extracted from exif by Dcraw, see Panasonic, resent Nikon ) - // For some rare cases where Dcraw detects wrong Black Level we need to correct it with absolute black i.e one that is not added up - // the detected. For this job we have to define "black" as 65535+desired_black. For example to correct a wrongly detected black level - of 9 instead of the correct 600 we define "black": 66135 i.e. 65535+600. - // and white level same for all colors at all ISOs + + // Black level (or black offset if a base black is already extracted from Exif by dcraw, see Panasonic, + // recent Nikon). For some rare cases where dcraw detects wrong black level we need to correct it with + // absolute black i.e one that is not added up the detected. For this job we have to define "black" as + // 65535+desired_black. For example to correct a wrongly detected black level of 9 instead of the correct + // 600 we define "black": 66135, i.e. 65535+600, and white level same for all colors at all ISOs. "ranges": { "black": 10, "white": 1000 }, - // crop away masked sensor borders, 10 pixels left, 20 pixels top, resulting image width/height 4000x3000 - // instead of width/height you can write a negative number which specifies how much of right/bottom border - that should be removed but keep in mind that sometimes after converting to DNG the borders are already - cropped so the "negative number" way is not totally safe. - "raw_crop": [ 10, 20, 4000, 3000 ], - // Almost same as MaskedAreas DNG tag, used for black level measuring. Here up to two areas can be defined - by tetrads of numbers - "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], // two tetrads define two areas - The difference vs "raw_crop" is the meaning of the numbers which here are expressing the absolute distance (in pixels) - of each side of each rectangular "masked area" from the top and left side of the sensor - - the first number is the distance of the top edge from the sensor's top - - the second is the distance of the left side from the sensor's left - - the third is the distance of the bottom side from the sensor's top - - the fourth is the distance of the right side from the sensor's left - It is useful after detecting the masked areas, to not fully use these areas but leave a border of - 2-4 pixels instead, to take care of possible light leaks from the light sensing area to the optically - black (masked) area or sensor imperfections at the outer borders. + + // Crop away masked sensor borders, 10 pixels left, 20 pixels top, resulting image width/height 4000x3000. + // Instead of width/height you can write a negative number which specifies how much of right/bottom border + // that should be removed but keep in mind that sometimes after converting to DNG the borders are already + // cropped so the "negative number" way is not totally safe. + "raw_crop": [ 10, 20, 4000, 3000 ], + + // Almost same as MaskedAreas DNG tag, used for black level measuring. Here up to two areas can be defined + // by tetrads of numbers: + "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], + // Two tetrads define two areas. The difference vs "raw_crop" is the meaning of the numbers which here are + // expressing the absolute distance (in pixels) of each side of each rectangular "masked area" from the top + // and left side of the sensor + // - the first number is the distance of the top edge from the sensor's top + // - the second is the distance of the left side from the sensor's left + // - the third is the distance of the bottom side from the sensor's top + // - the fourth is the distance of the right side from the sensor's left + // It is useful after detecting the masked areas, to not fully use these areas but leave a border of 2-4 pixels + // instead, to take care of possible light leaks from the light sensing area to the optically black (masked) + // area or sensor imperfections at the outer borders. }, { "make_model": "ManufacturerA ModelB", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], - // black and white levels per ISO per channel - // this example only two ISOs, normally the list should be more populated. - // When RawTherapee asks for black/white levels for a specific ISO the closest - // match is picked. + + // Black and white levels per ISO per channel. + // In this example there are only two ISOs - normally the list should be more populated. + // When RawTherapee asks for black/white levels for a specific ISO the closest match is picked. "ranges": { "black": [ { "iso": 100, "levels": 10 }, // here only one level, same level for all channels @@ -112,286 +103,212 @@ Examples: } } -How to measure white levels: + +How to Measure White Levels: ---------------------------- -Dcraw which provides the default values to RawTherapee often provides too high -white levels, and only provides a single value regardless of color channel, ISO -or aperture. If you open an image with a large clipped area and that is -rendered in a pink/magenta color rather than white it usually means that the -white level constant is too high. You can fix this by adjusting the -"Raw White Point" in the raw tab inside RawTherapee, or permanently fix it by -measuring and providing a more exact white level in camconst.json so -RawTherapee gets to know from start where the camera actually clips. + dcraw provides the default values used by RawTherapee, but often provides too high white levels, and only provides a + single value regardless of color channel, ISO or aperture. If you open an image with a large clipped area and that + is rendered in a pink/magenta color rather than white it usually means that the white level constant is too high. You can + fix this by adjusting the"Raw White Point" in the raw tab inside RawTherapee, or permanently fix it by measuring and + providing a more exact white level in camconst.json so RawTherapee gets to know from start where the camera actually + clips. Providing a complete and detailed white-level profile can be a quite large and complicated effort. As an + alternative you can provide a simpler profile.We suggest one of the following alternatives in rising difficulty + (and generally diminishing return): + A) Provide a single white-level value measured on the native ISO (base ISO). For many cameras this will actually be + complete information, those that don't vary on channel, ISO or aperture. + B) Check through all ISOs and if there are differences in white level provide an array with white level per ISO. + C) In addition to ISO, check for aperture scaling and add that. + D) In addition to ISO and aperture scaling check for color channel differences and add that. -Providing a complete and detailed white-level profile can be a quite large -and complicated effort. As an alternative you can provide a simpler profile. -We suggest one of the following alternatives in rising difficulty (and -generally diminishing return): + Doing A is often better than nothing, as dcraw's default is often too high.B can also be worthwhile for some cameras (or + else you'll get pink highlights for some ISOs), while C and D can generally be seen as fine-tuning. -A) Provide a single white-level value measured on the native ISO (base ISO). - For many cameras this will actually be complete information, those that - don't vary on channel, ISO or aperture. -B) Check through all ISOs and if there are differences in white level provide - an array with white level per ISO. -C) In addition to ISO, check for aperture scaling and add that. -D) In addition to ISO and aperture scaling check for color channel - differences and add that. + Here follows a guide how to measure white levels (clipping levels): -Doing A) is often better than nothing, as dcraw's default is often too high. -B) can also be worthwhile for some cameras (or else you'll get pink highlights -for some ISOs), while C) and D) can generally be seen as fine-tuning. + Shoot with your camera into a bright light source, such as a lamp, and make sure the shutter speed is long enough to get + overexposure (we want clipping!). Preferably overexpose lightly, say 1 or 2 stops if you can. The reason for this is that + some cameras with fuzzy white levels may look less fuzzy than they actually are if over-exposure is heavy. -Here follows a guide how to measure white levels (clipping levels): + Use f/5.6 or smaller aperture (=larger f-number) to avoid any raw scaling the camera might have for large apertures. -Shoot with your camera into a bright light source, such as a lamp, and make -sure the shutter speed is long enough to get overexposure (we want -clipping!). Preferably overexpose lightly, say 1 or 2 stops if you can. The -reason for this is that some cameras with fuzzy white levels may look less -fuzzy than they actually are if over-exposure is heavy. + Open the file in a raw analyzer such as RawDigger and check the pixel values for the clipped areas (if you are using + RawDigger, make sure you have disabled"subtract black" in preferences or else sample values can be wrong). In + this stage we always look at white level before black level subtraction! White levels can be different on color + channel (R, G1, B, G2, note the two greens, most often both green channels have the same white level though) and + vary depending on ISO setting, so if you want to provide a complete profile make one shoot for each ISO (even 1/3 + steps, so yes it can be quite a lot of pictures to shoot and check). -Use f/5.6 or smaller aperture (=larger f-number) to avoid any raw scaling -the camera might have for large apertures. + In addition, many cameras scale the raw values for large apertures. It's generally not that important to cover this, but + if you want to extract most out of the camera you should cover this too. Then you need to shoot with a wide aperture + lens (ideally the widest available from the manufacturer) and test each aperture (1/3 steps) from the widest (say f/1.2) + until the camera stops scaling the raw values (usually f/2.8 or f/4.0). If the camera also have ISO scaling you need to + shoot at these different ISOs to detect any differences in scaling, there can be a bit of variation. If you don't have + access to the widest lens available for the system (say only an f/1.8 lens instead of an f/1.2) it can still be valuable + to have the values down to what you can provide. Brands known to have models that have aperture scaling of white levels + include Canon and Nikon. Note that if white levels are not scaled the camera may have raw scaling anyway (Sony for + example), but as such scaling will not affect raw decoding we don't need to care about that. -Open the file in a raw analyzer such as Rawdigger and check the pixel values -for the clipped areas (if you are using Rawdigger, make sure you have disabled -"subtract black" in preferences or else sample values can be wrong). In this -stage we always look at white level before black level subtraction! White -levels can be different on color channel (R, G1, B, G2, note the two greens, -most often both green channels have the same white level though) and vary -depending on ISO setting, so if you want to provide a complete profile make -one shoot for each ISO (even 1/3 steps, so yes it can be quite a lot of -pictures to shoot and check). + PROVIDE CONSERVATIVE VALUES. Most cameras have a little noise at the white level, and some can have a lot. In your raw + analyzer, move around and look at the values in the clipped areas to get a sense of the variation, and/or look at the + histogram. While it's common to with very little variation, say only +/-2 units, some can have +/-500 or more (some may + have different variation depending on ISO). There can also be camera-to-camera variation. -In addition, many cameras scale the raw values for large apertures. It's -generally not that important to cover this, but if you want to extract most -out of the camera you should cover this too. Then you need to shoot with a -wide aperture lens (ideally the widest available from the manufacturer) and -test each aperture (1/3 steps) from the widest (say f/1.2) until the camera -stops scaling the raw values (usually f/2.8 or f/4.0). If the camera also -have ISO scaling you need to shoot at these different ISOs to detect any -differences in scaling, there can be a bit of variation. If you don't have -access to the widest lens available for the system (say only an f/1.8 lens -instead of an f/1.2) it can still be valuable to have the values down to -what you can provide. Brands known to have models that have aperture scaling -of white levels include Canon and Nikon. Note that if white levels are not -scaled the camera may have raw scaling anyway (Sony for example), but as -such scaling will not affect raw decoding we don't need to care about that. + If the white level is set too high RawTherapee will not think the pixels are clipped and you can get discoloured + highlights (usually pink), this is what we want to avoid. If white level is set too low RawTherapee will clip early, ie + you lose a little highlight detail, but the color is rendered correctly and highlight reconstruction can work properly, + so this is not as bad. This is why we want conservative values. -PROVIDE CONSERVATIVE VALUES. Most cameras have a little noise at the white -level, and some can have a lot. In your raw analyzer, move around and look at -the values in the clipped areas to get a sense of the variation, and/or look -at the histogram. While it's common to with very little variation, say only -+/-2 units, some can have +/-500 or more (some may have different variation -depending on ISO). There can also be camera-to-camera variation. + By conservative values we mean that if you see a white level of most often 15760 and occasionally 15759 (i.e. very small + variation of white level which is a common case), you set the white level around 50-100 14-bit units below or + 10-20 12-bit units. Say at 15700 in this example, or 4080 instead of 4095 for 12-bit raws. This way we get a little margin + from noise and camera variation. Since sensor raw values are linear, you lose, for example, + log2(1-50/15760) = -0.005 stops of detail, i.e. irrelevant. Thus it is better to provide RawTherapee with knowledge + where the image clips rather than keeping that last 0.005 stop of highlight information and risking that clipping will + not be detected properly. -If the white level is set too high RawTherapee will not think the pixels are -clipped and you can get discoloured highlights (usually pink), this is what -we want to avoid. If white level is set too low RawTherapee will clip early, ie -you lose a little highlight detail, but the color is rendered correctly and -highlight reconstruction can work properly, so this is not as bad. This is why -we want conservative values. + It is very usual for white level to be a bell distribution instead of a candle when the camera applies long exposure + noise reduction (LENR) by subtracting a black frame and/or when the system is destabilized due to temperature. Some models have + always a bell distribution at WL. If you have a fuzzy white level look at the linear histogram; you will probably see a + normal/Gaussian distribution (bell shape) noise peak at clipping and probably also a peak at a hard raw data clip level + usually at or close to a power of two - 1, such as 4095 or 16383. Then you pick a value just before the bell shape + rises, i.e. to the left of the bell meaning that you cut away the whole fuzzy noise peak. If a little of the starting edge + of the noise will be included it's not harmful, but 99% of it should be above. This would mean that it's better to + measure white level on long exposure/high temp raws but since this if difficult and time consuming we choose to measure + on normal raws and cover the abnormalities with the conservative WL values. A more detailed approach when we only have + non-LENR measures is to subtract a value according to per ISO read noise. We can find data regarding read noise (stdev + of Gaussian distribution) at http://www.photonstophotos.net/Charts/RN_ADU.htm . We find the per ISO tead_noise and + subtract from the measured value 6*read_noise. This gives confidence that 99.5% of the bell is clipped out. -By conservative values we mean that if you see a white level of most often -15760 and occassionally 15759 (ie very small variation of white level which -is a common case), you set the white level around 50-100 14-bit units below or -10-20 12-bit units. Say at 15700 in this example, or 4080 instead of 4095 for -12-bit raws. This way we get a little margin from noise and camera variation. -Since sensor raw values are linear, you lose, for example, -log2(1-50/15760) = -0.005 stops of detail, i.e. irrelevant. Thus it is better -to provide RawTherapee with knowledge where the image clips rather than keeping -that last 0.005 stop of highlight information and risking that clipping will -not be detected properly. + If you have used Adobe's DNG Converter and analyzed it's output you may have noticed that it's very conservative + regarding white levels, i.e. it cuts away quite a lot from the top. While we also recommend to be conservative, you can + generally be a little bit less so than Adobe's DNG Converter. RawTherapee is meant to max out what you can get from your + camera, and the white levels should mirror that, within reason. -It is very usual for white level to be a bell distribution instead of a candle -when the camera applies long exposure noise reduction by subtracting a black frame -and/or when the system is destabilized due to temperature. Some models have -always a bell distribution at WL. -If you have a fuzzy white level look at the linear histogram; you will probably -see a normal/gaussian distribution (bell shape) noise peak at clipping and -probably also a peak at a hard raw data clip level usually at or close to a -power of two - 1, such as 4095 or 16383. Then you pick a value just before the -bell shape rises, ie to the left of the bell meaning that you cut away the -whole fuzzy noise peak. If a little of the starting edge of the noise will be -included it's not harmful, but 99% of it should be above. -This would mean that it's better to measure white level on long exposure/ high temp -raws but since this if difficult and time consuming we choose to measure on normal -raws and cover the abnormalities with the conservative WL values. - A more detailed approach when we only have non LENR measures is to subtract -a value according to per ISO read noise. -We can find data regarding read noise (stdev of gaussian distribution) at -http://www.photonstophotos.net/Charts/RN_ADU.htm . We find the per ISO tead_noise and -subtract from the measured value 6*read_noise. This gives confidence that 99.5% of -the bell is clipped out. + The aperture scaling feature is meant to raise the white level to not miss out on highlight detail when the camera has + scaled the raw values (and thus raised white levels). Many cameras do this, but not all, and can only do it for lenses + that report aperture to the camera (i.e. you see it in the Exif data). Providing proper aperture scaling values is a bit + more advanced task, so if you are unsure we recommend to skip that part. -If you have used Adobe's DNG Converter and analyzed it's output you may have -noticed that it's very conservative regarding white levels, ie it cuts away -quite a lot from the top. While we also recommend to be conservative, you can -generally be a little bit less so than Adobe's DNG Converter. RawTherapee is -meant to max out what you can get from your camera, and the white levels should -mirror that, within reason. + Beware that the raw format may have a ceiling so that it clips scaled values, for example the Canon 5D mark II maxes out + at 16383 which happens at f/1.8 for ISOs with the white level at 15750, but for ISO160 when the white level is 12800 it + does not max out. If there is such a raw limit it must also be provided ("ranges":"white_max"). Usually you will not + need a margin on white_max as it clips there as a result of an in-camera math operation. -The aperture scaling feature is meant to raise the white level to not miss out -on highlight detail when the camera has scaled the raw values (and thus -raised white levels). Many cameras do this, but not all, and can only do it -for lenses that report aperture to the camera (ie you see it in the EXIF -data). Providing proper aperture scaling values is a bit more advanced task, -so if you are unsure we recommend to skip that part. + Note that aperture scaling can be quite small, for the 5D mark II it's only 0.2 stop down to f/1.2 and then it can be + discussed if it's worthwhile to care. The "worst" cameras scale about 0.6 stops though, and then it's more valuable to + compensate. If you skip aperture scaling RawTherapee will clip the files a little bit too early and you miss that last + fraction of highlight detail, but you get no processing problems. Setting un-conservative scale factors can on the other + hand cause a too high white level and break highlight processing, so be careful. -Beware that the raw format may have a ceiling so that it clips scaled values, -for example the Canon 5D mark II maxes out at 16383 which happens at f/1.8 -for ISOs with the white level at 15750, but for ISO160 when the white level -is 12800 it does not max out. If there is such a raw limit it must also be -provided ("ranges":"white_max"). Usually you will not need a margin on -white_max as it clips there as a result of an in-camera math operation. + Scaling can vary slightly depending on ISO (if white levels vary) so make sure to provide conservative scalings so + regardless of ISO you don't get a too high white level. We recommend to keep a small margin here also white levels, + i.e. 0.5% lower or so. For example if base (not conservative!) white level is 15750 and the scaled is 16221 we have a + scaling factor of 16221/15750=1.0299 i.e. +2.9% we set the factor to 1.025 to keep a margin. The abnormal cases are + already covered by setting conservative per ISO White levels. -Note that aperture scaling can be quite small, for the 5D mark II it's only -0.2 stop down to f/1.2 and then it can be discussed if it's worthwhile to care. -The "worst" cameras scale about 0.6 stops though, and then it's more -valuable to compensate. If you skip aperture scaling RawTherapee will clip the -files a little bit too early and you miss that last fraction of highlight -detail, but you get no processing problems. Setting unconservative scale -factors can on the other hand cause a too high whitelevel and break highlight -processing, so be careful. + The scale factor you provide here is applied on the white level before black level subtraction (if any), i.e. directly on + the white level value you provide in the camconst.json file. Black level (if provided) is not scaled. Please report to + us if you come across a camera which scales black levels, then we can add that as an option. Usually the camera applies + an offset to shift back the black level to the standard level after scaling. -Scaling can vary sligthly depending on ISO (if white levels vary) so make -sure to provide conservative scalings so regardless of ISO you don't get a -too high white level. We recommend to keep a small margin here also -white levels, ie 0.5% lower or so. For example if base (not conservative!) -white level is 15750 and the scaled is 16221 we have a scaling factor of -16221/15750=1.0299 ie +2.9% we set the factor to 1.025 to keep a margin. -The abnormal cases are already covered by setting conservative per ISO White levels. + If RawTherapee doesn't find an entry for the aperture used in the image, it will pick the closest above, i.e. if the + apertures 1.0 and 2.0 is in the table and the image has aperture 1.2, it will pick scaling for 2.0, even if 1.0 is the + closer aperture. The reason for always checking the closest above is that we rather get a bit too low white level than + too high, as discussed before. -The scale factor you provide here is applied on the white level before black -level subtraction (if any), ie directly on the white level value you provide in -the camconst.json file. Black level (if provided) is not scaled. Please report -to us if you come across a camera which scales black levels, then we can add -that as an option. Usually the camera applies an offset to shift back the -black level to the standard level after scaling. + Some cameras have different white levels on different color channels. When this is the case the difference is often so + small so you can just provide a single value instead, i.e. a conservative value based on the lowest clipping. -If RawTherapee doesn't find an entry for the aperture used in the image, it -will pick the closest above. Ie if the apertures 1.0 and 2.0 is in the table -and the image has aperture 1.2, it will pick scaling for 2.0, even if 1.0 is -the closer aperture. The reason for always checking the closest above is that -we rather get a bit too low white level than too high, as discussed before. + What we know at the time of writing about different brands/models (not complete info): + - Canon CR2: typically same clipping per channel, but significant variations on ISO and aperture. Maxes out at 16383, + black level measured on masked black pixels, i.e. don't provide that. + - Nikon NEF: sometimes different clipping per color (most often negligible though). Will do aperture and ISO scaling, + but often to a lesser extent than Canon files, i.e. not as much to gain. + - Sony ARW2: no scaling. Generally black level around 512, and white level 16350 and to be conservative say 16300. -Some cameras have different white levels on different color channels. When -this is the case the difference is often so small so you can just provide a -single value instead, ie a conservative value based on the lowest clipping. + Note that some raw formats may go through a certain amount of pre-processing based on meta data, such as curve and + levels adjustments and various calibrations. The Phase One IIQ is one example, and this means that if you look at the + data in a raw analyzer such as RawDigger it may perform a different type of preprocessing than RawTherapee's loader + does, and you may end up providing incompatible black/white levels. -What we know at the time of writing about different brands/models (not -complete info): + You can use RawTherapee for analysis too, it's safer as you are using it's own raw decoder but it's not as + user-friendly: enable verbose mode in options so you get output on the console. When you load a file you will see a + message of current black and white levels and if they came from dcraw or camconst.json. If you're adjusting an existing + camconst.json value you can just read what it is in the file and not need to enable verbose output. - - Canon CR2: typically same clipping per channel, but significant variations - on ISO and aperture. Maxes out at 16383, black level measured on masked - black pixels, ie don't provide that. - - Nikon NEF: sometimes different clipping per color (most often negligible - though). Will do aperture and ISO scaling, but often to a lesser extent - than Canon files, ie not as much to gain. - - Sony ARW2: no scaling. Generally black level around 512, and white level - 16350 and to be conservative say 16300. + Reset exposure sliders to neutral, and zoom in on a large clipped highlight. Move around the mouse pointer within, it + should show stable 100% on R G B. If so, the white level is not too high, it could however be too low. To test that, go + to the raw tab and adjust the "white point linear correction factor", reduce it until one of the channels is no longer + 100%, and then increase in steps of 0.01 until all are 100 again. Usually you play around in the range 0.90 to 0.99, i.e. + a very small adjustment. When you've found this factor you should apply it on the old white level to find a new larger + one. As RT's "white point linear correction factor" work after black level subtraction and camconst.json want values + without it we need to do some math: -Note that some raw formats may go through a certain amount of pre-processing -based on meta data, such as curve and levels adjustments and various -calibrations. The Phase One IIQ is one example, and this means that if you -look at the data in a raw analyzer such as RawDigger it may perform a -different type of preprocessing than RawTherapee's loader does, and you may -end up providing incompatible black/white levels. + BL = black level (typically something near 0, 256, 512, 1024 or 2048 find it in the verbose output or if available in + camconst.json) + F = white point linear correction factor you just found out (typically in the range 0.90 to 0.99 if you need to + increase white level, 1.01 to 1.10 if decrease) + oldWL = old white level, found in verbose output or in camconst.json if available. + newWL = BL + (oldWL - BL) / F -You can use RawTherapee for analysis too, it's safer as you are using it's -own raw decoder but it's not as user-friendly: enable verbose mode in options -so you get output on the console. When you load a file you will see a message -of current black and white levels and if they came from dcraw or camconst.json. -If you're adjusting an existing camconst.json value you can just read what it is in -the file and not need to enable verbose output. + Note that if black level is 0 which it is for many cameras, the formula simplifies to: new white level = oldWL / F. -Reset exposure sliders to neutral, and zoom in on a large clipped highlight. -Move around the mouse pointer within, it should show stable 100% on R G B. If -so, the white level is not too high, it could however be too low. To test that, -go to the raw tab and adjust the "whitepoint linear correction factor", reduce -it until one of the channels is no longer 100%, and then increase in steps of -0.01 until all are 100 again. Usually you play around in the range 0.90 to -0.99, ie a very small adjustment. When you've found this factor you should -apply it on the old white level to find a new larger one. As RT's "whitepoint -linear correction factor" work after blacklevel subtraction and camconst.json -want values without it we need to do some math: + Here's an example from a Canon 1000D: black level is 256, old white level is 3651, white point correction factor becomes + 0.90, then new white level is 256 + (3651 - 256) / 0.9 = 4028. -BL = black level (typically something near 0, 256, 512, 1024 or 2048 find it in the - verbose output or if available in camconst.json) -F = whitepoint linear correction factor you just found out (typically in the - range 0.90 to 0.99 if you need to increase white level, 1.01 to 1.10 if - decrease) -oldWL = old white level, found in verbose output or in camconst.json if - available. + If your camera have different black levels per channel use the one which yields the smallest white level (can be the + largest or smallest, test!). -new white level = BL + (oldWL - BL) / F + This new white level you then enter in your camconst.json file. The same procedure can be used if the white level is too + high, i.e. if you see pink highlights, then increase the correction factor above 1.0 until you just start seeing stable + 100% on all channels, you use the same formula to calculate the new smaller white level. -Note that if black level is 0 which it is for many cameras, the formula -simplifies to: new white level = oldWL / F. - -Here's an example from a Canon 1000D: black level is 256, old white level is -3651, whitepoint correction factor becomes 0.90, then new white level is -256 + (3651 - 256) / 0.9 = 4028. - -If your camera have different black levels per channel use the one which -yields the smallest white level (can be the largest or smallest, test!). - -This new white level you then enter in your camconst.json file. The same -procedure can be used if the white level is too high, ie if you see pink -highlights, then increase the correction factor above 1.0 until you just start -seeing stable 100% on all channels, you use the same formula to calculate the -new smaller white level. About black levels: ------------------- -Unlike for white levels it's much more common that black levels can be -derived from the format. Either it's simply 0 (typical for old Nikon cameras, -newer Nikons (year2013-14) have a BL at around 150 12-bit or 600/768 14-bit ), -or it can be derived from masked pixels (typical for Canon cameras) or otherwise -be extracted from some tag. -Some formats have built-in subtraction information and are pre-processed by DCRaw -to end up at a black level of zero(Phase One's IIQ). -For Panasonic raws beginning from Dcraw v9.21 Dcraw/RT reads base BL from exif data -(tags 0x001c BlackLevelRed, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue)and we -define in "ranges": { "black": the needed offset of around 15. The (total) BL RT displays is base+offset -In all, you typically should not care about the black level in camconst.json, -any information that can be derived from the raw file itself should not be specified in camconst.json! -Sony's ARW2 is one of the few exceptions (with single black level around 512, or 800 for RX10/100 models), -but DCraw generally has good constants for these already. + Unlike for white levels it's much more common that black levels can be derived from the format. Either it's simply + 0 (typical for old Nikon cameras, newer Nikons (year 2013-14) have a BL at around 150 12-bit or 600/768 14-bit ), or it + can be derived from masked pixels (typical for Canon cameras) or otherwise be extracted from some tag. -Currently we have chosen not to provide any guide how to measure black levels -as we don't think it will be a common task (it's also more difficult to do -than measure white levels). If you experience a black level issue it's more -likely due to a format parsing bug which should be fixed in DCRaw and/or -RawTherapee's raw format parser. + Some formats have built-in subtraction information and are pre-processed by dcraw to end up at a black level of + zero (Phase One's IIQ). For Panasonic raws beginning from dcraw v9.21 dcraw/RT reads base BL from Exif data (tags 0x001c + BlackLevelRed, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue) and we define in "ranges": { "black": the needed offset + of around 15. The (total) BL RT displays is base+offset In all, you typically should not care about the black + level in camconst.json, any information that can be derived from the raw file itself should not be specified in + camconst.json! Sony's ARW2 is one of the few exceptions (with single black level around 512, or 800 for + RX10/100 models), but dcraw generally has good constants for these already. -How does a black level issue look? If the image has a color cast and is -possibly duller than normal it's likely that black levels are off. The color -cast is typically stronger in darker colors but it can be hard to see, it's -more often experienced as a cast over the whole image. + Currently we have chosen not to provide any guide how to measure black levels as we don't think it will be a common task + (it's also more difficult to do than measure white levels). If you experience a black level issue it's more likely due + to a format parsing bug which should be fixed in dcraw and/or RawTherapee's raw format parser. + + How does a black level issue look? If the image has a color cast and is possibly duller than normal it's likely that + black levels are off. The color cast is typically stronger in darker colors but it can be hard to see, it's more often + experienced as a cast over the whole image. + + +Camera constants: +----------------- + + When adding camera constants please set a quality level so we know the status for future updates + + Quality A: complete information, no need to add more, to the best of our knowledge + Quality B: not complete, but very little to gain from adding more + Quality C: complementing with additional information would provide significant gain + Quality X: unknown, i.e. we know too little about the camera properties to know if we have enough info. */ + {"camera_constants": [ -/* - -When adding camera constants please set a quality level so we know the status for future updates - -Quality A: complete information, no need to add more, to the best of our knowledge -Quality B: not complete, but very little to gain from adding more -Quality C: complementing with additional information would provide significant gain -Quality X: unknown, ie we knowing to little about the camera properties to know if - we have enough info or not. - -*/ - - { // quality A + { // Quality A "make_model": "Canon EOS 5D Mark II", "dcraw_matrix": [ 4716,603,-830,-7798,15474,2480,-1496,1937,6651 ], "ranges": { // black levels are read from raw masked pixels - // white levels are same for all colors, but vary on ISO + // white levels are same for all colors, but vary on ISO "white": [ { "iso": 50, "levels": 15600 }, // typical: 15760 { "iso": 100, "levels": 15600 }, @@ -416,32 +333,33 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 12800, "levels": 16200 }, { "iso": 25600, "levels": 16200 } ], - "white_max": 16383, + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for and f/1.0 (had no lenses to test with), but the - typical 15700 white level maxes out at "white_max" for f/1.8 and below anyway. */ - { "aperture": 1.2, "scale_factor": 1.100 }, // guessed by relative 5DIII data - { "aperture": 1.4, "scale_factor": 1.077 }, - { "aperture": 1.6, "scale_factor": 1.054 }, - { "aperture": 1.8, "scale_factor": 1.039 }, - { "aperture": 2.0, "scale_factor": 1.031 }, - { "aperture": 2.2, "scale_factor": 1.021 }, - { "aperture": 2.5, "scale_factor": 1.016 }, - { "aperture": 2.8, "scale_factor": 1.010 }, - { "aperture": 3.2, "scale_factor": 1.004 }, - { "aperture": 3.5, "scale_factor": 1.003 } + // no scale factors known for and f/1.0 (had no lenses to test with), but the typical 15700 white level + // maxes out at "white_max" for f/1.8 and below anyway. + { "aperture": 1.2, "scale_factor": 1.100 }, // guessed by relative 5DIII data + { "aperture": 1.4, "scale_factor": 1.077 }, + { "aperture": 1.6, "scale_factor": 1.054 }, + { "aperture": 1.8, "scale_factor": 1.039 }, + { "aperture": 2.0, "scale_factor": 1.031 }, + { "aperture": 2.2, "scale_factor": 1.021 }, + { "aperture": 2.5, "scale_factor": 1.016 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.004 }, + { "aperture": 3.5, "scale_factor": 1.003 } ] } }, - { // quality C, INTERMEDIATE ISO SAMPLES MISSING + + { // Quality C, INTERMEDIATE ISO SAMPLES MISSING "make_model": "Canon EOS-1D X Mark II", "dcraw_matrix": [ 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 ], - // "raw_crop": [ 192, 96, 8696, 5800 ], // Full sensor 5568x3708 top38, left72, official crop left84, top50, right5555, bottom3697, 5472X3648 - // "masked_areas": [ 50, 4, 3697, 68 ], // left out 4 first columns from calculations because possibly the BL is still imbalanced there - "ranges": { - // black levels are read from raw masked pixels - // white levels are same for all colors all ISOs, but safety margin vary on ISO - "white": [ + //"raw_crop": [ 192, 96, 8696, 5800 ], // Full sensor 5568x3708 top38, left72, official crop left84, top50, right5555, bottom3697, 5472X3648 + //"masked_areas": [ 50, 4, 3697, 68 ], // left out 4 first columns from calculations because possibly the BL is still imbalanced there + "ranges": { + // black levels are read from raw masked pixels + // white levels are same for all colors all ISOs, but safety margin vary on ISO + "white": [ { "iso": 50, "levels": 16350 }, // typical for all ISOs: 16383, stdev 2.25 { "iso": 100, "levels": 16350 }, // stdev 2.25 { "iso": [ 125, 160, 200, 250 ], "levels": 16340 }, // stdev 2.5 @@ -456,58 +374,58 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": [ 80000, 102400 ], "levels": 15100 },// stdev x, 245 { "iso": [ 204800 ], "levels": 14000 }, { "iso": [ 409600 ], "levels": 13000 } - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* no need for aperture scaling because typical WL is 16383 at all ISOs .. */ - { "aperture": 1.2, "scale_factor": 1.130 }, // guessed by relative 6D data - { "aperture": 1.4, "scale_factor": 1.090 }, - { "aperture": 1.6, "scale_factor": 1.060 }, - { "aperture": 1.8, "scale_factor": 1.040 }, - { "aperture": 2.0, "scale_factor": 1.030 }, - { "aperture": 2.2, "scale_factor": 1.020 }, - { "aperture": 2.5, "scale_factor": 1.015 }, - { "aperture": 2.8, "scale_factor": 1.010 }, - { "aperture": 3.2, "scale_factor": 1.005 }, - { "aperture": 3.5, "scale_factor": 1.003 } + // no need for aperture scaling because typical WL is 16383 at all ISOs + { "aperture": 1.2, "scale_factor": 1.130 }, // guessed by relative 6D data + { "aperture": 1.4, "scale_factor": 1.090 }, + { "aperture": 1.6, "scale_factor": 1.060 }, + { "aperture": 1.8, "scale_factor": 1.040 }, + { "aperture": 2.0, "scale_factor": 1.030 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.015 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.005 }, + { "aperture": 3.5, "scale_factor": 1.003 } ] } }, - { // quality A, + + { // Quality A "make_model": "Canon EOS 5D Mark III", "dcraw_matrix": [ 6722,-635,-963,-4287,12460,2028,-908,2162,5668 ], "ranges": { // black levels are read from raw masked pixels - // white levels are same for all colors, but vary on ISO + // white levels are same for all colors, but vary on ISO "white": [ { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800, 16000, 20000 ], "levels": 15180 }, // typical: 15282 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // typical: 13306 { "iso": [ 25600, 32000, 40000, 51200, 102400 ], "levels": 16200 } ], - "white_max": 16383, + "white_max": 16383, "aperture_scaling": [ - { "aperture": 1.2, "scale_factor": 1.130 }, - { "aperture": 1.4, "scale_factor": 1.090 }, - { "aperture": 1.6, "scale_factor": 1.065 }, - { "aperture": 1.8, "scale_factor": 1.040 }, - { "aperture": 2.0, "scale_factor": 1.025 }, - { "aperture": 2.2, "scale_factor": 1.020 }, - { "aperture": 2.5, "scale_factor": 1.015 }, - { "aperture": 2.8, "scale_factor": 1.010 }, - { "aperture": 3.2, "scale_factor": 1.005 }, - { "aperture": 3.5, "scale_factor": 1.002 } - ] - } + { "aperture": 1.2, "scale_factor": 1.130 }, + { "aperture": 1.4, "scale_factor": 1.090 }, + { "aperture": 1.6, "scale_factor": 1.065 }, + { "aperture": 1.8, "scale_factor": 1.040 }, + { "aperture": 2.0, "scale_factor": 1.025 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.015 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.005 }, + { "aperture": 3.5, "scale_factor": 1.002 } + ] + } }, - { // Quality B, some intermediate ISO samples missing, LENR samples missing - // so White Levels not properly indicated, some aperture scaling missing + { // Quality B, some intermediate ISO samples missing, LENR samples missing so White Levels not properly indicated, some aperture scaling missing "make_model": "Canon EOS 5D Mark IV", "dcraw_matrix": [ 6446,-366,-864,-4436,12204,2513,-952,2496,6348 ], // DNG_V9.7 D65 "raw_crop": [ 136, 42, 6740, 4500 ], // full size 6880x4544, official crop 148,54,6867,4533 "masked_areas": [ 54, 4, 4534, 132 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125, 200, 250 ], "levels": 16100 }, // nominal 16383, LENR? { "iso": [ 160 ], "levels": 13000 }, // nominal f8-13105 { "iso": [ 320, 640, 1250, 2500 ], "levels": 13300 }, // G1,G2 F4.0-13422-F2.8-13562-13616 @@ -515,57 +433,56 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16100 }, // nominal 16383, { "iso": [ 6400, 8000, 12800, 16000, 25600, 32000 ], "levels": 16000 }, // R,G1,G2 16383, LENR? { "iso": [ 40000, 51200, 102400 ], "levels": 15800 } // 16383, LENR? - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: need for more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.130 }, // - { "aperture": 1.6, "scale_factor": 1.100 }, // - { "aperture": 1.8, "scale_factor": 1.070 }, // - { "aperture": 2.0, "scale_factor": 1.050 }, // 14171/13422=1.055 - { "aperture": 2.2, "scale_factor": 1.035 }, // 13954/13422=1.039 - { "aperture": 2.5, "scale_factor": 1.025 }, // 11400/11000=1.028 - { "aperture": 2.8, "scale_factor": 1.015 }, // 13562/13422 - 13731,13688,13562 - { "aperture": 3.2, "scale_factor": 1.010 }, // - { "aperture": 3.5, "scale_factor": 1.005 } // 13508/13422 - ] - } + /* need more data to properly fill all scale factors */ + { "aperture": 1.4, "scale_factor": 1.130 }, // + { "aperture": 1.6, "scale_factor": 1.100 }, // + { "aperture": 1.8, "scale_factor": 1.070 }, // + { "aperture": 2.0, "scale_factor": 1.050 }, // 14171/13422=1.055 + { "aperture": 2.2, "scale_factor": 1.035 }, // 13954/13422=1.039 + { "aperture": 2.5, "scale_factor": 1.025 }, // 11400/11000=1.028 + { "aperture": 2.8, "scale_factor": 1.015 }, // 13562/13422 - 13731,13688,13562 + { "aperture": 3.2, "scale_factor": 1.010 }, // + { "aperture": 3.5, "scale_factor": 1.005 } // 13508/13422 + ] + } }, { // Quality C, intermediate ISO samples missing but safely guessed, aperture scaling measures missing "make_model": [ "Canon EOS 5DS R", "Canon EOS 5DS" ], - // "dcraw_matrix": [ 6848,-1661,-221,-3904,10931,3434,-470,1251,6039 ], // DNG_V9.0 A + //"dcraw_matrix": [ 6848,-1661,-221,-3904,10931,3434,-470,1251,6039 ], // DNG_V9.0 A "dcraw_matrix": [ 6250,-711,-808,-5153,12794,2636,-1249,2198,5610 ], // DNG_V9.0 D65 "raw_crop": [ 192, 96, 8696, 5800 ], // 800, 300, 7500, 4700 - 160,64,8730x5800 - sensor 8896x5920 top64, left160, official crop left196, top100, right 8883, bottom 5891, 8688X5792 "masked_areas": [ 100, 40, 5892, 158 ], // left out 40 first columns from calculations because possibly the BL is still imbalanced there "ranges": { - "white": [ - { "iso": [ 50, 100 ], "levels": 14650 }, // typical 14733 - { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 15280 }, // typical 15383 - { "iso": [ 125, 200, 250, 400, 500, 800, 1000, 1600, 2000 ], "levels": 15280 }, // typical R15330-GB15383 - { "iso": [ 3200, 4000, 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 } // clippings at R 15200-15300, G1,G2,B 15360-15390 - ], - "white_max": 16383, + "white": [ + { "iso": [ 50, 100 ], "levels": 14650 }, // typical 14733 + { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 15280 }, // typical 15383 + { "iso": [ 125, 200, 250, 400, 500, 800, 1000, 1600, 2000 ], "levels": 15280 }, // typical R15330-GB15383 + { "iso": [ 3200, 4000, 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 } // clippings at R 15200-15300, G1,G2,B 15360-15390 + ], + "white_max": 16383, "aperture_scaling": [ - /* note: */ - { "aperture": 1.4, "scale_factor": 1.150 }, // 37/32 6-0-6-0-7-0-6-0-7-0 - { "aperture": 1.6, "scale_factor": 1.070 }, // guessed - { "aperture": 1.8, "scale_factor": 1.040 }, // 15501/14733=1.0521, 15352/14733=1.042 16030/15390 - { "aperture": 2.0, "scale_factor": 1.025 }, // 15129/14733=1.0268 - 15800/15383=1.027 - { "aperture": 2.2, "scale_factor": 1.013 }, // 15591/15383, 14931/14733 - { "aperture": 2.5, "scale_factor": 1.008 }, // 14857/14733guessed - { "aperture": 2.8, "scale_factor": 1.003 }, // 14783/14733 15435/15383 - { "aperture": 3.2, "scale_factor": 1.001 }, // 15409/15383 - { "aperture": 3.5, "scale_factor": 1.000 } // 14733/14733 - ] - } + { "aperture": 1.4, "scale_factor": 1.150 }, // 37/32 6-0-6-0-7-0-6-0-7-0 + { "aperture": 1.6, "scale_factor": 1.070 }, // guessed + { "aperture": 1.8, "scale_factor": 1.040 }, // 15501/14733=1.0521, 15352/14733=1.042 16030/15390 + { "aperture": 2.0, "scale_factor": 1.025 }, // 15129/14733=1.0268 - 15800/15383=1.027 + { "aperture": 2.2, "scale_factor": 1.013 }, // 15591/15383, 14931/14733 + { "aperture": 2.5, "scale_factor": 1.008 }, // 14857/14733guessed + { "aperture": 2.8, "scale_factor": 1.003 }, // 14783/14733 15435/15383 + { "aperture": 3.2, "scale_factor": 1.001 }, // 15409/15383 + { "aperture": 3.5, "scale_factor": 1.000 } // 14733/14733 + ] + } }, { // Quality A, some missing scaling factors are safely guessed - samples by sfink16 & RawConvert at RT forums "make_model": "Canon EOS 6D", "dcraw_matrix": [ 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 ], "ranges": { - "white": [ + "white": [ { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200 ], "levels": 15180 }, // typical 15283 { "iso": [ 4000, 6400, 8000, 12800 ], "levels": 15100 }, // typical 15283 { "iso": [ 16000, 25600 ], "levels": 14900 }, // typical 15283 @@ -573,77 +490,78 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": [ 5000, 10000 ], "levels": 13000 }, // typical 13225 { "iso": [ 20000 ], "levels": 12800 }, // typical 13225 { "iso": [ 51200, 102400 ], "levels": 15900 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.0 (had no lenses to test with), but the - ISO 160-320... 12650 white levels maxes out at "white_max" for f/1.2 and below anyway. */ - { "aperture": 1.2, "scale_factor": 1.130 }, // from histogramm 1 gap in every 7 levels - { "aperture": 1.4, "scale_factor": 1.090 }, // histogram 3 gaps in every 32 levels - { "aperture": 1.6, "scale_factor": 1.060 }, // 16213/15283 - { "aperture": 1.8, "scale_factor": 1.040 }, // 16004/15283 - { "aperture": 2.0, "scale_factor": 1.030 }, // 15800/15283 - { "aperture": 2.2, "scale_factor": 1.020 }, // guessed - { "aperture": 2.5, "scale_factor": 1.015 }, // 15541/15283 - { "aperture": 2.8, "scale_factor": 1.010 }, // 15437/15283 - { "aperture": 3.2, "scale_factor": 1.005 }, // 15361/15283 - { "aperture": 3.5, "scale_factor": 1.000 } // no sample + // no scale factors known for f/1.0 (had no lenses to test with), but the + // ISO 160-320... 12650 white levels maxes out at "white_max" for f/1.2 and below anyway. + { "aperture": 1.2, "scale_factor": 1.130 }, // from histogramm 1 gap in every 7 levels + { "aperture": 1.4, "scale_factor": 1.090 }, // histogram 3 gaps in every 32 levels + { "aperture": 1.6, "scale_factor": 1.060 }, // 16213/15283 + { "aperture": 1.8, "scale_factor": 1.040 }, // 16004/15283 + { "aperture": 2.0, "scale_factor": 1.030 }, // 15800/15283 + { "aperture": 2.2, "scale_factor": 1.020 }, // guessed + { "aperture": 2.5, "scale_factor": 1.015 }, // 15541/15283 + { "aperture": 2.8, "scale_factor": 1.010 }, // 15437/15283 + { "aperture": 3.2, "scale_factor": 1.005 }, // 15361/15283 + { "aperture": 3.5, "scale_factor": 1.000 } // no sample ] } }, + { // Quality A, ISO and aperture WL data by CharlyW at RawTherapee forums, missing samples safely guessed "make_model": "Canon EOS 7D", "dcraw_matrix": [ 5962,-171,-732,-4189,12307,2099,-911,1981,6304 ], // Colin Walker - // "dcraw_matrix": [ 6844,-996,-856,-3876,11761,2396,-593,1772,6198 ], // dcraw + //"dcraw_matrix": [ 6844,-996,-856,-3876,11761,2396,-593,1772,6198 ], // dcraw "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.250 }, // guessed - { "aperture": 1.6, "scale_factor": 1.150 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 - { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 - { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 - { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 - { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 - { "aperture": 3.2, "scale_factor": 1.015 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible - ] - } + // no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.250 }, // guessed + { "aperture": 1.6, "scale_factor": 1.150 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 + { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 + { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 + { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 + { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 + { "aperture": 3.2, "scale_factor": 1.015 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible + ] + } }, { // Quality A, f/1.6 aperture scale factor missing but safely guessed, ISO and aperture data by charlyw at RT forums "make_model": "Canon EOS 7D Mark II", "dcraw_matrix": [ 7268,-1082,-969,-4186,11839,2663,-825,2029,5839 ], // dng_v8.7 d65 - // "dcraw_matrix": [ 6285,-147,-821,-4080,11695,2714,-1045,2459,5497 ], // DXO D50 + //"dcraw_matrix": [ 6285,-147,-821,-4080,11695,2714,-1045,2459,5497 ], // DXO D50 "ranges": { - "white": [ - { "iso": [ 100, 125 ], "levels": 13500 }, // typical 13583 - LENR 13550 - { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12559 - { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 - LENR 15270,15260,15240,15220, - { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 }, // typical G1,G2 15303, R,B = 15430 LENR 15200 .. 15100 - { "iso": 51200, "levels": 16300 } // typical 16383 red 16371 - ], - "white_max": 16383, + "white": [ + { "iso": [ 100, 125 ], "levels": 13500 }, // typical 13583 - LENR 13550 + { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12559 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 - LENR 15270,15260,15240,15220, + { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 }, // typical G1,G2 15303, R,B = 15430 LENR 15200 .. 15100 + { "iso": 51200, "levels": 16300 } // typical 16383 red 16371 + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.6, f/1.0 (had no lenses to test with) */ - { "aperture": 1.4, "scale_factor": 1.200 }, // 15100/12277 exif - { "aperture": 1.6, "scale_factor": 1.100 }, // guessed - { "aperture": 1.8, "scale_factor": 1.050 }, // 14372/13583 - 13283 - { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 - 12973 - { "aperture": 2.2, "scale_factor": 1.015 }, // 13808/13583 - 12766 - { "aperture": 2.5, "scale_factor": 1.007 }, // 13696/13583 - 12662 - { "aperture": 2.8, "scale_factor": 1.007 }, // 13696/13583 - 12663 - { "aperture": 3.2, "scale_factor": 1.000 }, // 13583/13583 - 12559 - { "aperture": 3.5, "scale_factor": 1.000 } - ] - } + /* no scale factors known for f/1.6, f/1.0 (had no lenses to test with) */ + { "aperture": 1.4, "scale_factor": 1.200 }, // 15100/12277 Exif + { "aperture": 1.6, "scale_factor": 1.100 }, // guessed + { "aperture": 1.8, "scale_factor": 1.050 }, // 14372/13583 - 13283 + { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 - 12973 + { "aperture": 2.2, "scale_factor": 1.015 }, // 13808/13583 - 12766 + { "aperture": 2.5, "scale_factor": 1.007 }, // 13696/13583 - 12662 + { "aperture": 2.8, "scale_factor": 1.007 }, // 13696/13583 - 12663 + { "aperture": 3.2, "scale_factor": 1.000 }, // 13583/13583 - 12559 + { "aperture": 3.5, "scale_factor": 1.000 } + ] + } }, { // Quality A - ISO and aperture WL data by Ilias at Avclub gr forums @@ -652,7 +570,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 30, 18, 3908, 2602 ], "masked_areas": [ 20, 2, 2616, 20 ], "ranges": { - "white": [ + "white": [ { "iso": 100, "levels": 13700 }, // typical 13825 { "iso": [ 125, 250, 500, 1000, 3200 ], "levels": 16280 }, // typical 16383 { "iso": [ 160, 320, 640 ], "levels": 12600 }, // typical 12744 @@ -660,118 +578,122 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 800, "levels": 15900 }, // gaussian histogram 15900-16224 { "iso": 1600, "levels": 14900 }, // gaussian histogram 14900-15750 { "iso": 1250, "levels": 11900 } // gaussian histogram 11900-12500 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12700 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.265 }, // 16142/12744 - { "aperture": 1.6, "scale_factor": 1.145 }, // 15872/13825 - { "aperture": 1.8, "scale_factor": 1.090 }, // 15103/13825 - { "aperture": 2.0, "scale_factor": 1.035 }, // 14334/13825 - { "aperture": 2.2, "scale_factor": 1.005 }, // 13950/13825 - { "aperture": 2.5, "scale_factor": 1.000 } // 13825/13825 + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12700 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.265 }, // 16142/12744 + { "aperture": 1.6, "scale_factor": 1.145 }, // 15872/13825 + { "aperture": 1.8, "scale_factor": 1.090 }, // 15103/13825 + { "aperture": 2.0, "scale_factor": 1.035 }, // 14334/13825 + { "aperture": 2.2, "scale_factor": 1.005 }, // 13950/13825 + { "aperture": 2.5, "scale_factor": 1.000 } // 13825/13825 ] - } + } }, + { // Quality A, ISO and aperture WL data by Ayshih at Magic Lantern forums "make_model": "Canon EOS 50D", "dcraw_matrix": [ 4920,616,-593,-6493,13964,2784,-1774,3178,7005 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13300 }, // typical 13432 { "iso": [ 160, 320, 640, 1250 ], "levels": 12700 }, // typical 12790-12810 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 2500, 3200 ], "levels": 15630 }, // typical 15763-15733 { "iso": [ 6400, 12800 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - { "aperture": 1.4, "scale_factor": 1.270 }, - { "aperture": 1.6, "scale_factor": 1.150 }, - { "aperture": 1.8, "scale_factor": 1.090 }, - { "aperture": 2.0, "scale_factor": 1.040 }, - { "aperture": 2.2, "scale_factor": 1.020 }, - { "aperture": 2.5, "scale_factor": 1.010 }, - { "aperture": 2.8, "scale_factor": 1.000 }, - { "aperture": 3.2, "scale_factor": 1.000 } + { "aperture": 1.4, "scale_factor": 1.270 }, + { "aperture": 1.6, "scale_factor": 1.150 }, + { "aperture": 1.8, "scale_factor": 1.090 }, + { "aperture": 2.0, "scale_factor": 1.040 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.010 }, + { "aperture": 2.8, "scale_factor": 1.000 }, + { "aperture": 3.2, "scale_factor": 1.000 } ] - } + } }, + { // Quality A, ISO and aperture WL data copyed from Shalrath's 60D data at RawTherapee forums "make_model": "Canon EOS 60Da", "dcraw_matrix": [ 17492,-7240,-2023,-1791,10323,1701,-186,1329,5406 ], // 60Da dng d65 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 - { "aperture": 1.6, "scale_factor": 1.200 }, - { "aperture": 1.8, "scale_factor": 1.140 }, - { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 - { "aperture": 2.2, "scale_factor": 1.060 }, - { "aperture": 2.5, "scale_factor": 1.050 }, - { "aperture": 2.8, "scale_factor": 1.030 }, - { "aperture": 3.2, "scale_factor": 1.015 }, - { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 + { "aperture": 1.6, "scale_factor": 1.200 }, + { "aperture": 1.8, "scale_factor": 1.140 }, + { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 + { "aperture": 2.2, "scale_factor": 1.060 }, + { "aperture": 2.5, "scale_factor": 1.050 }, + { "aperture": 2.8, "scale_factor": 1.030 }, + { "aperture": 3.2, "scale_factor": 1.015 }, + { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible ] - } + } }, + { // Quality A, ISO and aperture WL data by Shalrath at RawTherapee forums "make_model": "Canon EOS 60D", "dcraw_matrix": [ 6719,-994,-925,-4408,12426,2211,-887,2129,6051 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 - { "aperture": 1.6, "scale_factor": 1.200 }, - { "aperture": 1.8, "scale_factor": 1.140 }, - { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 - { "aperture": 2.2, "scale_factor": 1.060 }, - { "aperture": 2.5, "scale_factor": 1.050 }, - { "aperture": 2.8, "scale_factor": 1.030 }, - { "aperture": 3.2, "scale_factor": 1.015 }, - { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 + { "aperture": 1.6, "scale_factor": 1.200 }, + { "aperture": 1.8, "scale_factor": 1.140 }, + { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 + { "aperture": 2.2, "scale_factor": 1.060 }, + { "aperture": 2.5, "scale_factor": 1.050 }, + { "aperture": 2.8, "scale_factor": 1.030 }, + { "aperture": 3.2, "scale_factor": 1.015 }, + { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible ] - } + } }, + { // Quality B, more aperture scale factors needed "make_model": "Canon EOS 70D", "dcraw_matrix": [ 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 ], // DNG D65 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12450 }, // typical 12559 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 10000 ], "levels": 15200 }, // typical 15303 - ISO 8000-10000 guessed { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but even with the - 12500 white levels nearly maxes out for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.240 }, // guessed - { "aperture": 1.6, "scale_factor": 1.160 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 31of35 - { "aperture": 2.0, "scale_factor": 1.060 }, // guessed - { "aperture": 2.2, "scale_factor": 1.030 }, // guessed - { "aperture": 2.5, "scale_factor": 1.015 }, // guessed - { "aperture": 2.8, "scale_factor": 1.008 }, // 15432/15303 - { "aperture": 3.2, "scale_factor": 1.000 }, - { "aperture": 3.5, "scale_factor": 1.000 } + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but even with the + // 12500 white levels nearly maxes out for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.240 }, // guessed + { "aperture": 1.6, "scale_factor": 1.160 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 31of35 + { "aperture": 2.0, "scale_factor": 1.060 }, // guessed + { "aperture": 2.2, "scale_factor": 1.030 }, // guessed + { "aperture": 2.5, "scale_factor": 1.015 }, // guessed + { "aperture": 2.8, "scale_factor": 1.008 }, // 15432/15303 + { "aperture": 3.2, "scale_factor": 1.000 }, + { "aperture": 3.5, "scale_factor": 1.000 } ] - } + } }, { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed @@ -780,107 +702,107 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 264, 34, 6024, 4022 ], // full size 6288x4056, official crop 276,46,6275,4045 "masked_areas": [ 40, 96, 4000, 260 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125, 200, 250 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 { "iso": [ 160 ], "levels": 13000 }, // nominal 13097, { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // G1,G2 13415 { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 { "iso": [ 6400, 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243, LENR B 16000 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: need for more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } }, -// Canon Mid category DSLRs (Rebels) +// Canon mid-range DSLRs (Rebels) - { // Quality b, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed + { // Quality B, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], "dcraw_matrix": [ 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 ], // dcraw 550d "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.250 }, // guessed - { "aperture": 1.6, "scale_factor": 1.150 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 - { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 - { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 - { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 - { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 - { "aperture": 3.2, "scale_factor": 1.015 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible - ] - } + // no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.250 }, // guessed + { "aperture": 1.6, "scale_factor": 1.150 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 + { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 + { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 + { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 + { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 + { "aperture": 3.2, "scale_factor": 1.015 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible + ] + } }, - { // Quality b, scaling factors missing but guessed safely + { // Quality B, scaling factors missing but guessed safely "make_model": [ "Canon EOS 600D", "Canon EOS Rebel T3i", "Canon EOS Kiss X5", "Canon EOS 1200D", "Canon EOS Rebel T5", "Canon EOS Kiss X70" ], - // "dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed + //"dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed "dcraw_matrix": [ 6461,-907,-882,-4300,12184,2378,-819,1944,5931 ], // dcp D65 colormatrix2 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data - { "aperture": 1.6, "scale_factor": 1.190 }, // guessed - { "aperture": 1.8, "scale_factor": 1.140 }, // guessed - { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 - { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 - { "aperture": 2.5, "scale_factor": 1.050 }, // guessed - { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 - { "aperture": 3.2, "scale_factor": 1.000 } // + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data + { "aperture": 1.6, "scale_factor": 1.190 }, // guessed + { "aperture": 1.8, "scale_factor": 1.140 }, // guessed + { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 + { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 + { "aperture": 2.5, "scale_factor": 1.050 }, // guessed + { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 + { "aperture": 3.2, "scale_factor": 1.000 } // ] - } + } }, { // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS Kiss X6i", "Canon EOS 700D", "Canon EOS Rebel T5i", "Canon EOS Kiss X7i" ], "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000 ], "levels": 15200 }, // typical 15303 { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.200 }, // 16332/13583 - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // 14372/13583 - { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 - { "aperture": 2.2, "scale_factor": 1.025 }, // 13921/13583 - { "aperture": 2.5, "scale_factor": 1.020 }, // - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 } // + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.200 }, // 16332/13583 + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // 14372/13583 + { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 + { "aperture": 2.2, "scale_factor": 1.025 }, // 13921/13583 + { "aperture": 2.5, "scale_factor": 1.020 }, // + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 } // ] - } + } }, { // Quality C, aperture scale factors and intermediate ISOs missing but safely guessed @@ -889,93 +811,93 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 72, 34, 6024, 4022 ], // full size 6096x4056, official crop 84,46,6083,4045 "masked_areas": [ 40, 16, 4000, 54 ], "ranges": { - "white": [ - { "iso": [ 100, 125 ], "levels": 13300 }, // typical 13583 - { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12600 - { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 - { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000 ], "levels": 15100 }, // typical 15303 - { "iso": 25600, "levels": 16300 } // typical 16383 - ], - "white_max": 16383, + "white": [ + { "iso": [ 100, 125 ], "levels": 13300 }, // typical 13583 + { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12600 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 + { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000 ], "levels": 15100 }, // typical 15303 + { "iso": 25600, "levels": 16300 } // typical 16383 + ], + "white_max": 16383, "aperture_scaling": [ - /* note: all scale factors are guessed to be same as 7DII */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.100 }, // guessed - { "aperture": 1.8, "scale_factor": 1.050 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.015 }, // guessed - { "aperture": 2.5, "scale_factor": 1.007 }, // guessed - { "aperture": 2.8, "scale_factor": 1.007 }, // guessed - { "aperture": 3.2, "scale_factor": 1.000 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } - ] - } + // all scale factors are guessed to be same as 7DII + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.100 }, // guessed + { "aperture": 1.8, "scale_factor": 1.050 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.015 }, // guessed + { "aperture": 2.5, "scale_factor": 1.007 }, // guessed + { "aperture": 2.8, "scale_factor": 1.007 }, // guessed + { "aperture": 3.2, "scale_factor": 1.000 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } + ] + } }, -// Canon Low End DSLRs +// Canon low-range DSLRs // Canon EOS 1200D/Rebel T5/Kiss X70" is upper at the same item as 600D/T3i/X5 { // Quality B, integer ISOs measured, intermediate ISO samples missing, - // scaling factors safely guessed to be same as 1200D .. + // scaling factors safely guessed to be same as 1200D "make_model": [ "Canon EOS 1300D", "Canon EOS Rebel T6", "Canon EOS Kiss X80" ], - "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // Dcraw 9.27 + "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // dcraw 9.27 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data - { "aperture": 1.6, "scale_factor": 1.190 }, // guessed - { "aperture": 1.8, "scale_factor": 1.140 }, // guessed - { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 - { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 - { "aperture": 2.5, "scale_factor": 1.050 }, // guessed - { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data + { "aperture": 1.6, "scale_factor": 1.190 }, // guessed + { "aperture": 1.8, "scale_factor": 1.140 }, // guessed + { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 + { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 + { "aperture": 2.5, "scale_factor": 1.050 }, // guessed + { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // ] - } + } }, -// Canon Mirrorless with Interchangable Lens +// Canon MILC (mirrorless interchangeable-lens camera) { // Quality B, missing scaling factors are guessed safely from 650D relative data "make_model": "Canon EOS M", "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000 ], "levels": 15200 }, // typical 15303 { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // 15821/15303 - { "aperture": 2.2, "scale_factor": 1.025 }, // 15691/15303 - { "aperture": 2.5, "scale_factor": 1.020 }, // 12947/12650 - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // 15821/15303 + { "aperture": 2.2, "scale_factor": 1.025 }, // 15691/15303 + { "aperture": 2.5, "scale_factor": 1.020 }, // 12947/12650 + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } }, { // Quality C, inconsistent WL per ISO, missing scaling factors "make_model": "Canon EOS M10", "dcraw_matrix": [ 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 ], // DNGv9.3 D65 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125, 160, 320, 500, 2000, 4000, 6400 ], "levels": 16300 }, // typical 16383 { "iso": 200, "levels": 12900 }, // typical 12940-15570-15376 { "iso": 250, "levels": 14100 }, // typical 14200 @@ -987,93 +909,93 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 3200, "levels": 15000 }, // typical 15080-16383-16100-13660 { "iso": 5000, "levels": 12800 }, // typical 12840 { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: all scale factors are copied from EOS M3 */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // all scale factors are copied from EOS M3 */ + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } }, - { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed + { // Quality C, white levels not properly indicated, aperture scaling..missing scaling factors are guessed "make_model": "Canon EOS M3", "dcraw_matrix": [ 6362,-823,-847,-4426,12109,2616,-743,1857,5635 ], // DNG_V8.8 D65 "raw_crop": [ 72, 34, 6024, 4022 ], // full size 6096x4056, official crop 84,46,6083,4045 "masked_areas": [ 40, 16, 4000, 54 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125, 160 ], "levels": 16300 }, // 16383 { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12600 }, // 12632..14500 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15000 }, // 15095, 15488 { "iso": [ 6400, 8000, 12800, 25600 ], "levels": 16200 } // 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: need for more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } }, // Canon Powershot - { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out + { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out "make_model": "Canon PowerShot A480", "dcraw_matrix": [ 8275,-2905,-1261,-128,5305,505,52,482,2450 ], // DNG_CHDK_V1.3.0 Daylight - // "dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed + //"dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed "raw_crop": [ 6, 12, 3684, 2760 ], // full size 3720X2772, official Canon crop 3648x2736 "masked_areas": [ 12, 3694, 2760, 3716 ], // only left side optically black area is considered "ranges": { "white": 4080 } }, - { // Quality B, experimental infrared support commented out + { // Quality B, experimental infrared support commented out "make_model": "Canon PowerShot G9", "dcraw_matrix": [ 7368,-2141,-598,-5621,13254,2625,-1419,1696,5743 ], // DNG_V8.7 D65 - // "dcraw_matrix": [ 8796,-3770,311,-4148,11362,3197,-598,983,5880 ], // DNG_V8.7 A - // "dcraw_matrix": [ 15669,-8084,-2453,-2940,5756,101,126,-401,2463 ], // Infrared guessed 111 - // "dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed - "ranges": { "white": 4080 } + //"dcraw_matrix": [ 8796,-3770,311,-4148,11362,3197,-598,983,5880 ], // DNG_V8.7 A + //"dcraw_matrix": [ 15669,-8084,-2453,-2940,5756,101,126,-401,2463 ], // Infrared guessed 111 + //"dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed + "ranges": { "white": 4080 } }, - { // Quality A, changes for raw crop which is optimistic in Dcraw + { // Quality A, changes for raw crop which is optimistic in dcraw "make_model": "Canon PowerShot G12", "dcraw_matrix": [ 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 ], - // "raw_crop": [ 62, 18, 3666, 2748 ],// max usable + //"raw_crop": [ 62, 18, 3666, 2748 ],// max usable "raw_crop": [ 68, 20, 3656, 2744 ],// equal to official Canon frame, 72,24,3719,2759 = 3648x2736 "masked_areas": [ 24, 40, 2770, 44 ],// as declared in maker data "ranges": { "white": 4080 } // }, - { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, - for the moment just comment-uncomment the desired raw crop */ + { // Quality B, needs a way to auto apply 3/2 or 4/3 crops (read Exif tags ..) to work better with auto distortion, + // for the moment just comment-uncomment the desired raw crop "make_model": "Canon PowerShot G1 X Mark II", "dcraw_matrix": [ 7378,-1255,-1043,-4088,12251,2048,-876,1946,5805 ], // D65 matrix from adobe dcp - // "raw_crop": [ 80, 50, 4400, 3316 ], // full frame 4480x3366 borders 80,50 - much shade in corners, no/wrong auto distortion - // "raw_crop": [ 104, 144, 4360, 3128 ], // Mixed best average frame, width is 4352 from 3/2, height 3120 from 4/3 - auto distortion does not work correctly - // "raw_crop": [ 200, 144, 4168, 3128 ], // Optional official 4/3 frame 4160x3120, 4pix borders, Left Border 204-4, Top Border 148-4 - "raw_crop": [ 104, 252, 4360, 2912 ], // Default official 3/2 frame 4352X2904, 4pix borders, Left Border 108-4, Top border 256-4 + //"raw_crop": [ 80, 50, 4400, 3316 ], // full frame 4480x3366 borders 80,50 - much shade in corners, no/wrong auto distortion + //"raw_crop": [ 104, 144, 4360, 3128 ], // Mixed best average frame, width is 4352 from 3/2, height 3120 from 4/3 - auto distortion does not work correctly + //"raw_crop": [ 200, 144, 4168, 3128 ], // Optional official 4/3 frame 4160x3120, 4pix borders, Left Border 204-4, Top Border 148-4 + "raw_crop": [ 104, 252, 4360, 2912 ], // Default official 3/2 frame 4352x2904, 4pix borders, Left Border 108-4, Top border 256-4 "masked_areas": [ 148, 2, 3340, 78 ], "ranges": { "white": 16300 } }, - { // Quality B, + { // Quality B "make_model": "Canon PowerShot G3 X", "dcraw_matrix": [ 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 ], // DNG_V9.1.1 D65 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 @@ -1081,25 +1003,25 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 16300 } }, - { // Quality B, + { // Quality B "make_model": [ "Canon PowerShot G7 X", "Canon PowerShot G7 X Mark II" ], "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 - // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 + //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 4080 } }, - { // Quality B, + { // Quality B "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X" ], "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 - // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 + //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 16300 } }, - { // Quality A, changes for raw crop which is wrong (larger) in Dcraw + { // Quality A, changes for raw crop which is wrong (larger) in dcraw "make_model": "Canon PowerShot S120", "dcraw_matrix": [ 6961,-1685,-695,-4625,12945,1836,-1114,2152,5518 ], "raw_crop": [ 120, 30, 4024, 3030 ], @@ -1120,48 +1042,49 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 12297,-4882,-1202,-2106,10691,1623,-88,1312,4790 ] // DNG_v8.5 D65 }, - { // Quality B, + { // Quality B "make_model": [ "FUJIFILM X100S", "FUJIFILM X100T" ], "dcraw_matrix": [ 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 ], // DNG_v8.7 D65 "ranges": { "white": 16100 } - }, - { // Quality B, + }, + + { // Quality B "make_model": "FUJIFILM X70", "dcraw_matrix": [ 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 ], // DNG_v9.4 D65 - // "raw_crop": [ 4, 0, 4988, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + //"raw_crop": [ 4, 0, 4988, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop "ranges": { "white": 16100 } - }, + }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-A2", "dcraw_matrix": [ 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 ], // DNG D65 "ranges": { "white": 4050 } }, - { // Quality B + { // Quality B "make_model": [ "FUJIFILM X-T1", "FUJIFILM X-T10", "FUJIFILM X-E2" ], "dcraw_matrix": [ 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 ], // DNG D65 -// "dcraw_matrix": [ 9289,-3279,-632,-3539,11137,2758,-1049,1950,6544 ], // X-RITE D55 -// "raw_crop": [ 4, 0, 4936, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + //"dcraw_matrix": [ 9289,-3279,-632,-3539,11137,2758,-1049,1950,6544 ], // X-RITE D55 + //"raw_crop": [ 4, 0, 4936, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop "ranges": { "white": 16100 } }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-E2S", "dcraw_matrix": [ 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 ], // DNG_v9.4 D65 "ranges": { "white": 16100 } }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-PRO1", "dcraw_matrix": [ 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 ], // DNG_v9.4 D65 "ranges": { "white": 4080 } }, - { // Quality B + { // Quality B "make_model": [ "FUJIFILM X-PRO2", "FUJIFILM X-T2" ], "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 - // "raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop + //"raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop "ranges": { "white": 16100 } }, @@ -1182,6 +1105,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 10068,-4043,-1068,-5319,14268,1044,-765,1701,6522 ], // DCP D65 "raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000 }, + { // Quality B, Matrix from Adobe's dcp D65 instead of the internal in Leica's DNG "make_model": "LEICA SL (Typ 601)", "dcraw_matrix": [ 11492,-4930,-1188,-5593,14673,873,-609,1474,6343 ], // DNGv9.3 D65 @@ -1198,224 +1122,230 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality A "make_model": [ "Nikon 1 V3", "Nikon 1 J4" ], // Same format "dcraw_matrix": [ 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 ], // matrix from DNG_v8.5 d65 - // "dcraw_matrix": [ 5306,-1066,-469,-3865,11189,3076,-399,1341,5120 ], // matrix dXo D50, - "ranges": { "white": 4080 } // Black is auto extracted from exif, lower WL to 4080 from 4095 due to some non linearity detected at raw highlights + //"dcraw_matrix": [ 5306,-1066,-469,-3865,11189,3076,-399,1341,5120 ], // matrix dXo D50, + "ranges": { "white": 4080 } // Black is auto extracted from Exif, lower WL to 4080 from 4095 due to some non linearity detected at raw highlights }, - { // Quality B, + { // Quality B "make_model": "Nikon 1 J5", // "dcraw_matrix": [ 7520,-2518,-645,-3844,12102,1945,-913,2249,6835 ], // DNG_v9.1 D65 - // "dcraw_matrix": [ 7651,-2102,-751,-3299,11101,1651,-1011,2242,5770 ], // matrix from ICC converted to Dcraw format XYZ on ImagingResource stillife sample + //"dcraw_matrix": [ 7651,-2102,-751,-3299,11101,1651,-1011,2242,5770 ], // matrix from ICC converted to dcraw format XYZ on ImagingResource still life sample "ranges": { - "white": [ - { "iso": [ 160, 200 ], "levels": 4000 }, // typical G1/G2 4020-4028, R/B 4088 - { "iso": [ 400, 800, 1600, 3200 ], "levels": 4000 }, // g1/g2 4030-4040, r/b 4088 - { "iso": [ 6400, 12800 ], "levels": 4080 } // 4090 - ] - } + "white": [ + { "iso": [ 160, 200 ], "levels": 4000 }, // typical G1/G2 4020-4028, R/B 4088 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4000 }, // g1/g2 4030-4040, r/b 4088 + { "iso": [ 6400, 12800 ], "levels": 4080 } // 4090 + ] + } }, - { // Quality A, + { // Quality A "make_model": "Nikon 1 S2", // "dcraw_matrix": [ 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 ], // matrix from DNG_v8.5 d65 - "ranges": { "white": 4080 } // BL autodetected from exif + "ranges": { "white": 4080 } // BL autodetected from Exif }, -// For all Nikon Dslrs which have multiple bitdepth options (14 and 12 bit) we define the 14-bit value and RT adapts it to 12-bit +// For all Nikon DSLRs which have multiple bitdepth options (14- and 12-bit) we define the 14-bit value and RT adapts it to 12-bit // when a 12-bit bitdepth is detected (WL12 = WL14*4095/16383) - { // quality B, samples by Johan Thor at RT.Issues, measures at long exposures with LENR are missing - // but a safety margin is included - aperture scaling makes no significant difference - "make_model": "Nikon D3S", - "dcraw_matrix": [ 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 ], // dcp d65 - "ranges": { - "white": [ - { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500 ], "levels": 15520 }, // typical G1,G2 15520-15800 R,B 16383 - { "iso": [ 640, 800, 1000, 1250 ], "levels": 15400 }, // typical G1,G2 15520-15800, R,B 16383 - { "iso": [ 1600, 2000, 2500 ], "levels": 15300 }, // typical G1,G2 15520-15800, R,B 16383 - { "iso": [ 3200, 4000, 5000, 6400 ], "levels": 15300 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 8000, 10000 ], "levels": 15000 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 12800, 16000 ], "levels": 14500 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 20000, 25600 ], "levels": 13300 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 51200, 102400 ], "levels": 12000 } // typical G1,G1 16270-16350, R,B 16383 - ], - "white_max": 16383 - } + { // Quality B, samples by Johan Thor at RT.Issues, measures at long exposures with LENR are missing + // but a safety margin is included - aperture scaling makes no significant difference + "make_model": "Nikon D3S", + "dcraw_matrix": [ 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 ], // dcp d65 + "ranges": { + "white": [ + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500 ], "levels": 15520 }, // typical G1,G2 15520-15800 R,B 16383 + { "iso": [ 640, 800, 1000, 1250 ], "levels": 15400 }, // typical G1,G2 15520-15800, R,B 16383 + { "iso": [ 1600, 2000, 2500 ], "levels": 15300 }, // typical G1,G2 15520-15800, R,B 16383 + { "iso": [ 3200, 4000, 5000, 6400 ], "levels": 15300 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 8000, 10000 ], "levels": 15000 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 12800, 16000 ], "levels": 14500 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 20000, 25600 ], "levels": 13300 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 51200, 102400 ], "levels": 12000 } // typical G1,G1 16270-16350, R,B 16383 + ], + "white_max": 16383 + } }, - { // quality B, intermediate ISO samples missing + + { // Quality B, intermediate ISO samples missing "make_model": "Nikon D500", "dcraw_matrix": [ 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 ], // DNG_v9.5 D65 "ranges": { - "white": [ // measured at integer ISOs. Safety margin per ISO groups according to expected WL spread after LENR - { "iso": [ 100, 200, 400, 800, 1600 ], "levels": [ 16300, 16100, 16300 ] }, // typical G1,G2 16180 R,B 16383 - { "iso": [ 3200, 6400 ], "levels": [ 16250, 16050, 16250 ] }, // typical G1,G2,16200 R,B 16383 - { "iso": [ 12800, 25600 ], "levels": 16000 }, // typical G1,G2, R,B 16383 - { "iso": [ 51200, 102400 ], "levels": 15800 }, // typical G1,G2, R,B 16383 - { "iso": [ 204800, 409600 ], "levels": 15500 }, // typical G1,G2,R,B 16383 - { "iso": [ 819200, 1638400 ], "levels": 15000 } // typical G1,G2, R,B 16383 - ], - "white_max": 16383 - } - }, + "white": [ // measured at integer ISOs. Safety margin per ISO groups according to expected WL spread after LENR + { "iso": [ 100, 200, 400, 800, 1600 ], "levels": [ 16300, 16100, 16300 ] }, // typical G1,G2 16180 R,B 16383 + { "iso": [ 3200, 6400 ], "levels": [ 16250, 16050, 16250 ] }, // typical G1,G2,16200 R,B 16383 + { "iso": [ 12800, 25600 ], "levels": 16000 }, // typical G1,G2, R,B 16383 + { "iso": [ 51200, 102400 ], "levels": 15800 }, // typical G1,G2, R,B 16383 + { "iso": [ 204800, 409600 ], "levels": 15500 }, // typical G1,G2,R,B 16383 + { "iso": [ 819200, 1638400 ], "levels": 15000 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } + }, - { // quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max + { // Quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D7000", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], // matrix provided by Tanveer(tsk1979) "ranges": { - // measured at ISO 100. ISO differences not measured, but known to exist - "white": [ 16300, 15700, 16300 ], // typical R 16383, G 15778, B 16383 - "white_max": 16383 - // aperture scaling not measured, but known to exist, at f/1.8 the G channels hits white_max - } + // measured at ISO 100. ISO differences not measured, but known to exist + "white": [ 16300, 15700, 16300 ], // typical R 16383, G 15778, B 16383 + "white_max": 16383 + // aperture scaling not measured, but known to exist, at f/1.8 the G channels hits white_max + } }, - { // quality B, + + { // Quality B "make_model": "NIKON COOLPIX A", "dcraw_matrix": [ 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 ], // dng_d65 "ranges": { - "white": [ - { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800 ], "levels": [ 16300, 15700, 16300 ] }, // typical G1,G2 15760-15800 R,B 16383 - { "iso": [ 1000, 1250, 1600, 2000, 2500, 3200 ], "levels": 16300 }, // typical G1,G2, R,B 16383 - { "iso": [ 4000, 5000, 6400 ], "levels": 16200 }, // typical G1,G2, R,B 16383 - { "iso": [ 8000, 10000, 12800 ], "levels": 16000 }, // typical G1,G2,R,B 16383 - { "iso": [ 16000, 20000, 25600 ], "levels": 15700 } // typical G1,G2, R,B 16383 - ], - "white_max": 16383 - } + "white": [ + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800 ], "levels": [ 16300, 15700, 16300 ] }, // typical G1,G2 15760-15800 R,B 16383 + { "iso": [ 1000, 1250, 1600, 2000, 2500, 3200 ], "levels": 16300 }, // typical G1,G2, R,B 16383 + { "iso": [ 4000, 5000, 6400 ], "levels": 16200 }, // typical G1,G2, R,B 16383 + { "iso": [ 8000, 10000, 12800 ], "levels": 16000 }, // typical G1,G2,R,B 16383 + { "iso": [ 16000, 20000, 25600 ], "levels": 15700 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } }, - { // Quality B, NO LENR SAMPLES - "make_model": "Nikon D5", - "dcraw_matrix": [ 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 ], // adobe dng_v9.5 d65 - "ranges": { "black": 0, "white": 16300 } // WL typical 16383 set to 16300 for safety + { // Quality B, no LENR samples + "make_model": "Nikon D5", + "dcraw_matrix": [ 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 ], // adobe dng_v9.5 d65 + "ranges": { "black": 0, "white": 16300 } // WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D3400", - "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v9.7 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety + "make_model": "Nikon D3400", + "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v9.7 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D5300", - "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v8.8 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety + "make_model": "Nikon D5300", + "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v8.8 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D5500", - "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety + "make_model": "Nikon D5500", + "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.0 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D7200", - "dcraw_matrix": [ 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, + "make_model": "Nikon D7200", + "dcraw_matrix": [ 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 ], // adobe dng_v9.0 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, }, - { // quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction - // aperture scaling known to exist, but little to gain as the levels are so close to white_max + { // Quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction + // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D600", "dcraw_matrix": [ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 ], // dcp d65 - // "raw_crop": [ 0, 0, 6034, 4028 ], // dcraw + //"raw_crop": [ 0, 0, 6034, 4028 ], // dcraw "ranges": { "white": [ - { "iso": [ 50, 100 ], "levels": [ 15800, 15800, 15350 ] }, // typical G1/G2/R 15879, B 15395-15670 lowered to 15800, 15350, 3969 B3917 - { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 - { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12-bit lossless r4095, 3981-10, b4041- 12-bit lossy r,g1,g2 3961 - b3917, - { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 - { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 - ], - "white_max": 16383 - } - }, - { // quality B, missing WL measures at intermediate ISOs (160-250-320 ..) and at long exposures with LongExposureNoiseReduction set to ON - // aperture scaling known to exist, but little to gain as the levels are so close to white_max + { "iso": [ 50, 100 ], "levels": [ 15800, 15800, 15350 ] }, // typical G1/G2/R 15879, B 15395-15670 lowered to 15800, 15350, 3969 B3917 + { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 + { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12-bit lossless r4095, 3981-10, b4041- 12-bit lossy r,g1,g2 3961 - b3917, + { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 + { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 + ], + "white_max": 16383 + } + }, + + { // Quality B, missing WL measures at intermediate ISOs (160-250-320 ..) and at long exposures with LongExposureNoiseReduction set to ON + // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D610", "dcraw_matrix": [ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 ], // dcp d65 "raw_crop": [ 0, 0, 6034, 4028 ], "ranges": { "white": [ - { "iso": [ 50, 100 ], "levels": [ 15800, 15700, 15800 ] }, // typical G1/G2 15778, R/B 15879 lowered to 15700, 15800 for possible WL distribution under LENR - { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 - { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 - { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 - ], - "white_max": 16383 - } - }, + { "iso": [ 50, 100 ], "levels": [ 15800, 15700, 15800 ] }, // typical G1/G2 15778, R/B 15879 lowered to 15700, 15800 for possible WL distribution under LENR + { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 + { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 + { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 + ], + "white_max": 16383 + } + }, - { // quality B; Data from RusselCottrell at RT forums. sensor is not uniform + { // Quality B, data from RusselCottrell at RT forums. sensor is not uniform "make_model": "Nikon D700", "dcraw_matrix": [ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 ], - // "dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illuminant A + //"dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illuminant A "ranges": { "white": [ 15500, 15500, 15500 ] } - // Non linearities start at 15500 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 - // white 15500 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15500*4095/16383=3874 - }, + // Non linearities start at 15500 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 + // white 15500 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15500*4095/16383=3874 + }, - { // Quality B, - "make_model": "Nikon D750", - "dcraw_matrix": [ 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 ], // adobe dcp d65 DNGv8.7 - "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. TypicalWL 16383 set to 16300 for safety - }, + { // Quality B, + "make_model": "Nikon D750", + "dcraw_matrix": [ 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 ], // adobe dcp d65 DNGv8.7 + "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. TypicalWL 16383 set to 16300 for safety + }, - { // quality B; Data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop + { // Quality B, data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop "make_model": "Nikon D800E", "dcraw_matrix": [ 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 ], // D800/D800E from dcraw.c "ranges": { "white": [ - { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250 ], "levels": [ 16300, 15700, 16300 ] }, // 15779-15781 - { "iso": [ 1600 ], "levels": 16000 }, // 16085-16113 - { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 16300 } // 16383 - ] - } - }, - { // quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250 ], "levels": [ 16300, 15700, 16300 ] }, // 15779-15781 + { "iso": [ 1600 ], "levels": 16000 }, // 16085-16113 + { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 16300 } // 16383 + ] + } + }, + + { // Quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR "make_model": "Nikon D810", "dcraw_matrix": [ 9369,-3195,-791,-4488,12430,2301,-893,1796,6872 ], // dcp_v8.6 d65 "raw_crop": [ 0, 0, 7380, 4928 ], // Official raw crop 7380x4928, "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. Typical WL at 16383 }, - { // Quality b, 16Mp and 64Mp raw frames + { // Quality B, 16Mp and 64Mp raw frames "make_model": "OLYMPUS E-M5MarkII", "dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // DNG_v8.8 D65 "raw_crop": [ 0, 0, -6, -6 ], // largest valid, full 64Mp 9280x6938, official crop 0 0 9216 6912 "ranges": { "white": [ - { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 - { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 - { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 - ] - } + { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 + { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 + ] + } }, + { // Quality B, 20Mp and 80Mp raw frames "make_model": "OLYMPUS PEN-F", "dcraw_matrix": [ 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 ], // dng_v9.5 D65 - // "raw_crop": [ 0, 0, 10372, -7780 ], // Highres mode largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 + //"raw_crop": [ 0, 0, 10372, -7780 ], // Highres mode largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 "ranges": { "white": [ - { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 - { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 - { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 - ] - } + { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 + { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 + ] + } }, - { // Quality b, missing per ISO samples + { // Quality B, missing per ISO samples "make_model": "OLYMPUS E-M1", "dcraw_matrix": [ 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 ], // dng d65 "ranges": { "white": 4080 } // nominal 4095-4094, spread with some settings as long exposure }, - { // Quality b, crop correction + { // Quality B, crop correction "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10MarkII" ], "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], "raw_crop": [ 0, 0, 4624, 3472 ], // largest valid - full frame is 4640x3472 -// "raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 + //"raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 "ranges": { "white": 4080 } }, + { // Quality A, white level correction "make_model": "OLYMPUS E-PM2", "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], @@ -1434,300 +1364,318 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4050 } // safe for worst case detected, nominal is 4093 }, - /* since Dcraw_v9.21 Panasonic base BL is read from exif (tags 0x001c BlackLevelRed15 is BL offset. - Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue - and we define here the needed offset of around 15. The total BL is base+offset */ +/* Since dcraw_v9.21 Panasonic base BL is read from Exif (tags 0x001c BlackLevelRed15 is BL offset. + dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue + and we define here the needed offset of around 15. The total BL is base+offset +*/ - { // Quality B, CameraPhone, some samples are missing but has the same sensor as FZ1000 .. + { // Quality B, CameraPhone, some samples are missing but has the same sensor as FZ1000 .. "make_model": [ "Panasonic DMC-CM1", "Panasonic DMC-CM10" ], "dcraw_matrix": [ 8770,-3194,-820,-2871,11281,1803,-513,1552,4434 ], // dcp_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 - { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 - { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } }, - { // Quality A , replicated from rawimage.cc + { // Quality A, replicated from rawimage.cc "make_model": "Panasonic DMC-FZ150", "dcraw_matrix": [ 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 ], // RT, copy from custom dcp d55 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, - { // Quality B, + { // Quality B, "make_model": [ "Panasonic DMC-FZ300", "Panasonic DMC-FZ330" ], "dcraw_matrix": [ 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 ], // DNG-V9.1.1 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, - { // Quality A, samples by helices at Rt forums + { // Quality A, samples by helices at RT forums "make_model": [ "Panasonic DMC-FZ1000", "Leica V-LUX (Typ 114)" ], "dcraw_matrix": [ 7830,-2696,-763,-3325,11667,1866,-641,1712,4824 ], // dcp_v8.6 d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 - { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 - { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } }, - { // Quality A, samples by helices at Rt forums and Chris Power at github + + { // Quality A, samples by helices at RT forums and Chris Power at github "make_model": [ "Panasonic DMC-ZS100", "Panasonic DMC-ZS110", "Panasonic DMC-TZ100", "Panasonic DMC-TZ101", "Panasonic DMC-TZ110", "Panasonic DMC-TX1" ], "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // dcp_v8.6 d65 - "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. + "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 Exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 - { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 - { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } }, - { // Quality A + + { // Quality A "make_model": [ "Panasonic DMC-LF1", "Leica C (Typ 112)" ], "dcraw_matrix": [ 9379,-3267,-816,-3227,11560,1881,-926,1928,5340 ], - "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, + { // Quality A "make_model": [ "Panasonic DMC-TZ60", "Panasonic DMC-TZ61", "Panasonic DMC-ZS40", "Panasonic DMC-ZS41" ], "dcraw_matrix": [ 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 ], // matrix from Adobe dcp v8.4 - "raw_crop": [ 8, 8, -8, -8 ], // crop according to exif 4896 X 3672 plus 4 pixels borders. RT's frame gets smaller than Dcraw but works better with auto distortion - "ranges": { "black": 14, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "raw_crop": [ 8, 8, -8, -8 ], // crop according to Exif 4896 X 3672 plus 4 pixels borders. RT's frame gets smaller than dcraw but works better with auto distortion + "ranges": { "black": 14, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, - { // Quality B, + + { // Quality B "make_model": [ "Panasonic DMC-TZ70", "Panasonic DMC-TZ71", "Panasonic DMC-ZS50", "Panasonic DMC-ZS51" ], "dcraw_matrix": [ 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 ], // DNG_V8.8 D65 - "raw_crop": [ 4, 4, -4, -4 ], // full raw 4/3 4144x3016 8,8,3008,4008 = 4000X3000. RT's frame gets smaller than Dcraw but works better with auto distortion + "raw_crop": [ 4, 4, -4, -4 ], // full raw 4/3 4144x3016 8,8,3008,4008 = 4000X3000. RT's frame gets smaller than dcraw but works better with auto distortion "ranges": { "black": 14, "white": 4050 } // 12+1+1 is BL offset }, - // Panasonic DMC-FZ150,G10,G1,G2,G3,G5,GF1,GF2,GF3 are included as overwrites of the same items of rawimage.cc to test the Dcraw9.21 patch +// Panasonic DMC-FZ150,G10,G1,G2,G3,G5,GF1,GF2,GF3 are included as overwrites of the same items of rawimage.cc to test the dcraw9.21 patch - { // Quality A, Replicated from rawimage.cc + { // Quality A, Replicated from rawimage.cc "make_model": [ "Panasonic DMC-G10", "Panasonic DMC-G2" ], "dcraw_matrix": [ 8310,-1811,-960,-4941,12990,2151,-1378,2468,6860 ], // Colin Walker "ranges": { - "black": 15, // 15 is black offset, Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:3967 distribution peak at 3967 +/- up to 50 - { "iso": [ 1600, 3200, 6400 ], "levels": 4060 } // exif 3967, histogram peak 4095 and distribution down to 4070 - ] - } - }, - { // Quality A, Replicated from rawimage.cc + "black": 15, // 15 is black offset, dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // Exif:3967 distribution peak at 3967 +/- up to 50 + { "iso": [ 1600, 3200, 6400 ], "levels": 4060 } // Exif 3967, histogram peak 4095 and distribution down to 4070 + ] + } + }, + + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G1", "dcraw_matrix": [ 7477,-1615,-651,-5016,12769,2506,-1380,2475,7240 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 - { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // Exif:4095 distribution peak at 3977 +/- up to 50 + { "iso": [ 1600, 3200 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G3", "dcraw_matrix": [ 6051,-1406,-671,-4015,11505,2868,-1654,2667,6219 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4060 } // Exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G5", "dcraw_matrix": [ 7122,-2092,-419,-4643,11769,3283,-1363,2413,5944 ], // RT "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4060 } // Exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF1", "dcraw_matrix": [ 7863,-2080,-668,-4623,12331,2578,-1020,2066,7266 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 - { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // Exif:4095 distribution peak at 3977 +/- up to 50 + { "iso": [ 1600, 3200 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF2", "dcraw_matrix": [ 7694,-1791,-745,-4917,12818,2332,-1221,2322,7197 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4050 } // Exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF3", "dcraw_matrix": [ 8074,-1846,-861,-5026,12999,2239,-1320,2375,7422 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4050 } // Exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GH1", "dcraw_matrix": [ 6360,-1557,-375,-4201,11504,3086,-1378,2518,5843 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 - { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // Exif:4095 distribution peak at 3982 +/- up to 50 + { "iso": [ 1600, 3200 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GH2", - // "dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater - "dcraw_matrix": [ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 ], // Dcraw d65 + // "dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater + "dcraw_matrix": [ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 ], // dcraw d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 - { "iso": [ 1600, 3200, 6400, 12800 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // Exif:4095 distribution peak at 3982 +/- up to 50 + { "iso": [ 1600, 3200, 6400, 12800 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, { // Quality B, variable WL "make_model": "Panasonic DMC-GH3", "dcraw_matrix": [ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 ], // dcp d65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 125, "levels": 3500 }, // gaussian 3600-4095 - { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 125, "levels": 3500 }, // gaussian 3600-4095 + { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, { // Quality B, some ISO WLevels are safely guessed "make_model": "Panasonic DMC-GH4", "dcraw_matrix": [ 7122,-2108,-512,-3155,11201,2231,-541,1423,5045 ], // dng_v8.5 d65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2700 }, // gaussian center at 2870-2920 range +/- 150, exif 2111 - { "iso": 125, "levels": 3100 }, // guessed - { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2700 }, // gaussian center at 2870-2920 range +/- 150, Exif 2111 + { "iso": 125, "levels": 3100 }, // guessed + { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality A, + { // Quality A "make_model": "Panasonic DMC-GM1", "dcraw_matrix": [ 6770,-1895,-744,-5232,13145,2303,-1664,2691,5703 ], "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 125, "levels": 3100 }, // bell shape 3150-3650 - exif 2616 - { "iso": 160, "levels": 3600 }, // guessed from relative GX7 data - { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 125, "levels": 3100 }, // bell shape 3150-3650 - Exif 2616 + { "iso": 160, "levels": 3600 }, // guessed from relative GX7 data + { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, { // Quality B, uncertainty about ISO100 WL "make_model": "Panasonic DMC-GM5", "dcraw_matrix": [ 8238,-3244,-679,-3921,11814,2384,-836,2022,5852 ], // dng_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2800 }, // bell shape 2850-3250 - exif 2111 - { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2800 }, // bell shape 2850-3250 - Exif 2111 + { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality A, + + { // Quality A "make_model": [ "Panasonic DMC-GX7", "Panasonic DMC-GF7", "Panasonic DMC-GF8" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 125, "levels": 3100 }, - { "iso": 160, "levels": 3600 }, - { "iso": [ 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 125, "levels": 3100 }, + { "iso": 160, "levels": 3600 }, + { "iso": [ 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality A, + { // Quality A "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.1 D65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality B, + + { // Quality B "make_model": [ "Panasonic DMC-GX80", "Panasonic DMC-GX85", "Panasonic DMC-GX7MK2" ], "dcraw_matrix": [ 7771,-3020,-629,-4029,11950,2345,-821,1977,6119 ],// DNG_v9.6 D65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, + { // Quality B, Same as Panasonic G7 "make_model": [ "Panasonic DMC-G8", "Panasonic DMC-G80", "Panasonic DMC-G81", "Panasonic DMC-G85" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.7 D65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality B, + + { // Quality B "make_model": "Panasonic DMC-GX8", "dcraw_matrix": [ 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 ], // DNG_v9.1.1 D65 "ranges": { - "black": 15, // 16 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2800 }, // gaussian 2900-3200 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // guessed gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 16 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2800 }, // gaussian 2900-3200 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // guessed gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, + { // Quality B, uncertainty about ISO 100 WL "make_model": [ "Panasonic DMC-LX100", "Leica D-LUX (Typ 109)" ], "dcraw_matrix": [ 8844,-3538,-768,-3709,11762,2200,-698,1792,5220 ], // DNG_V8.7 d65 - // "dcraw_matrix": [ 6538,-1614,-549,-5475,13096,2646,-1780,2799,5612 ], // calculated from DxO D50 + //"dcraw_matrix": [ 6538,-1614,-549,-5475,13096,2646,-1780,2799,5612 ], // calculated from DxO D50 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset. - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2400-2700 exif_linearitylimit 2111 - { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset. + "white": [ + { "iso": 100, "levels": 2300 }, // gaussian 2400-2700 Exif_linearitylimit 2111 + { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, + { // Quality C, Color matrix guessed, Intemediate ISOs missing "make_model": [ "Panasonic DMC-LX10", "Panasonic DMC-LX15" ], "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], //copy from TZ100 dcp_v8.6 d65 - "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. + "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 Exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset. - "white": [ - { "iso": 80, "levels": 2800 }, // gaussian 2800-3000 exif_linearitylimit 2626 - { "iso": 100, "levels": 3500 }, // gaussian 3500-3700 exif_linearitylimit 3277 - { "iso": [ 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4060 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset. + "white": [ + { "iso": 80, "levels": 2800 }, // gaussian 2800-3000 Exif_linearitylimit 2626 + { "iso": 100, "levels": 3500 }, // gaussian 3500-3700 Exif_linearitylimit 3277 + { "iso": [ 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4060 } // nominal 4095 + ] + } }, { // Quality B, per ISO info missing @@ -1739,36 +1687,36 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid "make_model": [ "RICOH PENTAX K-70", "PENTAX K-70" ], "dcraw_matrix": [ 8050,-2061,-1264,-4359,12953,1515,-1096,1965,6075 ], // PENTAX DNG D65 - "raw_crop": [ 58, 28, 6022, 4024 ], // full frame 6080x4064, cropped to official DNG raw_crop 28,58,6080,4052, official jpeg crop 6000x4000 + "raw_crop": [ 58, 28, 6022, 4024 ], // full frame 6080x4064, cropped to official DNG raw_crop 28,58,6080,4052, official jpeg crop 6000x4000 "ranges": { - "white": [ - { "iso": 100, "levels": 16300 }, // 16319-16377 - { "iso": 200, "levels": 16250 }, // 16319-16315 - { "iso": 400, "levels": 16200 }, // 16255-16251 - { "iso": 800, "levels": 16050 }, // 16255-16120 - { "iso": 1600, "levels": 15750 }, // 15860 - { "iso": [ 3200, 6400 ], "levels": 16200 }, // 16350 - { "iso": [ 12800, 25600 ], "levels": 16100 }, // 16300 - { "iso": [ 51200, 102400 ], "levels": 16000 } // 16200 - ] - } + "white": [ + { "iso": 100, "levels": 16300 }, // 16319-16377 + { "iso": 200, "levels": 16250 }, // 16319-16315 + { "iso": 400, "levels": 16200 }, // 16255-16251 + { "iso": 800, "levels": 16050 }, // 16255-16120 + { "iso": 1600, "levels": 15750 }, // 15860 + { "iso": [ 3200, 6400 ], "levels": 16200 }, // 16350 + { "iso": [ 12800, 25600 ], "levels": 16100 }, // 16300 + { "iso": [ 51200, 102400 ], "levels": 16000 } // 16200 + ] + } }, { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX K-3", "PENTAX K-3" ], "dcraw_matrix": [ 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 ], // adobe dcp d65 -// "dcraw_matrix": [ 8542,-2581,-1144,-3995,12301,1881,863,1514,5755 ], // pentax DNG -// "dcraw_matrix": [ 6464,-1574,-422,-5324,12712,2934,-1129,1724,6900 ], // DxO + //"dcraw_matrix": [ 8542,-2581,-1144,-3995,12301,1881,863,1514,5755 ], // pentax DNG + //"dcraw_matrix": [ 6464,-1574,-422,-5324,12712,2934,-1129,1724,6900 ], // DxO "raw_crop": [ 10, 4, 6028, 4024 ], "ranges": { - "white": [ - { "iso": 100, "levels": 16310 }, // 16317 or 16350 - { "iso": 200, "levels": 16120 }, // 16254 or 16125 - { "iso": 400, "levels": 15860 }, // 16125 or 15868 - { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 - { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 - ] - } + "white": [ + { "iso": 100, "levels": 16310 }, // 16317 or 16350 + { "iso": 200, "levels": 16120 }, // 16254 or 16125 + { "iso": 400, "levels": 15860 }, // 16125 or 15868 + { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 + { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 + ] + } }, { // Quality B, intermediate ISOs info missing @@ -1776,48 +1724,49 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 9519,-3591,-664,-4074,11725,2671,-624,1501,6653 ], // adobe dcp d65 "raw_crop": [ 48, 0, 8276, 6208 ],// full sensor 8384x6208 - official jpeg 8256x6192 "ranges": { - "white": [ - { "iso": 100, "levels": 16310 }, // 16317 or 16350 - { "iso": 200, "levels": 16120 }, // 16254 or 16125 - { "iso": 400, "levels": 15860 }, // 16125 or 15868 - { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 - { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 - ] - } + "white": [ + { "iso": 100, "levels": 16310 }, // 16317 or 16350 + { "iso": 200, "levels": 16120 }, // 16254 or 16125 + { "iso": 400, "levels": 15860 }, // 16125 or 15868 + { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 + { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 + ] + } }, { // Quality B, intermediate ISOs info missing, spread due to blackframe subtraction guessed to be around 10levels "make_model": "PENTAX K10D", "dcraw_matrix": [ 9566,-2863,-803,-7170,15172,2112,-818,803,9705 ], // adobe DNG d65 - // "raw_crop": [ 0, , 3888, 2608 ], + //"raw_crop": [ 0, , 3888, 2608 ], "ranges": { - "white": [ - { "iso": 100, "levels": 4080 }, // R,G1,B = 4095 G2= 4087 - { "iso": 200, "levels": 4080 }, // R,G1,B = 4093-94 G2= 4087or94 - { "iso": 400, "levels": 4080 }, // R,G1 = 4093-94, B=4094 G2= 4087or93or94 - { "iso": 800, "levels": 4070 }, // R,G1 = 4091-4093, B=4091-92 G2= 4078or82or84-86 - { "iso": [ 1600, 3200 ], "levels": 4060 } // 4067or4073-76 - ] - } + "white": [ + { "iso": 100, "levels": 4080 }, // R,G1,B = 4095 G2= 4087 + { "iso": 200, "levels": 4080 }, // R,G1,B = 4093-94 G2= 4087or94 + { "iso": 400, "levels": 4080 }, // R,G1 = 4093-94, B=4094 G2= 4087or93or94 + { "iso": 800, "levels": 4070 }, // R,G1 = 4091-4093, B=4091-92 G2= 4078or82or84-86 + { "iso": [ 1600, 3200 ], "levels": 4060 } // 4067or4073-76 + ] + } }, - { // Quality B, corrections for raw crop vs Dcraw9.21, matched to Samsung's default + { // Quality B, corrections for raw crop vs dcraw9.21, matched to Samsung's default "make_model": "Samsung NX mini", "dcraw_matrix": [ 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 ], // dng 8.6 d65 "raw_crop": [ 128, 36, 5480, 3656 ], // jpeg 5472x3648 - full raw: 5664 x 3710 - Samsung's official crop: 132, 40, 5604, 3688 "ranges": { "white": 4030 } // double clipping point for each channel at a) 4095 and b) bell distribution with peak at 4038 .. used the conservative one }, - { // Quality A, Conflict with "Samsung NX30" in Dcraw_v9.21_r1.414, frame corrections and color data + + { // Quality A, Conflict with "Samsung NX30" in dcraw_v9.21_r1.414, frame corrections and color data "make_model": [ "Samsung NX3000", "Samsung NX3300" ], "dcraw_matrix": [ 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 ], // DNG_v8.7.1 D65 "raw_crop": [ 92, 38, 5480, 3656 ] // jpeg 5472x3648 - full raw: 5600 x 3714 - Samsung's official crop: 96, 42, 5568, 3690 - }, + }, { // Quality B, RT normally use the embedded data with DNGs but because various DNG use different color matrix adobe_coeff setting is used in dcraw.cc to always use the data from camconst.json for NX1 "make_model": [ "Samsung NX1", "Samsung NX500" ], "dcraw_matrix": [ 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 ], // DNG_v8.7 D65 - // "dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A - // "dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER v1.0 + //"dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A + //"dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER v1.0 "ranges": { "white": [ { "iso": 100, "levels": 16000 }, // 16000 typical 16084, LE 16120 and 16383, LENR 16280 @@ -1827,47 +1776,50 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality c, corrections for frame size, black and white levels not declared properly + { // Quality C, corrections for frame size, black and white levels not declared properly "make_model": "Sigma SD9", "dcraw_matrix": [ 14996,-3468,-1425,5576,3642,972,1761,3773,3720 ], // experimental calculated from sun0.icc data "ranges": { "black": 0, "white": 16383 },// black is already subtracted by dcraw, white copied from x3dump data "raw_crop": [ 20, 8, -18, -12 ] }, - { // Quality c, corrections for frame size, black level not declared properly + + { // Quality C, corrections for frame size, black level not declared properly "make_model": "Sigma SD10", "dcraw_matrix": [ 12555,-1865,-1125,5093,4120,867,1929,3810,3507 ], // experimental calculated from .icc data "ranges": { "black": 0, "white": 16383 },// black is already subtracted by dcraw, white copied from x3dump data - // "raw_crop": [ 0, 0, -0, -0 ] + //"raw_crop": [ 0, 0, -0, -0 ] "raw_crop": [ 20, 8, -18, -12 ] }, - { // Quality c, corrections for frame size, black and white levels not declared properly + { // Quality C, corrections for frame size, black and white levels not declared properly "make_model": "Sigma SD14", "dcraw_matrix": [ 16411,-4764,-2383,8110,2603,-645,3135,3878,1984 ], // experimental inverted icc wp12 - build with BL=15 - // "dcraw_matrix": [ 13804,-4156,-1896,6917,1909,-431,2768,2989,1741 ], // experimental inverted icc wp10 - build with BL=15 + //"dcraw_matrix": [ 13804,-4156,-1896,6917,1909,-431,2768,2989,1741 ], // experimental inverted icc wp10 - build with BL=15 "ranges": { "black": 0, "white": 16383 },// peripheral black stripes give BL around 37 "raw_crop": [ 0, 0, -0, -0 ] - // "raw_crop": [ 18, 12, 2652, 1768 ] + //"raw_crop": [ 18, 12, 2652, 1768 ] }, - { // Quality c, correction for frame width + { // Quality C, correction for frame width "make_model": "Sigma SD1", "dcraw_matrix": [ 5270,42,-814,3737,5506,124,1112,9714,4510 ], // experimental from icm 1.04477,-0.74838,1.01617, -0.54028,2.52690,-3.83257, 0.54869,-0.69556,3.73746 "ranges": { "black": 16, "white": 4070 },// BL is 16 or 31, should be measured at the horizontal black stripe at the top "raw_crop": [ 12, 52, -110, -8 ] }, + { // Quality C, correction for frame width, color matrix investigated .. "make_model": "Sigma SD1 Merrill", "dcraw_matrix": [ 7211,-1577,-769,4996,3428,440,2717,7117,4699 ], // experimental inverted icc cloudy8140 d65 - // "dcraw_matrix": [ 5666,139,-892,3780,5428,270,1366,9757,4526 ], // experimental inverted icc sunny8161 - // "dcraw_matrix": [ 10288,-2449,-1718,8976,1868,-1608,7011,5039,-249 ], // experimental inverted icc tungsten8130 wp11 - // "dcraw_matrix": [ 5864,679,-1491,2963,7635,-919,-640,13738,2790 ], // experimental inverted icc sunny8160 - // "dcraw_matrix": [ 14032,-2231,-1016,-5263,14816,170,-112,183,9113 ], // hardcoded + //"dcraw_matrix": [ 5666,139,-892,3780,5428,270,1366,9757,4526 ], // experimental inverted icc sunny8161 + //"dcraw_matrix": [ 10288,-2449,-1718,8976,1868,-1608,7011,5039,-249 ], // experimental inverted icc tungsten8130 wp11 + //"dcraw_matrix": [ 5864,679,-1491,2963,7635,-919,-640,13738,2790 ], // experimental inverted icc sunny8160 + //"dcraw_matrix": [ 14032,-2231,-1016,-5263,14816,170,-112,183,9113 ], // hardcoded "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the top "raw_crop": [ 12, 52, -110, -8 ] // for small size all numbers/2 }, + { // Quality C, correction for frame width, color matrix measured on a DP1 sample .. "make_model": [ "Sigma DP1 Merrill", "Sigma DP2 Merrill", "Sigma DP3 Merrill" ], - // "dcraw_matrix": [ 2149,1003,-530,-494,6073,344,-3935,10665,3608 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.2 + //"dcraw_matrix": [ 2149,1003,-530,-494,6073,344,-3935,10665,3608 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.2 "dcraw_matrix": [ 2517,1175,-621,-587,7080,404,-4677,12402,4231 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.4 "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the bottom "raw_crop": [ 12, 0, -110, -62 ] // for small size all numbers/2 @@ -1875,7 +1827,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality A, correction for color matrix from Colin Walker's d50 to dng d65 "make_model": "Sony NEX-C3", - // "dcraw_matrix": [ 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 ], // Colin walker's d50 kept for possible consistency issues + //"dcraw_matrix": [ 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 ], // Colin walker's d50 kept for possible consistency issues "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], "ranges": { "black": 512, "white": 16300 } }, @@ -1886,14 +1838,15 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 4920, 3276 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality A, + + { // Quality A "make_model": "Sony ILCA-77M2", "dcraw_matrix": [ 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality B, + { // Quality B "make_model": "Sony ILCA-68", "dcraw_matrix": [ 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 ], // adobe DNGv9.5 d65 "raw_crop": [ 0, 0, -30, 0 ], @@ -1906,29 +1859,34 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "black": 512, "white": 16300 }, "raw_crop": [ 0, 0, 5476, 3656 ] }, - { // Quality A, + + { // Quality A "make_model": "Sony ILCE-5100", "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A "make_model": "Sony ILCE-6000", "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A "make_model": "Sony ILCE-6300", "dcraw_matrix": [ 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 ], // DNG_v9.5 D65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A "make_model": "Sony ILCE-7M2", "dcraw_matrix": [ 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 ], // DNGv8.7.1 "ranges": { "black": 512, "white": 16300 } }, + { // Quality A, correction for frame width "make_model": "Sony ILCE-7R", "dcraw_matrix": [ 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 ], @@ -1949,12 +1907,14 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 4254, 2848 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality A, + + { // Quality A "make_model": [ "Sony DSC-RX100M3", "Sony DSC-RX100M4", "Sony DSC-RX100M5" ], "dcraw_matrix": [ 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 ], // DNG_v9.1.1 D65 "ranges": { "black": 800, "white": 16300 } }, - { // Quality B, + + { // Quality B "make_model": [ "Sony DSC-RX10M2", "Sony DSC-RX10M3" ], "dcraw_matrix": [ 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 ], // DNG_v9.6 D65 "ranges": { "black": 800, "white": 16300 } @@ -1965,103 +1925,120 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 7158,-1911,-606,-3603,10669,2530,-659,1236,5530 ], // XIAO YI DNG D65 "raw_crop": [ 4, 3, 5192, 3896 ], // full raw 5200x3902, official jpeg 5184X3888 "ranges": { - "white": [ - { "iso": 100, "levels": 4080 }, // typical 4092-4094 - { "iso": [ 200, 400, 800, 1600, 3200, 6400 ], "levels": 4080 }, // 4092-4095 - { "iso": [ 12800, 25600, 51200 ], "levels": 4080 } // 4090-4095 - ] - } + "white": [ + { "iso": 100, "levels": 4080 }, // typical 4092-4094 + { "iso": [ 200, 400, 800, 1600, 3200, 6400 ], "levels": 4080 }, // 4092-4095 + { "iso": [ 12800, 25600, 51200 ], "levels": 4080 } // 4090-4095 + ] + } }, - /* Phase One: color matrices borrowed from Adobe DNG Converter, black/white levels tested on actual raw files. - Note: the dcraw decoder makes black level subtraction and various corrections to the raw values based on - metadata embedded in the IIQ format, so what we see here is the result after that, ie black level is 0, - and white level is typically at or close to 65535. However sensors vary a bit and can be noisy around clip - so we cut away 0.05 stop from top down to 63300 to be a bit conservative. */ - { // quality A +/* Phase One: color matrices borrowed from Adobe DNG Converter, black/white levels tested on actual raw files. + Note: the dcraw decoder makes black level subtraction and various corrections to the raw values based on + metadata embedded in the IIQ format, so what we see here is the result after that, ie black level is 0, + and white level is typically at or close to 65535. However sensors vary a bit and can be noisy around clip + so we cut away 0.05 stop from top down to 63300 to be a bit conservative. +*/ + + { // Quality A "make_model": [ "Phase One P40+", "Phase One IQ140", "Leaf Credo 40", "Phase One P65+", "Phase One IQ160", "Leaf Credo 60", "Phase One IQ260", "Phase One IQ3 60MP" ], "dcraw_matrix": [ 8035,435,-962,-6001,13872,2320,-1159,3065,5434 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One IQ180", "Leaf Credo 80", "Phase One IQ280", "Phase One IQ3 80MP" ], "dcraw_matrix": [ 6294,686,-712,-5435,13417,2211,-1006,2435,5042 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P20", "Phase One P20+", "Phase One P25", "Phase One P25+" ], "dcraw_matrix": [ 2905,732,-237,-8135,16626,1476,-3038,4253,7517 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P21", "Phase One P21+" ], "dcraw_matrix": [ 6516,-2050,-507,-8217,16703,1479,-3492,4741,8489 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P30", "Phase One P30+"], "dcraw_matrix": [ 4516,-244,-36,-7020,14976,2174,-3206,4670,7087 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P45", "Phase One P45+" ], "dcraw_matrix": [ 5053,-24,-117,-5685,14077,1703,-2619,4491,5850 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality X, matrix taken from H5D-50c which has the same sensor, probably with the same CFA. Color looks good to the eye with files tested. + + { // Quality X, matrix taken from H5D-50c which has the same sensor, probably with the same CFA. Color looks good to the eye with files tested. "make_model": [ "Phase One IQ250", "Leaf Credo 50", "Phase One IQ3 50MP" ], - "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ], + "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ], "ranges": { "black": 0, "white": 64400 } // CMOS sensor, we dare to set white level a bit higher than for the more varying Phase One CCDs }, - { // quality C, matrix made from crappy cc24 photo + + { // Quality C, matrix made from crappy cc24 photo "make_model": [ "Phase One IQ3 100MP" ], "dcraw_matrix": [ 4479,-895,-536,-5818,13569,2742,-1186,2190,7909], "ranges": { "black": 0, "white": 64400 } }, + { // Quality A for tested CFV, the other models have the same sensor (16 megapixel square sensor) "make_model": [ "Hasselblad V96C", "Hasselblad CFV", "Hasselblad CFV-II" ], "dcraw_matrix": [ 8519, -3260, -280, -5081, 13459, 1738, -1449, 2960, 7809 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested CF-22, the other models have the same sensor "make_model": [ "Hasselblad CF-22", "Hasselblad CF-22MS", "Hasselblad CFH-22", "Hasselblad H3D-22", "Hasselblad H3DII-22" ], "dcraw_matrix": [ 8519, -3260, -280, -5081, 13459, 1738, -1449, 2960, 7809 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested H3D-31, the other models have the same sensor "make_model": [ "Hasselblad H3D-31", "Hasselblad H3DII-31", "Hasselblad H4D-31" ], "dcraw_matrix": [ 5458, -1448, 145, -4479, 12338, 2401, -1659, 3086, 6710 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested CFV-39, the other models have the same sensor. Small filter differences may exist so some might do better with a slightly different profile "make_model": [ "Hasselblad CF-39", "Hasselblad CF-39MS", "Hasselblad CFH-39", "Hasselblad CFV-39", "Hasselblad H3D-39", "Hasselblad H3DII-39", "Hasselblad H3DII-39MS" ], "dcraw_matrix": [ 3857, 452, -46, -6008, 14477, 1596, -2627, 4481, 5718 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested CFV-50, the other models have the same sensor "make_model": [ "Hasselblad CFV-50", "Hasselblad H3DII-50", "Hasselblad H3DII-50MS", "Hasselblad H4D-50", "Hasselblad H4D-50MS", "Hasselblad H4D-200MS", "Hasselblad H5D-50", "Hasselblad H5D-50MS", "Hasselblad H5D-200MS" ], - "dcraw_matrix": [ 5656, -659, -346, -3923, 12306, 1791, -1602, 3509, 5442 ] // borrowed from Adobe's DNG converter - }, - { // Quality A - "make_model": [ "Hasselblad H4D-40", "Hasselblad H5D-40" ], - "dcraw_matrix": [ 6159, -1402, -177, -5439, 12762, 3007, -955, 2200, 7104 ] // borrowed from Adobe's DNG converter - }, - { // Quality A for tested H4D-60, the other models have the same sensor - "make_model": [ "Hasselblad H4D-60", "Hasselblad H5D-60" ], - "dcraw_matrix": [ 9662, -684, -279, -4903, 12293, 2950, -344, 1669, 6024 ] // borrowed from Adobe's DNG converter - }, - { // Quality A - "make_model": [ "Hasselblad H5D-50c", "Hasselblad CFV-50c" ], - "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ] + "dcraw_matrix": [ 5656, -659, -346, -3923, 12306, 1791, -1602, 3509, 5442 ] // borrowed from Adobe's DNG converter }, - // dummy test entry to test the parser and show the format with all entries active + { // Quality A + "make_model": [ "Hasselblad H4D-40", "Hasselblad H5D-40" ], + "dcraw_matrix": [ 6159, -1402, -177, -5439, 12762, 3007, -955, 2200, 7104 ] // borrowed from Adobe's DNG converter + }, + + { // Quality A for tested H4D-60, the other models have the same sensor + "make_model": [ "Hasselblad H4D-60", "Hasselblad H5D-60" ], + "dcraw_matrix": [ 9662, -684, -279, -4903, 12293, 2950, -344, 1669, 6024 ] // borrowed from Adobe's DNG converter + }, + + { // Quality A + "make_model": [ "Hasselblad H5D-50c", "Hasselblad CFV-50c" ], + "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ] + }, + + // Dummy test entry to test the parser and show the format with all entries active { "make_model": "DummyMake DummyModel", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], - "raw_crop": [ 10, 20, 4000, 3000 ], - "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], + "raw_crop": [ 10, 20, 4000, 3000 ], + "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], "ranges": { - "aperture_scaling": [ - { "aperture": 1.2, "scale_factor": 1.1 }, - { "aperture": 1.4, "scale_factor": 1.08 } - ], + "aperture_scaling": [ + { "aperture": 1.2, "scale_factor": 1.1 }, + { "aperture": 1.4, "scale_factor": 1.08 } + ], "black": [ { "iso": 100 , "levels": [ 10, 20, 10, 20 ] }, { "iso": [100, 200] , "levels": [ 30, 40, 30 ] }, @@ -2071,7 +2048,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 100 , "levels": [ 10000, 11000, 10000, 11000 ] }, { "iso": 3200, "levels": [ 11000, 11000, 10000, 11000 ] } ], - "white_max": 16383 + "white_max": 16383 } } ]} From 7fe9297c01df20585d89d5a9e262f37a6411157d Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 31 Oct 2016 14:43:35 +0100 Subject: [PATCH 082/115] better support for Pentax K-70 and XiaoYI M1 --- rtengine/dcraw.cc | 4 +++- rtengine/dcraw.patch | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 54fc09622..dcfe66ee5 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -9482,12 +9482,14 @@ dng_skip: adobe_coeff (make, model); if(!strncmp(make, "Samsung", 7) && !strncmp(model, "NX1",3)) adobe_coeff (make, model); - if(!strncmp(make, "Pentax", 6) && !strncmp(model, "K10D",4)) + if(!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4))) adobe_coeff (make, model); if(!strncmp(make, "Leica", 5) && !strncmp(model, "Q",1)) adobe_coeff (make, model); if(!strncmp(make, "Leica", 5) && !strncmp(model, "SL",2)) adobe_coeff (make, model); + if(!strncmp(make, "XIAOYI", 6) && !strncmp(model, "M1",2)) + adobe_coeff (make, model); if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index e23136d68..22c53d831 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2016-10-11 13:24:24 +0000 -+++ dcraw.cc 2016-10-17 19:32:24 +0000 +--- dcraw.c 2016-10-28 13:45:27 +0000 ++++ dcraw.cc 2016-10-31 13:35:15 +0000 @@ -1,3 +1,16 @@ +/*RT*/#include +/*RT*/#include @@ -3045,7 +3045,7 @@ } else if (!strcmp(model,"DSLR-A100")) { if (width == 3880) { height--; -@@ -9357,6 +9476,18 @@ +@@ -9357,6 +9476,20 @@ memcpy (rgb_cam, cmatrix, sizeof cmatrix); raw_color = 0; } @@ -3055,16 +3055,18 @@ + adobe_coeff (make, model); + if(!strncmp(make, "Samsung", 7) && !strncmp(model, "NX1",3)) + adobe_coeff (make, model); -+ if(!strncmp(make, "Pentax", 6) && !strncmp(model, "K10D",4)) ++ if(!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4))) + adobe_coeff (make, model); + if(!strncmp(make, "Leica", 5) && !strncmp(model, "Q",1)) + adobe_coeff (make, model); + if(!strncmp(make, "Leica", 5) && !strncmp(model, "SL",2)) + adobe_coeff (make, model); ++ if(!strncmp(make, "XIAOYI", 6) && !strncmp(model, "M1",2)) ++ adobe_coeff (make, model); if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); -@@ -9371,9 +9502,9 @@ +@@ -9371,9 +9504,9 @@ if (raw_width < width ) raw_width = width; } if (!tiff_bps) tiff_bps = 12; @@ -3076,7 +3078,7 @@ is_raw = 0; #ifdef NO_JASPER if (load_raw == &CLASS redcine_load_raw) { -@@ -9402,249 +9533,300 @@ +@@ -9402,249 +9535,300 @@ if (flip == UINT_MAX) flip = 0; } @@ -3607,7 +3609,7 @@ struct tiff_tag { ushort tag, type; int count; -@@ -9667,594 +9849,11 @@ +@@ -9667,594 +9851,11 @@ char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; From 2bf87d5c5c36892658ee9b07ffc453f918d858c8 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 5 Nov 2016 19:13:59 +0100 Subject: [PATCH 083/115] Fixing issue #3497: "Lockable color picker interacts with info text on image area" --- rtgui/imagearea.cc | 44 ++++++++++++++++++++++++++++++++------------ rtgui/imagearea.h | 3 +-- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 32df9f8f6..a8bee4fb3 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -149,16 +149,43 @@ void ImageArea::setInfoText (Glib::ustring text) infotext = text; Glib::RefPtr context = get_pango_context () ; - Pango::FontDescription fontd = context->get_font_description (); + Pango::FontDescription fontd(get_default_style()->get_font()); + + // update font fontd.set_weight (Pango::WEIGHT_BOLD); fontd.set_size (9 * Pango::SCALE); context->set_font_description (fontd); - ilayout = create_pango_layout(""); + + // create text layout + Glib::RefPtr ilayout = create_pango_layout(""); ilayout->set_markup(text); + + // get size of the text block int iw, ih; ilayout->get_pixel_size (iw, ih); - ipixbuf = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, true, 8, iw + 8, ih + 8); - ipixbuf->fill (128); + + // create BackBuffer + iBackBuffer.setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, iw + 16, ih + 16, true); + iBackBuffer.setDestPosition(8, 8); + + Cairo::RefPtr cr = iBackBuffer.getContext(); + + // cleaning the back buffer (make it full transparent) + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); + + // paint transparent black background + cr->set_source_rgba (0., 0., 0., 0.5); + cr->paint (); + + // paint text + cr->set_source_rgb (1.0, 1.0, 1.0); + cr->move_to (8, 8); + ilayout->add_to_cairo_context (cr); + cr->fill (); + } void ImageArea::infoEnabled (bool e) @@ -206,7 +233,6 @@ bool ImageArea::on_expose_event(GdkEventExpose* event) return true; } - Glib::RefPtr window = get_window(); Cairo::RefPtr cr = get_window()->create_cairo_context(); if (mainCropWindow) { @@ -214,13 +240,7 @@ bool ImageArea::on_expose_event(GdkEventExpose* event) } if (options.showInfo && infotext != "") { - int fnw, fnh; - ilayout->get_pixel_size (fnw, fnh); - window->draw_pixbuf (get_style()->get_base_gc (Gtk::STATE_NORMAL), ipixbuf, 0, 0, 4, 4, fnw + 8, fnh + 8, Gdk::RGB_DITHER_NONE, 0, 0); - cr->set_source_rgb (1.0, 1.0, 1.0); - cr->move_to (8, 8); - ilayout->add_to_cairo_context (cr); - cr->fill (); + iBackBuffer.copySurface(cr); } for (std::list::reverse_iterator i = cropWins.rbegin(); i != cropWins.rend(); ++i) { diff --git a/rtgui/imagearea.h b/rtgui/imagearea.h index dcdc4f3ec..24a296913 100644 --- a/rtgui/imagearea.h +++ b/rtgui/imagearea.h @@ -41,9 +41,8 @@ class ImageArea : public Gtk::DrawingArea, public CropWindowListener, public Edi protected: Glib::ustring infotext; - Glib::RefPtr ilayout; Glib::RefPtr deglayout; - Glib::RefPtr ipixbuf; + BackBuffer iBackBuffer; bool showClippedH, showClippedS; ImageAreaPanel* parent; From 495c0938f41e58ee28b2fbc947e9d0e09ff12233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 6 Nov 2016 17:09:27 +0100 Subject: [PATCH 084/115] Fix Clang warnings and build failure on OSX 10.12 Kudos to Partha over at pixls.us for finding and fixing! --- rtengine/color.h | 8 ++++---- rtengine/dfmanager.cc | 6 ++++-- rtengine/iccjpeg.cc | 4 +++- rtengine/iptransform.cc | 6 ++++-- rtengine/rawimagesource.cc | 3 ++- rtgui/windirmonitor.h | 3 ++- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/rtengine/color.h b/rtengine/color.h index e2b32e834..77db1f4f7 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -17,14 +17,16 @@ * along with RawTherapee. If not, see . */ -#ifndef _COLOR_H_ -#define _COLOR_H_ +#pragma once + +#include #include "rt_math.h" #include "LUT.h" #include "labimage.h" #include "iccmatrices.h" #include "sleef.c" + #define SAT(a,b,c) ((float)max(a,b,c)-(float)min(a,b,c))/(float)max(a,b,c) namespace rtengine @@ -1680,5 +1682,3 @@ public: }; } - -#endif diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index ab76ff854..728d40d53 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -598,12 +598,13 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std found = true; } - if( settings->verbose ) + if( settings->verbose ) { if(found) { printf("%s.badpixels found\n", s.str().c_str()); } else { printf("%s.badpixels not found\n", s.str().c_str()); } + } } @@ -617,12 +618,13 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std found = true; } - if( settings->verbose ) + if( settings->verbose ) { if(found) { printf("%s.badpixels found\n", s.str().c_str()); } else { printf("%s.badpixels not found\n", s.str().c_str()); } + } } if(!found) { diff --git a/rtengine/iccjpeg.cc b/rtengine/iccjpeg.cc index 21ba86f28..31aa0ec7c 100644 --- a/rtengine/iccjpeg.cc +++ b/rtengine/iccjpeg.cc @@ -142,7 +142,9 @@ marker_is_icc (jpeg_saved_marker_ptr marker) GETJOCTET(marker->data[8]) == 0x49 && GETJOCTET(marker->data[9]) == 0x4C && GETJOCTET(marker->data[10]) == 0x45 && - GETJOCTET(marker->data[11]) == 0x0; + GETJOCTET(marker->data[11]) == 0x0 + ? TRUE + : FALSE; } diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index d22fe08f2..7356231cb 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -794,12 +794,13 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr // multiplier for vignetting correction double vignmul = 1.0; - if (needsVignetting()) + if (needsVignetting()) { if(darkening) { vignmul /= std::max(v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); } else { vignmul *= (v + mul * tanh (b * (maxRadius - s * r2) / maxRadius)); } + } if (needsGradient()) { vignmul *= calcGradientFactor(gp, cx + x, cy + y); @@ -963,12 +964,13 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf // multiplier for vignetting correction double vignmul = 1.0; - if (needsVignetting()) + if (needsVignetting()) { if(darkening) { vignmul /= std::max(v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); } else { vignmul = v + mul * tanh (b * (maxRadius - s * r2) / maxRadius); } + } if (needsGradient()) { vignmul *= calcGradientFactor(gp, cx + x, cy + y); diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index b2e3e5e56..049c509f5 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1851,7 +1851,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } - if( totBP ) + if( totBP ) { if ( ri->getSensorType() == ST_BAYER ) { interpolateBadPixelsBayer( *bitmapBads ); } else if ( ri->getSensorType() == ST_FUJI_XTRANS ) { @@ -1859,6 +1859,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } else { interpolateBadPixelsNColours( *bitmapBads, ri->get_colors() ); } + } if ( ri->getSensorType() == ST_BAYER && raw.bayersensor.linenoise > 0 ) { if (plistener) { diff --git a/rtgui/windirmonitor.h b/rtgui/windirmonitor.h index c3278c931..b9be67a5a 100644 --- a/rtgui/windirmonitor.h +++ b/rtgui/windirmonitor.h @@ -24,8 +24,9 @@ class WinDirChangeListener { - public: + virtual ~WinDirChangeListener() = default; + virtual void winDirChanged () {} }; From b2757e576b42fdce781840652c6b6a535205eaba Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 6 Nov 2016 17:26:37 +0100 Subject: [PATCH 085/115] Added rtdata/rt_splash_5.svg and png --- rtdata/rt_splash_5.png | Bin 0 -> 78671 bytes rtdata/rt_splash_5.svg | 1772 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1772 insertions(+) create mode 100644 rtdata/rt_splash_5.png create mode 100644 rtdata/rt_splash_5.svg diff --git a/rtdata/rt_splash_5.png b/rtdata/rt_splash_5.png new file mode 100644 index 0000000000000000000000000000000000000000..be996e1197805b83afb2b264a826671de829a341 GIT binary patch literal 78671 zcmZ_$cRW}B|38i^Lb5Wl_om1Q*()o1W@m=%k*yFSd+(8uy^_e@Ga;euk(n)9-`jb< zU!Tk6_s{Qnx%8|&9_Mi$=bYR9cDt^7VQMOJI9TLZC@3g63i2`m+al!frn|_Sv~1k$EKxK}J+!PXUEp;~T06&Qj|*NS_P>wj zG*PO)Kf<=3-;!?q=iYa8Je2LE6#Y-qOX~#?|@GNZhg?+a%% zN;1CtOFQWbMR$rb+3xX+`el;DOO9k3nIicc8hi{E1WL4+sI>C*cPm?eQ$9O*o$2-x zZ(vNYu5c%_vgQlEdrSLMt7qGP#Ac2U*DF-Bw|{(coGb4L!J*){o2)cl!VNUfyHRQS zzaPYy5)%F23mx5580k6ij{jcS7Mw)u`rk3mJ#Eaa{~g>B5-E(!FIn}!qoP~XUAwzW?dh*G zd*nOb*i=#bd@X-C3_mIIRe??W(=p*bONxDQl_$5?BS-ZTRSJr;8?iq{{i-xIXQ(Pi zd&JCG?Ob=}S4K-=sv`dx;}J6lzxwHtw1`X7tOdN-_nRzw(kZhJE-vz@yWutw?|!Zg zIVG-~VPG|R5Y2FJzcIm?5?2kM-MjrBR9>E;e>&^C`qDqtQ=hP0AFrJ@x8D2&_lf`d zrj(jiXOMA5#_sT@>6$i!oWru^5>2G+y|8fm-j{DqG){G1b3yaouw{Q{`4is#3@fo$Q6es$3n?m%lZ#-FC7M%pK8N2v@ zn;3p5@c6tMy;+iqaevk=x<5TPaGZ~E;;~|UJkiua$4cDTf<0Z95>jx510(O?p?sT~3NyLf&=vIgd-uY>r7dXj#g~!M(LgT0^~WE|%lW4T#KfX*k#Ode zl-vrCkXWmr(zS#_jBF3t3X-BGN*)Lv92`t}xEFa{pu4`lezMt57`|QzOP1&LWKN^@ z^|8W{si~V46BL9d67L^n{i@sR3fQ_$NA;rK&`Bth;vO{$=HgvK?9h&Y!9gWHe*VR) z^PQgGL+Loj?k`@LSzBZJ`S}ID>XWQ~RW=3>N$yjtT|zO-XBw@rolxgRuV3Nj!Rel|S68W>Md`Exvtk z!n3`6ttVtVs9kqwdOasJJ3co+L2r|Ss=Bv8b%@iH?rLlTJ^%HL{>hrREaTN&P~{P|UhnyzF&sZai0p0##^ zRc1ANi&me`JFl*Rp20jR_ir;Zku;ZUa=n9td`7l|g?#m^l^;G}V&GACULMaykB(|c zpLKL}c&_IsJ01L1MhlXB-La6;_4)EenGi_{pJuH3R|dUyBCcUKY)Y-5JhvB>9)bQd zH+g2+WGrWf7Z+Z}w_Qlnv$lqBJ$(3Z@{>JA0v9ZxUF^#p)D+CN?PH0 zJgoaJTD+%TvwN~w?1AkjdlBzN$OQ(TJ@6{puj=PW^<8tE(!7HeTv=I(FRg+?`X;>b zwyCTvIu8#IK2~so%Om>RgI~XzSy`bkI6Y~!rlD3*LLqI|O$_MYa1xZk4$ojYz8ZNO zPiTzc;#Vw$lU1%aGjOaYnV+XK$0Vh=)Ytt_r!Q7QlGu^rs4=>wOermX3t~LKAAEnJGCEYz(h71*OR+s>+)0Fl zg%|cb%^F!>)d%o0+}!I8WLMV47^vW7kk_GVU{{@uz4nH!*y|0=X)P8u`bJsDeBGX z;@%fy?C11$_TT+uag(`aI6|fPNmUd`);PlPnufDOH=n{kFt^08sG8_&l%5s>+ zg-0|}*DG1^FzZJ@4|Zo^<+)M|w9x*>hjV&*I$3RbOYCA-T1iQXRJM zT&m2KU<+nn#SC=SbtZ3SiLhItG2vrkMu%O*MVsfGFAJ%Y5!J9|S@W?s3i%exjqzzx zRnyn7`z;G|yVe&ulnK2sZn4s|Ijk$jDeC1)OpLcL;f?V0-sk;2SM;-N>REk|nxD?N zDvt#%89nX9?c`8Gotg&qDMD?kK1;Pemd#I!%)G-as?y{2Y3>(Lw|)KAD`mCb+b*KT z=ui57Ea{sYnX6eajk{ms{S3NZ8X-S0FraQ|7y(10Lyx)9kX_^Hc+5KWm5N&A=hEw} zmTHB4eLX0R0c)Q1Zm_4r7^VS^*evY+W&lDRv} zn@eO8#x3uK_r6xf?X0dB|HNcz4U1r0`Abj8k}6RoB5KH~ZJ;wAX^2bg87graUwY^x z@(|_dP1*qC0Ii3F3zeRG<%M2RR-~Qg@>#5S`gk;%&El~9U*7^Le*yg#g2a(hJnk_` zJ=yWcV*SAu>b1j1%xn}Jk|TWg?7uiM8`xO&$K2(!XL|anyj-QUA%^CzF70gU=rN3m z;NW0ZPEJ{8XKt8}YFb*aGcqVGo;_n=U_jN=(|fmsjUEJJAtgP%n{rKKq>Bx_q+0-NFlJ#k1jZXqDr!3nXV=eWHKFw-J9cF{9bA zt~yqS%*p}9D@{j6;;X8EU!nX!<~uC*>s;~L#xLq|z0Sg@3HmmB6`ASFwL&va28O4K z^LQ9o!(y(TTK;J3KjR#D2aO1KY5cKB{fUM*@wJ$-d9}Wp+h<+&&v78M^KzqYZ_ z-b3>;Vj!8z+|;z~J`)NGfWz9_+LPY`En$m`iwXM&-c6pzGalUB+_@27=u~AD6mB;E zt*tPfYxZMv>?H}4`8GZt91w5~;OD{=ts2A7@Nmyap4{G~c{Cjt7gtfE{PyXo*Tvtu zmM)fTU$ZqeHkxwH#@J$^Ck;{9Rd!FMb7R&y`$w#a0N1St&v!=+aL!fGtH#QsIn)Uk zG&!3qwDeKMj;+f8;Cb=qXYlXeR(yPXIiEj2iD`R!|4n{AlajJ>Ze1OTfa7du?emHG z ze)rxzvPO2E#aKq(ox3vwW3leNrLNlU#>K0h*JMy65g!J{N?54C4{e$ ztA=S@LE_&+1OH!IT0+43;i2208;dB*{?|UsFgbrq$Ldu72M->Y0-#Jf8y_EMIvm(J zHrOCZ9@~0&(2%(KDlid_O`j@GxDOgQUo;+ziJp5>#Ze(Qi#Mt-_ z&;IJbA8MAs_gtHgG=4uv~l5iU0hlED^_ojRwA7AJUBb@x= z!8PsRp)Zf+b&HiogSzfluRD+`%!qP+d?UG{1lU z-dzZ#S&S5zZCze|zeXgLiw|S{HYOT&2nQJ~`@Gs(V&D$%M5al>1c@)v8ohS78W@lKN3ZYov~8; zpP0fU?CO2AgB)&e-!Ueme0c(h*zH5+O`v_iUh!&WDpiMn4%7Bqy3sG9GWiRNRAmk-Pg}xoAzV* zNbAXyH)(0)TH4xSe>F8U0=Ks8kbcR+f&pOgT@bzFR&Ot+!}R9>IL^%3S>4U}J;R}) zr_XBj?h;XdfB&~{-(JC*|Ni}ZPI);llnv{>d)jdiYi^6fGdBZjn9OC;oyz;n>1ac{ zN-JCFiHiR^HE*0*fr;53DPdOrcH*9CR0p#M z19}7ZwVW_|QtZXFXwVU00&(kALMS#_?Yw4^{$>P ziMq&<>LeFNSq*MNnS$PjtXIpbS7=8^NByg2OwuBNTaW^4XdsUk*~j$u_TC*Zxgr4C zueHr4b3Z+iOWLH_`F7I#*L< z!Aa0Q^o9`NCzapVf*VZ?Fv0tA*3ZQ#KJIspNJ{KKLe@&B}nf5jHcL^8IgeE2B0J*2%mO{P)v z=vlt&r8M>8l=kzIVq>}JnwUhlTnx0xC@U*Vb#`LAsajbvXL)b1ZB168{<|3d7g1Hk zZK-rEIn1No7h@XELMh~iIrs1C7$>uG>tQ$xVSaXMYFLHu3ddy4Gd%x`C7QQm84m>| z7pO3l<$AN^!e-QCrfSF7m5 zy6mWQ^;gzT?#sQm8?VkbPfmwlMs;;PaxSwoC>nBvMPX3qV3au986W@i<@4tpSHB&v z(07`Ssjue#oxh}ai0G&F!L#%lI^2YTaB_9r5)CLpdovksm8Pm_u&B@9c^2{0n`h_e z<`#?mPnxsi3B8902Rj*}MFPdoYs97f{rw{%_T+;yUy#quWDx4S$#}zl#@dFP}yi=;rKl9=+n=O zqALp?iTA9+!W8%J-8-2*ZVrWN58@nfr>*0tiRIo=<9D2mXu15=(iQE0$bgND+wDf5 z;ntUl;nml?7wI_v+~l0Rx~2xl%ensD2x~!MAvZ5CYW6S&%-Og&f{{BbUyUc+5e;hR zYI|olKKlYqz+w7L?Av(%xO*HNx5&uIxQCg@BVjmVh+iz=flNlfucbWFcMR>m4X)G6 zYieJQfV-l&n7}?NC+&K~L{XY3F91UTdXz9|PwHNt3xHDC6;b)X-m)v}*B=0nNhx>k z2NlQj9!M0=uJbAnh@8v^!JY1Dx!P)|02@~x)0{)#~VI}nMxCvFcZ|dx& zu7b7}(B3WujgLZvqa?NkW;;OK-BVu_2LU1;4S4*7n$P=w=iBHT?kF@UV3Em@@ioOq zwK{8Ou~#dhmlYM=92Pq-rDb{LJas%dNm_37C8VuQ67C@#B`$-wI1PN-WR*FFzP|qJ zIyHZE3#ZMEjoqdlKRofvbyax0gf$u=CId!0K$ks#r#^GKIN3}2iu#$#;0ScarT#>Y zl&q{fuS13M`ui0rAG)BKT-6g1&c3B3-b_LlcF z`RuQ)qqB%1esb+kAADr2U6)AvT z2V=@}J^*946%`M2=T>r6ZtgW?nd~jm{3AvBdzOmB@V^{UR`!r?6BL=Q0nSye*5egg zr+vCFN5E1+(q;}SEs~hf4U9a|6G<>}cRwl?UUie4aEBo=|1DSAb2ZZg1qD&LK_twM zOO}S!%Ew15AfP)~HtGtJaO?KW7iFC1>~CcAtQ{RmI5iw7ZNi+{z1GhZowmO0G;;{u z_9CM;O8$!8XC5bLeIq(N=e>UP_us4%IuBe}blnsb!suwSheJW{o*xpJlkxBnkjjl& z@SlAMb@m@ZuXD^cb?aGisy9TG?(ODthm41=-D(pT`VJ}Zz?}D&6+|v}J3>%2=~bGV znmqTqNcPqXv%?>{IcybO1O)}13_1D-@jm-HFFbdOiyUvd=9TUTrMX*^eW?TvpwT|9 zC-0X>+%{S*=H}*}rz^?M+tUwk`}Q|A`Q~HT6GLC2T{}~3<&EvL<_iaOWmxZW1CiQS z29kqylgn5C#2UlHm?$^uNOx=w`}B$bzj+Rj7l$gRpsX{13d$UL{0=h>mTzL;H82Fy z!;SQ8GCn*!L{xrYbI66?xpN0wb1y^9g-Z?)%-@~4XgO*xw4tG)5Kr-P-9LZ+cy3ko z?CuY6z5SY+g-0XOKU)tqEpm0Tq-zkk27)nU(BG;YzEUOLR zQ~vh~1bc{|PYvIH@PK$}Xqm_5;akx1|2V#+03A4jjz#9{%Y*c}oSGUK9AD5io# zza5JLd3ktZva_QLv;DotXK^&Fm%(TJ#x^ma;Ns8&X0^KJqT; z48c|Nos2U$u^!mP-qBk3& zz=6sTe@Q(o{!gU4rw8Y;&^ozd^e8Aiq-11mFaI6C1cBk&@!U&s7Z;b#2cR;*!#f#G zZhj3vqj~)J@nXH2o>ypTv1aB zG7pC(XkXPl8(v&VHn~&s$ReHMfN%g5zrc8msS8cj|ApZ2Rtm> zl!Ex=T1`2nvs#ZG;|xJ(df686x4veJN0S(P(%D>|Rs1{S@?D~sYmH@)OE_~M7CoMC zI-Ug{Lu|PkL?G4_pPU>j9g4dEloa1a{R;dF1XCG%uQPdyPzO2m@equ_^OiL+p}9H` z|3^41a-f8*KHT5m9)ODBv_8sY*yyRg#uQz#{NC$cSbxah42%0?>Js#<7L%TqaZ(L4 z4t763-h{bK1SRs`?GekZmbqxSPV&FTxz&kDNz554jY9Ieawb|@jK4pFdm(mts0qB5 ziR!J?(a)bh!?(8`xR2i1a8OK)O#3wC*re@F0+&)Z0h!MF`Ey>kl(0addZb#_OSU8x zLLG`Nmdf35v37sY6|x6yRWWKXuCBY(s~H$@T>U-26!h4pH1^$lgpG&ymg)0;zo0`( z(JUUeAGE@FHUk&sY)q68-7<>e*lvWzJtBm~k=;+X1kEYH|O^2X^# zFG48B#(<0ujVxAe-*`smtD(JI92SZ{GBL@ve%ZJ7y4e5s>MG*Zg(~GX5w+&t=wmKZe}8Hg)vSn-d&&l>I^u3?`0&;4 zKYYk0-Pv7MR(x)MM0P^3fvBjc z89v>w_@mYkPF@xF15RSlSzt}=u5i61gA)P%P07pzv9LOYWeyRo$jOz2LoFmSf5DQu zFCt?1#P)GyD!-KG%z*gVoLIK1oeB|Fa17LEdwcuqWH07GdB(tq2&@ z*M_IRhiDm^@8smaVXr`U`gPyrv(q)M<`a5oFfxVg9#?KOEUa2`2L}hAoffVmq;+>* zvg1Sawrjm1c+3(nU$#8C?2crsuf?MjM3jx79yUtcJeUuKDwzaT%o%EN0nEGW68+8VN<06#WNx@($vBN4c422YWz3M!a;Q%SIpAj+q50;Ioo`* z-{;{8gt3(G54bHC0E8#2rys#W-c0(+wYl%#i9oOlN_jQ!`9kXI9zJGHVIc-!HM9Fl zv^#E&jun$H<%vOEiNuR(8AbyUOx$F$G0;n!Br4+{f!N-wb>$CscZv}%?m+FzzlF-IzhZ- z=io@xd?S-`@*!fBgO#-vXa^7os}%m6(*tlesx}lY4VG=lY69?U2dIQ!kecCFS68E* z>fku^qLzAxpj3YT{HDB|(|P*!hGoI?;?=JQ^Ldu3l+3*N@f9nbRnUc)Wuws_OwSA- zROvHyE0i}9zYaec{ZeX>umktJ+@ysQ*LJ1l8FVbrt)W`zyMz91I|%}xe09&@Q%+;! zbPUG&L~HA-Np=150gJc+;1$H|-vqxp|N`(HM+Nnh_|=NGj* zJ%(`rw4=0PY{K2>J7J^_bghPl1}A_O%*y_6EPjlSn}W{;1_L}n(AM<{1LHtM0)k0I zMD+B<3mwYQl<>L`?2)xKR!H28M&2sTV*IfDPQr}1H>Hq4b;`+EiWY%vx)sKcbahGK zD$&>$^8AS<)!k$G`v0E#l2TE1!P7Ix#9}!Vxi{)Xeq&%Z9;}|K>#w)-<`nMK*xY@H zr#yxhyYJl;vT4Lg0%ODc>z_rhRAqI*i%^mXJV-=5-q?|c|BScsdyRKJg^6wA22?B( z4+AF7vqXI=y$-CZrjx{Zu>`eO9*q%Ly*D5xz1y?UyI=e!tz)4T?w7-CW7y0Wj~+Dh zFEb7x{$aNF9c5N5+S%Jb@MIo5eCtyhH^TL_OBx(3y1?XhAM)0HZE0WfY!OM&Zwh$g zNK!Xz5+kgf8NrVsBqRhGA!Lbu4c}m&NW+-tN8EcmQpsGEX*;yIyD(@oR0^F+`VI<9 zZji;UuiIn@xnmWoW_N%8o{$@Rt!}0gi0Vn`%M*-_X&Ssq9$wl*XrNMhdSr<9>UaJ( zx4C&XhqXxJMeXR9o~5?=`KO9))kKehir+GtP&Y7mn~{<65xtiH?9}$gf&z3+O-+bt zJ+id496gev>OI<==<3$g$?Voo=&&nRp;j*7RSg%7%iZMIBL%xB1s-r}c#QDv`kG}< zHy6|~e@>8%6;K&M>*f7oV+(Unqi+d4z=65= z#o`ZiV=-~*S=a;VF}Myqrs8G1^GEMBu;61p_4d~PXtHfNFgPe9DH$+no85aOf5B;5 ztfW`5W%-rKC|A9o{yK?Qrmt8w-JK8}{5=~fu`UElg0H^6?-Hb3AmN7S1DC0z@{hW$ z-BwtW&SC1mV1u9QpW*b97v4!o6+l(q9~y$HKuWw(Hvx1&SxBQX4@3iZly% zK}e?%;z`gL@5^PpRUCBv4Mb-hiA}z~BQ$OLJ?!w~oWggX@z6BA+_Zg|H3ptI=rL_?kKoOObaV*_0Jz>=C!905E0j~e5=P; zN6B8ii5>*t6iP}4B-`RZMH@v6=uoS}**&KRt6d2wc+|`2viw9AXx5tf;8TD*m{U}w zFc`l-iRXnD_cbbukY(G<1nf;<#eietXV2zVTyk@AP~hIsGt0cdDI^5C0;;8)scG)y zP2Q>X_t0bz^aa<*ebgo#QM+q~Qa3Zm{z0h9ZN>igI0$w?4l&`wa5(O2853?F<+z9ROVQ%NRV`;B-^`J{h zl~AFtxA%TVieKS6iKF@fO4}i9bk0hpk^w=2Lym0vh}MD4}ny$`fOsR z^rcs9nMQd;MI*tp2cHobU>sP~@V%i#fwsJl^emRhd!DAF_(D-}Lig*;`u6snfTne< zC}pBFt0r}dW1aW6WWu$)&My5ycf{NYo4)-)=#JNWs~4H6BTFR$nA5zm@$rP_G(T#Z z)V}0AH8plPv(w482wf(Ytybw8gHmQ+t4>S81c|Bp+FU|h&ej{W|@iaRJ~#0cXSH_ z+eh@HIB5kB7=AV0eI5*bp^9g;FOZsFI|m3#fMW?A>-WmXii(|vA8fx8eO6ZKHPF!1 z3}TRrng<&L5~fi;-_N{XMR3+D*SDo)XZN(WqJXku^<)SikMEBLG-e4}{G~W0f!;?3 z;O0P=eqR`$l$?ynNec_6U`3Ycb=1TuLBdc zMoU;JP2A4fx)t-vKo5ZLH$fYvW~e`~bY`)6u0LOpFfYtZnDvf7u4}LO+Lo}%-fy5h8z0Fg$AmepPlWF z$kEV&$JvHK6EXF;zyAx%z=z`K@sDhYDjG_esUqy{Dm&~=?}a`)FUd-sbsZUgWiZwY zY|F{_-(!1-TQTt#Boa4w_b@g+2VN};PGT|z76ju)@jtmA4*CL#uKC^C9iF4ZXzkM++4c7CR?{OpxQ``7P8WU01M*y@zfh~He&Kd5;2d} zSkVC2Lq#DGmk%FU7u?n-kDUZFv|8ES(b}G>Mc5KtyG@@wkodi3{3tPq3a+cu=6%@L z=)zm?1-=)3uvnHAFskkxi0{e#u&-3>T1(IB@^D=&QT>L42ko=rtghZ(`9XA->f4Ey zDxJZ@M*$O|1vAF|15MIaN2$0$<@78GEaF?`&{H8a)mdfUgPrc(m-(@D3F0_#Nr*5f zc6DOzY=I!ZM5@MA54`(X%_YUrTBt2Un5DKtiXmidJY!rx30FJt#5>p4KCqTF28-lZ z-8t*hWiJ}tKlMc-N8sf@oeVUY{qvBDhoCPh`kKP=d>!KzOOM#w{}M7=AwZ%FxFlV zPkO}i7ElhtTERJl`F)cx0XkMf);dHQ5Gk0O+cf2?eCJ6idU0$Vk=NOj9}df4zH1bJ+ej%yJrYqk#u#mjm0V#}=^Zj1^p4#_#L1=2 zBqIYqckZJNVHAyc6ofn|7Jn^^6pbAKOs1yp2HfThiHpOdqcEc!Hb`$K{v8O<=`6vk zIVUK)bv7vZxNQi%p}LOcwqp*UqOULS9liAlEwxzwA`(Bi9;5zOE!Asg!u&o)DWRl# zl`}`OYxTUHDl@Bbg|1hzEl)KGF>x-KREXLREmDn9ti7nLtn2FXeB|fPv>&`7ua*lX z2U|B4bSfb_$)CLMDe?iN;>nK0aHWQ39^#2#zc^l8B?>pXt;&rFyZH}zZ~L|1j?Ng< zdMwnogeJ&JBbJ<9?ma(t+a*iqS~8@C2ZsjMN8~lBSN25x3A~buRWif|j$JEmw*0V7 zOT$CcLDkL(8(1M&?FDg*r~CIVKNYZHK%FJJ6^mo4;s~LDm5oD%cHeh@6>ARS^yQ`6W1Yu7h3=Q@OuzjA4-TFHSR#8>OqmRXeR@}I; zYH@?-JG>myr24AXXwFe5%c6-)!iB+U+(U=T_CBc=dA7{{#|>+()qiT#A3b7=QFCYf zRz9*8Jf>bqjoe@6N$G?1`1$9wT5FtV(VP6lP?fQdDOA=FFBaWf?Ia;_ zqF8gO2Qjbkut1jnHe~Xca^Im?*B^k$L?06MtEcumm$66V<&7Z8s(K2H+H1`%w~{p< z48<2mR13)Y|K60;;O9f{>X&Chb--T>22#lS5jh^8fDh1^^E1Sr{hDqignb~~|AaaU0J+$?q4i+?Mb>9$%mcjnQj2Gb$ufgO9fzHgxhMl8zo zEIxYHWDU?woZVZ#`;mSzSFx28H^S{*b(?do;T!FBhqM@A@0bYY}@?U`Gmq zK#N2zv~+bTdKF-A55`Q>!B=5qQG!BhI^Vq+LP*qnz?Q?znpSX=zT|9Z5K>lJ3fX;m z?R{bW9rT1`+X@=?&%rOnhgrp#EH3w;MxhOd@cXF9$hOskva}ok_&IO~5wi?(dTRKg9dtTp zj5Q*<+UQ0mdh|16V?p5YAaW4goZf+fj^yUU{Esm=yokDpImsj2H;<4FDFA6d6cy>k zizmKk&kAiWLkxt zn=>Z=yg)*H2o})RP7KHZ?GzNh#V!()PO#BJAd5K`A77tLPu|pYDa3-q9w^mzSZvw! z>NEl1h^)WA7&!WZ#K}HVpYJ8goi$d(B!Vx^Nf^Bw4V+)!#96+NWYsSDxOc?8cA8oZcM56LL;{)gU?%y>O+UckgCV2W} zhQo~`*XoATKt2bDfJWcIV8SAeh1}?&s@c=0D4=dA82F&<>>_S_ox_Y2 zE&iK_VQC(QB3$%XJP*~}U*U#!xS8`6<0WDQixB$u@gC3aUW*f{&GWYT*{_2NQeMAb zIY<}a>*4h9?}|Y3u%Mv8>}wC*Wid>N)>etZk6J=UZ|6GtZuUJMh*3Z{W&yzgcoYf8 zlm(Y&rlnv+Ca4Rk-%h*C3(JEB-Y<@Lm45#|Ra)nPbaT!*#bo+e0{4DA&^aEQ?rCa{`dU|1* z!XD)O(u_Ov92Jd$Sy|M8*?N>rHH=EGQ)|o24E~5YZY!mmX{U+*{A9OR75*OYvB2UAt^!~ z&9nWq_KgfZgf6<_Mx*V;3wIn{rwO*SvPz4)v5#Gvl;X4`O;wyI5VV>aCEO4lEYNI{0V{W;*ydH ztrjg~GB5pZrEW;YPJ>+nTMPI*kDcmu7?v_+p76iU0dC*2P76z!O_VjZx4&KlNQ4a? zE7%D6`T1aD5@I|bv39KO1sCh_<6DSPyfxQC19`VDa9Jy#PjFgTS?PD*WyDe*t88qv zQ&c&54sIW$uPXWEi(ZNFf%O*R<)ZJNs3P@#lf$(hUTFoqWm?_KO|lgu0r%0} zZ1Bb(JoCCCOv&}aK`BX%ln z|9-J$tRNpsC$r?h3m;o2%8GCk>jA;m(zo;EE<08Z#M|WedmZC6&-8da)(n6fl;A`hUPDZwWjnO#85n!V2_OWD>zQAD7 z16gqIWGT8L)xSvoRsWsyOMhQTXMzsYetLCH)&;J!< zdNAQKZAwajx_+M7{=EEJmK2#(M`An91Y`N)O-jDdA zP){!%ZEXPlY|J{0phCiA$siwS@-W1>Hb0ok8}g~dhU44>5@AaxdrONM96W=3;f2SZ zA$mvEE)(&TP%mZ=KSqG(2G(ZJQE}RMO|dZtJNxV7*pAhMu>79=ORGE!kXa{Sp}zyV z1Xs-M0w5{3xL9$Wtbce|4mMMx3@P4n+Uz z${*S_g^mr#8K$G#!UrB@fdx%p3dd{@Ckd;3_%;=yyr);~iFTFzWL z!Vcw@54F8}3n{=QM^ah&ut&Tf=?Cc+rsgDA^WkaQtaM0DH}AK5Dj3G2VxGjD@1@WQXr4?hEdi*P5z z^m(s5tCF=GEt>~n_nt%!UBrMuHgBx6m7Am$EF7+nL0u9a<>`YLnfAtiBoM9UlgdPN zbo5fqu$Z)gLHfe3EDS?XjF6xbM4*tI2h3Y+M!u|w3&&!@VixaNUvfqFVSRJyV@U-P z;U#oQ%QYza`+z4vcd1B&{jGAzc-YuaA+HY*5O#+U1w376)uhFTjU9aO&ey-(YiR?` z#>t%H7WX{A0p$hfsuL|QKM>)&(a~=)eW;msU^t74-qYbKGVJP;n1~eaNxN5P_`JG( zY(>bXHc`-olWQ(LJVS@7Ec|0RzpAl{_A?-V`v>!qY0x{>cfgB8Jb6eUs+pKL((Zv; zF6g|7wz09{wDFzIu*Kgf#;fMZEnYA1Wx><~ris{(;3}Hi+V)qAXx~yB-nDYC z|M-#dMK>o02jMA1w!xt{Ki-}}1{BBxA0AIx^>VlmHp=jYC#|Uc(PE!_CR_O`v2A9y z$)~Gk2Pn_6OCY_E55#uWAZUmvcDbR{QZO`>&OrZOTVHSMdP@RW?9S3{X1yYun9#uO zB1jH^9TMT6DdI%{7|QctNWgii8z;!$`MT|ql0r*yaWQnP>+pS_Pn5%sc@3|7eWf^>Ct8gZva!9zoHM$h&n@AJXb{AF3rKPc7}e z!DWPO6D-3J732>XxRn3J$Y2W;#0b%msn*^eSdHsd2ypE!tn%Oi6K?-|A=q5d275SQFV^l?;hm?xzSH+d z(eZip3+DvMayALZl{qWOs_3{XVQ&I-X)G)(r;}Y%xbKS)c_i}r)H^0Cqhh_2jO?6v zY;qPiS(G0AJ8y*5+s9`QJ`W;-9KU_ZQ{{K}eMG3iF1-fZa{!;KZ%niWVN}7^K#2U2 zApt{(a&+~p)l&~1K8MJFwT(?1TmuqLlB8WZW329Ox(lY?$y#2tnz3>@CI@m$gjq{zN5TnObNW-ShmDez7hbnR+m zNhpYUR#t{MlY`XK5D|sC2J-*b*=Arzr;zM`c1lLB%7wg941gg}9_OnIFA#}Sqy8G` z>+iyT3Z#I{#?!X8F?4ho9e#bnG5BQH2GMGSlgVe=ZiHv0PH|&fY5s+cfiQ-k=XQV_ z{O$Yq*RXX5{3r~Fovf{`wNBMM8yOj)LnrvZtO&A84+)8aADjnow2G0nB!`{YhzAJy zSD?=1ca&1Rs@`A%bA<~cJAA97*mvd*|6&8OzYXM`PVkl>n*>3DQALJf*RPx@kPlSol- z@4)Xdf zZBme0fHoB74_=5pwZxbM&EGkNx&oCrta?A^+bcFQM^c(c2fm->4j`xxc8e_R$K6Fg zxP6Z7rUN==21^M30f)8C%?@z%|1Z#{2KLpDA3Dx_h#7;#L8U`&RwNfJ->r7utPGz7 zy9y#LPaPa^@x(9g17FFp;Yfc+CFq0#<{QcC62uoj&p0gq{!K12(wK4Kg$Naiy2fpC zG=7X(>9!j&6T(ycS6iTj3kZa!rjkMI$?}WZdT2qJ z9Uc-Ry4cWd2^?PSfS9M*8=-&yA5GUBRcRaTvt1J=+fCDC+qNg$wr$&=ar|@&1j!Rudlv6nXSgU%- zmn9ql^B^-b8SAbFJ>Wo_-Pni%^dNonrKP2xaiol*ub7zybh0JjjvTBVlI%CJzF_^l&`P2!N=7R|x`o zwYnsYtul));+gQwXjWlACJRZiTUTmw-Zt?I|o2 z02e1G^#EuEsN?Lw)B&^>2z^<=go#5~R{m3OXzOQ}$CqzCZ=bGb0{{r*BTdh`Zmu!U z&<|b(uIYcz3w)>tV~L;7+YwkQ1c-9|t|RU|64zVlNGT^irSF$*N1qzE5du#HzNZ_McPe_k}Mv7$a9th5(lhU_||KiJm`HR)5_U9=etz z$;++-72G@r02zS3XT%C4*=!4F>5k9OF<#@-tTB&n+&%$b01Hh5&-j$%&CTf(328r} z;m?)8{n$JrH8|aH`}f=aZt5P5oI3nK;y{sg#jDX)l`s4cH98^_a64}wEt)xnQ}lu8 zxazz^`gDi`YDBD0@*jAmsA~15?+x{zRR$3;e2%on_w+5CF=#+vfa&lrFmQ+9>nJU< zj7Oe^jx%#}M}3OH0SU{eRc{Wk^n^)BGzOB?P;8rL!bDVN)2k zPpdItCS?Rj(EX9v&lVv>CD!EDfdfeTfKS98(52Toh~)IE;CmW~DuTciRGxhjdci*U zfWHly_gQc4Au{Ffgmr+gDq?~7FrcUTbeVoSuj~MK8aJRoFRQ7E)mX}@jG8;XXjoyF zXt8*;M6?FTAIlVU(+BQn8eo$EFspr9PJx~d;T3uG$-WHXo3jsKn?}EZa-uI5IRP&7 z{!U*Y(2qz^@o~uY9z()G1s-2riHV7Y+Qr`%+ka}D0nRgDD6|$(cLP}AP}K85r(d%B z_y?ft?*BwK0i!u^Uq6|2pv{nMJG`HS+5N0mx}8)3%EkqPCv%Pkhu(lq{IkCRG@t9sQ@?v~P~ z0bCipv0sRRyb1*5E?_6v)BMK`5TrMNPSo(@-#gU&r!(7i+Z)Ta^9Bm&af59D9L^B< zJlS2&v0ctr^xGummu+k2Up{?5z$A=1GAsdGV@hy8^`KU*r2-%ri-3^2@TY3df$+VQ zv9GbtkHq*ZH9@ZQPje%{KlA}QiMf@Puz~`Ti8v6zGLA}0whz1$gCtPy*S!)anrkvR zma_5yD~@{zS2E@H489Yk4Y_rqI5bx3ato(iReBU8?qXWbsny#m)7W_uTd7{JI9I{} z(9fSjX#k}F=F*|+2!O-})YYw8loS*}3Gy0cHm!RZ@iZztH}Sz1IjlKvUP|OX(Hj5i zD}J()l~0Q=#R}im)6g!%w-u)5+H>~hCTnDuk7fg$BhG%Fg)I#@USg@yMzC(Bb{q?%(TlXwsfqvdx&b3A5kTMrD*=H0RxqIhpFls5ih+lH1u?GoOiRuO6@bA7c_toWU|5gEnA8?L;c4H~@TENs14cKYEXJ0(M z0-De7z#1Zen+7WBry>%7F1~k&Xdyxz{~&xe2HYpW|82i+J=FpVUGO@fhwcT;Umu_C zJoEV<=?8%Wcfe=|6b8&27NASHoCiYblSN`PyJZ-63FiAD`7=d}A(!GLwNkFWd+cv= zYAU6b8`EEMxw;CYrUZo)m6Y_yC~Ba}Fj-_!#C!o>z;9$9bz!?c>c%P6NC&xcord6V zW=FLf^w80_s!kkk{ME1tuMxmUIUpM6nw`0lAd}M@DlFJx(1f5H><9$N9pG&I%Q@xV;%)w(`{f{Kdl^;rDvX4op>dVdx`?!E&;o4{% zd<+100*k@ZDUPlN;a|3PpK75I2hU<)Gk^i`DRv8w zg{ySmMjlbd8tl9CRL&oo-*NAa0h^W@hWoBSQG^Vh8}^JP8mlKo?mT_x4LF`QA!@RU0xFXQXf%*(7|78iJGi&`MR zv8`5+A?sE`A(9p1fHqrLCb3dl_DWiXooSz*zlWji;}7~NY`&_h*4iorDqXj4 z2h9@3N~?KJ$Eh35Q%-`-6AqcXfozNCLNrVnh;hpcCJvPoqSjeWU!xE$4>|{=ihd|| zDZ|N~jJ;^E{4u&MzB+tk-%UssR}pPs`ZX_GoHN?15zTbqWi&88fguO=;$D%1-jfoG zoj4_>qN<`h=7e(MSNZB^&t?9jpnU!tZ5xXr7;RC|rOp_JW)^q;HU;_DE+rfT$N0-0 z`p|07xiTafaAqDjoj@YwHv^$`-jC_HZ>eXF0fk~Dv%F6QWt=Epm-u^sNtV^Q!K>;? z%VS7TnQAq`j{eYcE96(vUi6JYe=D_6k&^2N!=NbRkyBeR zUeMg*B+`=c6?r^gHYIz|;+LgG>l0O(GMZgac<`OuG1b|SBdp4P8BAfj7o21`|GC%j ziTj0u-r#jO10k6?PJbk`JZe5}yth4ZQc6;zF=Fb{C9U}UL!17WQgZZByoGK#chz|N zlKhDe$#B}1iU&#!E5ZW|QAF}IAqd{rCs*+ofsvyRn?yXDs4B;<_Y#E+TK6Gt(-d3j z7v^7;8BoW6t&tIbHwPx7S0Isa?dt#>u?R^onVTEPGDE}4{d zz5Sw>cu%CmR6hD58jr4r|0JNG!t9N#{)4yS{<&k(l?F?#{zc9-9{4L>vdGfZN1f`rC z4TmGs+tvgREtyRtFf+z9IVwO2JU&;U-u+kgb{XJWOg&qGJ2y5X`2gq`uGAMxuS0m-we_?yzp1 z;#2R!jn7nZdLWzleN+8uA?k2Ai6I1Yd54y>-3b>dxxS3krGmNANb8J~se@N%h9>@1 zd4bq6dD(-MK;bZmOx5Gz!Q^Me_VcJrMs*zt|1TMzt!YPcuBq$nv=Rwcx%5u?za&KR zK$1Sao7wxiMDRihDUrCqx{xC*KBjr5+u5hm4vnPx7%6(;rKaPT2?&`JRpRQh6Y8zvZ@Ug|U>KhqBaxwnW-vB=&OBYQs~TQ@OwN+Kc{pl%C6NxMgClZX*%w0~#=R`_JZLaksSiHur>{TI&*a=70@K?(z_~+=jSx|_3){Gx>c!Kg?4M?`GRiv;RYd0Tq1h)n z?DQyx8;nRwVpMO{0*2tpbJAq3N@@I4d|B$_v(3D&yL{I z;oU(N8aDcG?d=lkQc~XmR(KM2sXsHSvPE+JTXxBFA9Ku*^88@FG;Zg9hYsB8;MdVe zl}Y+{uXT|EBDxI!N~*C?Nd2~jF}M*AX@3+{fU{t7lZ2rOF!&Q(r!N%pxoKD3aIh3P z;%8Ek@M|Y}v#i2P3oPn)w73W^ped=l8-C+%eji{&~erx zsq}70V!XejBwyF_iw7s;S*1NS5mV^HWNY<=aS8t7r9L5xqFN%Y@+}_q3-4m#Z3uur zNChMu`=_#6*?sO3j%E%_ggmp1@(p|EcAdmtnO2fTvGz&S&oVk)WqB&J{)3lLG8B^jvuW!{&<|{hMRVJ?a zm;VG<`_mTLL0AvS>~VkM{qO4$QycX2&SJz=V|Q78|ETebtC@4&cSQH)=qvEI*tA zfSSUE3cC_@oF5Y*h&cbfXUSn=(g{x~W>I(>|A-R5T$0-lYS)Mh2?(3j4@SLV*DM>3 zNuzng$5Jb75(x1-q2Kn8i$VyS3X64QgE41Uo93X(NX{`Po5bzh$?PRWsk{WBf9V!Z zv-Oudy0|_A#`q3bRwA<{*y! zFc1|V>==6(Zj>4C?~&^FM6)z9;*+%M_n5Txm~<8PK-fMzJriEz{Lsyqohv?DJzCeg zu8=JB%Yc3t5Zsd71XlMhIDPt6Zf}8|br3D<)?rG3lMUde{kN~!q#ueL6W%RLTX!e{&G-FUI%uMJ4_>sJtPJwH&! z2Ck=Ry0#4+#iCK2gc6aAqygdteU5+$n8aQAAQ7d4a~MT3<0=siiiO@ znTt!hv93@qt_DXv#x&eO+)c!L@9rm>1>b{*iE@vc4*yF~#zekBA!B0`W1SjWzN^<) zV^vckY6XReICKKJQjm4UT1}Z6?F8JYy!_fu+$cLcSP;_fzIeh1!$piUsQqf9(n>of z;*z2=oAQWFgD>_pUIn3>W+ zC#Wfipq%Xc4)MhaIvI_oO-le0Mg_yhoxg74jhhNpx}a*9Bu_YUsjqB8lQ^}_q&-jq z27j$o&tJg2DM*lL&TbY~^6k->Ul9Z|ap%wx6URtKga7Kjv*TVlc{$S;W!|Z* zp|G3o$bRbOtejtTJb#0mOilh6G?9d+Hqz>B^E>d6&V`t&w-Ev$!u;QPhZYofEs~x2BFHN}g9Bl{ zx9(gQlyz#y!{rORk6u6UOtz+*Km9*d2olJ;ttoB7<$*P|KPPo415Y7I`9Rhq zqrs`!X!99<%#~lHok)TZbC1TQ`hwDMNBSW+9{K~q15*MN_nFD+^efI^H`-i>EpTauSmO9vX;v zv^Ez5o{J7MG zde&9tu(|I|7}8lxdn)lHX^am6bd$%Ncp#&Q43CoGezWhz;{xF)V-RoM^hK@QB>WN= zYrCh>Q>G)LC86XlpzQ*ZcIi=TaV`BpW-wgaUv`7WcZE~Rs8t_e{6vt!1Bm!(YG&E} z6yWBwfFD9AIv5o`L@XEh7RZh`Ohs7qyOL(sK!x=O& zK(oI^0aN;!lRqNh=^Un4DD<{G9END9;yc5?ATM5_Z!VQ3cg`2jkNuX)w_Mv&QVgVi zXfy{B=rRAV1?YzbIht44yrm0^3qkL@rE?<_j(65#v;p^L9% ze3^@sS8#XVRBJ;p)Jk4ca$Rxjqo@QV2DwN-vLokC2GHaKWI;V)R+&mf3 zuO?CBBvIpgV&Lgl!H6g<_r1FVW0X|o)Q^=Dzmt-+c~KP$yyfY@BpZ>VHW9Kai!xS_ z%CJohI9=**ND1t3&%jjQ8Bbx&rvmB9u#JVm5!Q#74r$=Hv((FG?ULZLf?bhM_D2U` z)ue9Y&~yc~a#{i`6yYc*gN5|hmRe53HC zg=ir4`v&JAg5{IIzwnKZCTYp*+vIj;6ll+TiK$yj`b#;awghPvh(aK*4@se^kBG5`&QOxnANRB%5 zlgo|}RK<23{Uz%>BxjH>ux^YuN;4iUvGpT08&4&P8E7&08eJ2VnvG8#BK+Zx-OZT_ zGF~`=iM`f^H$&yP%_Z=vOFzbLh3s1@Yh@XbN` zmy$6t)is&a?UyI};qIN|9>u5L>jc`ywMkDDi@xCULU!^jsFYFv^H_a+OQzw6>j+bj z2!Hfx0jkPYi_4wep8VkZ-=>q8a@b1R;5JviK%HO0QDy!MQBLOMKTQw}YrjvQ9GQYMuPLoL z0v0+EL{xe$g|gZjo_QQ3LQUGM+xeqbfqT4k^V*2d98?^fe+teL{PCGGI#@KBfG_!w9{G@bQ$W7v7anti z4wq6FbruLO1a2TTy8R3=Wq7|{AF0hq+7%u)53J8y6ewHtJWT3EB3uJ9)S#82li#CRB z+4?aM!vd`dplWmd!G{zK)WHoJA+S{90^-5FOQMMDlcss9ut^va6f(Lj_SJY5KD~h< zL8{^yN~TQkq>OqX4h)3mHTKh+g)?H?w&oZV#`CfQ#KjY%9p)HXu1e<}>1xqrF0>4} zFw}EfBci~1oyhGIvn$&DGKJBfELkg@qB=WwsZ^}Uuy0IZ^mR0m^Q6{bJM!&9=))(9 zP!zBg-=efi(^NsTj*%n96y^`(70oJG8NN;L^!GE1recC5>$iy8sgtn_^a_Ev@E5db z2A8Q2S9~!_hJ&I}k?%q(f{iQjYfax~K{IRibHO!hnj2qBvt@~A)e_H`=$&UW$((3S zpm;{2&I;+z)CieS1cTMrk^^j3p0$>FG0HG(x#21bofd+lU?RcPRIF8QYe&>zOobs- zC`k-DyfkfQiJ7mi+=z9cE_+dem6b++C6YJe~A8MN*GXbSU)KL zjDAp&qu@(|VkYg3-2O~QHoL+$KLU`E1q?a3ekGcL>LC7TD5Js{(W;onQqbR?OE)%^ zbIMS34EpZ&uu>C|;;AYAZ5&a*5Vpl(e=4Ds8i#OzH9!8gGi$~2gz|8f4xOb54MpS6 zXmmalFLug-L?VGE&_I%;D`R)7b7!g~42Xb6H}8e8@l-PLA8b4+IbaJaASn`#{PS5Q zo}yol>rI^q_ubGM2-*`i$`ejG986+kgk!$m_&#nq=bpihVvB1?1q-=@xShli({+qsy z38sZT=t(~}MQZBxh$qau7ILXd6Mo%waKqxL6mKa8)JBlidR$`?&99Cuax}ej;U@5hpLN^y@NXv2mSRg{o zvg5jIv8xp;GyeX`pxhLb@WdTaoEF#aaNASqf`Wk{r>`~xl74cp=>);o+%3i$cYM6u{*LTfH@ie{~Hvs1InO zg%|fNP}{CV=pE9Kj+GUlo80X`0QO0_fBM??PIysNb6Y5%hx2m5lUZt6Au z@iK&v-Kr+2_wD#9ucf7{dikHr>f0mEy^q5v@=zU*CzPHO>H?N6QF`{Ed zk#%e{I122P4j0MPau}KyFKVGDIf^dM0YfFaEcR67KunaGpZG-}L#;`l z>B<%}6i2KhvICmv+{+mSLN0B-_U;<8M&jnv@Sz);)8_3Wh~V-Fu3L-;m@2lZEM0W zDDkx7~(ss?E(x?|i*s`FeBAaU~aFucvZ5HnFK{l=WffU@0-Lk?>HyAU@(~ zV#zqH*cZ3G^HNf&R}SP@D$OIHAfsTXG*QQFci56mKDWnTjUx4CW(IsluG!9D1mtp? zqiBf~w4JU!$r_T_Wslo<^pN z(wVE0G?0fn;6JZ&$1E$H>^bvo0gCP3HeQyJRFu*PH6a4$tzQBs|C}=#ns}0eq_nO@ z%wzGG>&@`}7q6mjEWUKS{+NIIzuAy?w&J08gJ-ytg32Y-OJ=`*I4gf$)aw3wNa1)^ z(705k*);k#>W)xf@@l{|eY#*u6Sf-GmN&%H`x!(4ytZJUaC_+^fnYd+8{x}>g-+kp{b zp=d!-X79hs;Y^j$e#N&s)l%OyR)tg71a{RhZdwGc(TBO+GcWe#g@^p2lgXdQxUhg^0)E0l(NfFToVBT`{yLw$$`!bxWII$&$nx0J z{T-;ybF#3E`Q2L|puj6aQ*L1Z;pOdnYeKXsV53-N(7h+IWn!+iGfa1 zXyRml_;~cK0CwS?tOSQ>xa8+l@p)h@oVpK3a(@RwtH?#j0SBTvQkOJMu-#nUlGC2c=(LB$q_f#RFY`f3Zh2j>Zf20LdW!PM0 zzte+=q-FngyjRnu(d|4WZ~Svq*V-87ass zuV9-uzYhQVH28F?G)2CvrUru7;Z%YxHP$^91;g)5D$U&!;YT9db?i4dFZagq&+F&S z1vSZN)QZYy{VVR5yb5*bmy!Y}r@IfsF2)D&^p&CBfh75nro__QX_ry05oEfDb%;Av|_W$JS4L?&}OLM)Y(o}=%A zuB01px4o)*3Rh7bFR8*Zq33g2K_o`f<|IJ~x&Xe@MI80d z3$y;Orl^|eYyly-H-ih%jpZIhXxDQA!)qe0w&V>C71T>L z?`?tQ9Ggl(h~KQFOT7$9Z($czudJTeLQ-mXn6}VNHfq9){lmeL0P*E?-3?{`04!Y@8LxFxQc#C82)FAyV${@T@AjEDHuA&O;M`^? z&|nyhbi<{}Xrx;h8r;$iQ&K48S`@TYZKT)H?#;h95-N$;LAowi)-QYb$N%e0;1?y9 zFKa%Mx1J*Qw8xN27EtzpR^VxtkoyDmY<-*9;jE+tp??>+?teD$Je4Em_UA8x&*3?C zv+d0e@9}1^^$p|H>m11=P z32GJTf&{b+q-Nj?2M?BQo&29$Iyg1FrSbv0d{Axm_H= z;94H?6=rT^yU1g=-_;$P&3Q3$!t%u1dR04|4&u4Qa*cL!xbBH&SoUeZ{L3j2=?J8! zp_;ptr}a##Mv|S}&w0S;#$1r$FWP4b!r`?tlsU(Bt;`IKGB61J!o?P2zp2h9OU_pG zJar=FW_)Y?rZ_X;=3w{ja@`e8!Wx|`w+Xt>WMbd#ea+HL+qR&ET*sYlG3Y0yA7kn{ zM1390R_wav$uwDM4hX0?k(y|bGJ}EHKc=;9oFM~i?Dr=t=;kGF9)U?YgKGPE2^ocB zt~$sx+~JRvR=-%}shu9*8z$Lvoc=l;@V}l0dVWPTGG}AbNm7Z5e)doD1*zH!pi0U` zDgu@35!HKWA0pgyMb*U93 zA`gSUYj;>T!@*c}cK?{le^|#g`Zd>E2v*8~>C2L@WMzxg%eqbkJ~z5tpdJL_xKgQJP^rkF1PJL$)V(4%8-^Nx5QN#zEU)I1R%+FjRSS23fA(%%lbi$L zQ?7}MtL=lz0ch-X@sRD-w60f#zR(h~J_nEg);i-I+?Uk(Nm@9jGJcFr#bu;bOO zQ2#X|pH|LLk@Vf|PR{UmEswb}awL*gKdfGV+NbM1B9Q~4;Jz>}&W5hN^Lnr%yRJIY zC}F{HmrxC-8{v+9s|!0YXv#wy{M`jIZ6dm>!7*w5n#E+{kz#hQI>&snX>UV?;ZoSt zqv4zWhvjS9uGpP}6dv~O(AZfGEtE>DnVpA;Zw0(d!le8DHMAX$ZW-zwtU6+l3uCHQ zGnX+fxTdd4MX(!T+4V#kJVC(@C$h$HJdw-sT} zJ4a`!H+I|3Z+lW|*Smq4b-tE0{}{|;W0aKg@(fj&T8YO%veXkao}!(3V3jC9$iD<> zq$;ZUUoW0###M5KBJ)74F3fHh+6XiV>{vINwXA+lc!8DYl-j23H#>q1*m1O!nEcw~ zz2Pd_Zk4dV7%zpfn+D}fb6XX-Rjnm<#2&bP-{~?Y;Ges;t_J?_kh0fZe0SlsOoLUG z$ZETlxsPI*Q%|{Exr;;1*|%8mITNYFqUo?3`7lcXvEV`@OjLj(bTOQ?V$iuHM><>-iv%hqf)!IS zQJ%*Suk;8#Zenp`cSrjIS9)GR-HeM8rApJbv)s{-wm72yx}h5>qZ`zb>Pt(cUE=vF zUjES#ME=`=rJ%9w+4_$)9V9wdSzb!WSXzsBYKd#8M7}O6N!ZZ+>x7zVoC%Ab($uoR z*kiM4i#4pEp%!uojrX&%F{Uri<}lm0$=%Uu-ivzTpd0d{WDICnju1twmWV^hNrArH zpl^B=F4+zzy)4Qm7|dVj*Q`Hz#!HYhB+A_nlM`)bj9!WBSivV5_MY$|WWJzQ7)oxK zC8+)q@g!N=U)RNv+r3Z9k9$35e8I0*JmFj2-s+Ypl@{N279(f$UiKgc3(moCvlqBw zSfx{K)e507*Gs?q9X@m=pINCrQeboF+T(lT=q2?-gXE4abET4Npj&vLH5AhSW_XP_2NQ~2}{0){|T&af~NR3o^rolpJQU+w!6G>IR_9AavTnFTHvLzvxr~> z7<74{#cXI;G3=g1ZVzr-XZ8Emy-;29-D3+o!_Y$ag`8p4_+qhb`M@`grKAr|q^8o6 z1HY~owU!`aEN0LXmZ`j|(l*WH))*?u<`#vf>+*Ppncvid=5Jz&U22jDdx0~v6guh< z8ns3i%qw9=``wJVe=yI~TqN_hC8fk(+Xek#vA2lckqsN>Ok|TM;x7rVAGm_%qU!R? zfhK~MmVfFrz=X6=xMLF_K-a8U4L%yUpME!S{G+z+STopwRZ>b)k!3GB2*FryMKcz? zU_2!2ak49b_>%$uymn~2ulAR4Kuqj$|G>YLzaV5e_tUdrus&{YI7J1#YwG02#m5a@&%{Q zVV-J1`#B+6NYcn}a|H23!j0fcJs*9OF}xB-{>l=MYdk&DDt+Y)=`yJJ?N%X%wIr%@wLXDM6i8YnBv* z_QPOAEThQ8+r%AnyZx5Vr|N^$&F;*GyY@;V2m~!aJiTB(!yD_W+xhEaxT>9vI<)g( zsmSsL3`Dqqa=od7R_ZHohcuJ1|K@z9ks#ong=D=wv!vU<5XxW55Ib9AMq304u{ey| z+slHLl|c;}e&n^vQF3dvMg2H0Hn$?IF06@9%OCW@b$F!(b~N^f<;UCceo54ml(JEF zuq%7<`nQawPqvnA@)>NRz}?B#;VNlB3@~8vTekfY^;4_%LZ7&b5ujUDPkcZK_)=jjgnFtx z5asnn$U=Yf^4MeTI37+kMs;rkgpEK2YWUsmL#npS&)wptV|nQ79nV00x=TI52f1&OjFl zo^JQ&TKSO}^+Y7*1rJl5Loz`5_P6srzG)-8mF8aRy$7;C&Ct-eu-Bcv;Xtgs$R^F+ zW%~^k$-^nair1~mip!0-80w?V#CH4nE{%a0@D zCnqKo6o3g91~C^D7oYJjFfCU>DQZE5fZ0V})`ctBqwekg9mk#JmbR<(M=a9i=#%Pi znTqIHDvPsqw93g28+Yxtvn!ayqrBXtM399bhmvJZgRm2X62@3ijLH<_*YhyPoQduZ zgMR%$Vz}4{L0=~jGi9VMr&^t7>GXcAQOGoN2?e;j=oL0_&g1BE z3d#6z<-t&}@}zA<1fP{HS=m_;4HPjmBcGRwZFlqibNe2%p|7v2389Gltga-aWxT#T z{bnm{$b@EhJj9JVq9oR2t=78`sLf7J$l{zg=UUXU{zW|G$oZ`eGyYx8@2R?_-sQ1TP1iikKeC~1?;zAs5qK?JS+Yv3OA!8 z?tiHOt<@Vt@Vh*Gi^Y5tNo;w=#Y;O95-t)G;ughLy6$GIFBcP+aWJ~JAHoJz6FA=I zl<>47N#NLWyjCYgr7Frvl``WER*^$zHLXafycj5p^h-m_jke5rkdMlaRrlEJTok!g(tmUt;AH{80>W75>q(uib&K zbX<@TY<`f!=(5A`q>fu%!A5O9!y&PX_6}$4O$OH#UX9o12Kb7=jDZhNLH2pD@7mya-2eue>XxtWqEuxFD6o5pSxx1BDPGITvF3mg4G21z3!MsU|HC0 zIci%1)1X!|_mNJJC#Z|V%rw-ytBbH@rmuBH@^6RMk=;kGM^)}wzjg}b35vKXrgi_e z(6!QHPZw^qD2>RvhLX)ul6;};ph6__G3OH-yvk1=2xk~u)MrGSbWd=6VQ)dadC~8( z9D(YDJ8J(<)gPdz1MIpus`0_?C`aDuO^MyP3CuOHGYF*{;FpYe>E3U3d7ofkS%Ko; zJLmc-a@9n^m53s!S`kyJV~q;wI&HC-(tbQ*@XB>8WQl+EFtvWj1Exh-b=LCa5)}RB zapS418{4!B>LNKIxqg4vw8U*v&4OPvsgoo4@$DYWe5@N$@1F2$Z_KL5Btzp(FxHX1 z(N989)z!&~|ybQOUWVy5xyt~Xar>U^4w(el=!la*4gZB4Gi03s`qHjAPji#QoHxR3+kQsG#)iAQXmF}0eTwkLMZ1E^59iaGNWv@8Zy-%^gXbd z&+=a~k(D)Mv5E@=Cq^o$^;b3ZOc#w!2%8?kN^0o!B~YPw7fO@Sp&`jKTiVJ$OG&u5^zwWORdpXw^|8%!~>Y%tD1)umDpr=yG8sYbQ?65%`TJ5}d z3qBEq=9RW07I$m_8ay#zq7=7r<)JAC#(*Xk;+jFmz-I;#Bah)$ctq^KF^a!@lQGB1cq&dHo|hKT4`zs!0ng6$4^H;sjrr4d zKlQNLR!H{L!$$!k|NOX~J97H~F+=&Z9|_ALeu9K(d=d>CpfhEU5C&am2Yt_t{;U7G zTGBO4-FnrNy)6@BSK2nflVE}|OLqil9zoK1kbFW!Y6~{MSap~Z{u`2`=5}>KYq*nv zrZAT@8LbQbLX426F8^Ji5mOH$y^+KBf<_56iv9aoyT{7O>cIJ=+bB!T*`EX>ci3ksyG%H$CbP5BmVvUV=G+EYzJ8i}2Y|GLhe_&E~j?F+BvYTK8e zFSg+UoMc)I5E}E+6WQr>N7Gw)b=m&Qu-dERWWAW6rD{$pB$k}toCvF_ft1!> z7-B63n_lwwj+IbOtOb^=fbQ3Tzl*)f#OAK|OflY2cR`;XcWi+v!+)FvL*i|%o9=5| z8!TNjEg?6^lBW2zO*7<#M2NkYB@w~vXe1MHbys>|`oq~XmN={BSsIy`YzC>1zA^TZ?EdX;brKzE&`ct1}D zj>rNb6uy~~w9}Ei|4c$%b?XWdT<^qQKjK{7f&vk#-M-+G&VK51y^UlEcHB17KlYW# z0P!xHJ$0t4oVv(RR<{EF+*3I}<(88%uZl5MvZc@ny{>1M&Iuv+UajdQg=& zoauJ!AGQ?xlMAQ4WLn}_-l2?@RtzZG z+Hp9TZ@Mo~vX4G+na#+0t{?B`L{(@?=i@csIwNV1M)H|_e}jTC#!1BO1drQu%b?+4 zaF&yj&&m@(tm9j7g3n5td(#OSfFv4BOl_Vz*RC2m|F&!%IY+{-pwX(zs25#{2iYnE z_asm%t9O@$>CE}C0ms1{nGxt}IA1?V;WDu=3d!-mcwX$0c)qiZg0iO~E<;f)Er{Et zB}_CB5Q+UmOvrfF8{{PocauMM8N|P1i}~#(GA0Pk`acvCk%dNsmiHhc+o~4wMmE{G zZcuNCnkxM9M5{@7RezXQTva}xrMf2o|KYXP@fe$6>w(nDmt3H(q(Q@MW@ph=H$+>N zoLz4>h_Efj!M)A_?YDm zk4`C9IrYm01QD!T1Jt>Dkb@2WxOd$ElOp|OmJf7VLbZAe^@_^@W{0mCJg-L)mK;9j z^K?4($FSiK2eA&1r~m^nqr^d4DojZ)4t@?sVj;qqzOZb#;LycrA(BGjb*j%~+V$g( zOe@->|6^67ywV}B1(iT}XJ5|GZZIZWVF{5<73^-pv6YuCVj!AuaO^#nG>e)Q&(QE= zB5t?C))%sh1D=u?>G|gn_s<%0agK=6IZ+cZEUEvY=^D5)?Z0leZ9Unxd1u?U-DKOg zYjRDtZQGn|*W3KpdcVPSo%K83XK!@mvdk(!qzkFbHNU09McWK{H{jmgJ}L7Sx$YBM z@JP1gqvVt&IEhrEPDRz#&vL;gkR5{aLaLPxXOn6J0*-F4`WGp~!&pqO9c{w3nD0GQ z6!n@P^4c17YDyU@$NOT1xut_eR3!wN#>z5LF`+RNyW=_|TB*hj!=G;5HvWjvSS52q zl25U!(-?A6m-ESX2u{VD;zAz-fW+zZsLi?bY#Dul*K1&##X~<{^3fe|t@FW~N>Kut zn0WuU*xcel@>c25mlyu5l+v#@$e^Rd(BEEkGYooBt-I^orbrt+l%wpTxf+;%`L@J= z(a;a2R~tQ|D~`OpAq@lB$<|?_l97mY(N*X3k77rCo9hRYjM^2Dt^8b%CFa*2B69aj zwPIO1>ERZij@T_~J36RY1XSMy7$|y34s(IS*rlN>SQ3DCj(zl>hcOoYu=+1139H-t z**djAzB0cX309YSp!ZLqSchTbvK@UKp06tL`Co#DIXInDtOC2m@^A^fHxSgL8o-_J zM+Clk`q#fgqjc)F?h7TZhxKp%Vvm|3*Xr>cR3YDwI`G_Ahdv#m;jGuu-@_m<%8+i7E9G^?Yt1 z@j(BLxE-hq%=K4ZPa1gszTDzAK}Tb+q{R)rDD9yL3_|UrM^#tEs>(mSTR->uo zZT){nU(Lkgy2~)Pcwld z2H-}z9^NNYTHO<&`itOl9%26$?8P~2XfU~ztAVs~XiM>D7mzr+$Wg5zgEpQrC}wUx z;a`m8Z+1tqwPWIlDvX@TdEa1SFB<ZC)n=j@D~_Lt z0rR+gl^#Hm&atomxR$p0gg`T8nzUil?$*@>bWfz@TB{cb%iECqWb?t&k$Ej&)B&GB zxNe7gKFQybk&%wq*JXGa-CXm(@ES4R&oj3$g57e^lNP*Ej-_sJ`r?&9RAQ^GY#fM! zHbz`?O))ss>BCp_&mKP2u2r$5eNzJ?+#}ThAp4}jni1;l>ZFdI3$@j64W{Y_8KG(2 z(9A{U*ZNxfR(xay`8v}PyN`h$s$2CLJ$DAUMQLX(^0>(;;7=rDBWf4}RW!rC;)6~~ zYX2m3Iuz+f*XEyojD4Bb9&Hg-kF1QxC7Q1uQE^!j_efOU(EfW(a{b|M{DEgxX(KEl zz=xCdBYjQ2tQGZB;&wj7zOd^ej>{jJ8qd*zKxN*H!e26eKjqDl7rwH%sw%chiV8T0 zl_Tit@5boh-hTW7JR@|zV{2wmj4IGDce~R|JJ=rGc-?z_h2wd8;79YccLuJ}g_LkS zw6Xfbvqm{tw9hB?1m@mX@D90WG31E*!`{~x^fsr!$-bPIsZG4THaFg2DIsie*|2mxkF8S`I(ZGoQtQ$?2~N90iIizjb9CVSkB zk{*0EEmTJd9eA0$ykV~{Z{UUg{HA8x2@!oE?_3u^FIYd!49Ri|!tY?0(-LnuQ^cmC z42#!&ncs12hwGkat9ixQJ1$LBCLbfh&v6ph;(`k#Y;d@J`SOdVFeJOB5{Sm8CwtFH;s-Mvs@48)1gmD4e~vaXsHgwy6i{ zZN2}GRMex%QDAYu@&%YRz9E--GqGiptXi$&V1ruPUXtU$mMxl?E22}DCWIq-(DOGV zXozMBBc#FnsL6onDP%#MKQPi0Y`-B2)+l5QNUNJZD23O>HL3RW@E;P6X4MS!XX^2i zj$~Ksg=9(aPBOA5UNsRm#cp_WFr$yaH=|ce>fd8*#E2~E&he2){q&eFXuGZ9NOi<6BxCy=%|q%?U8_J z>xD`RFktWy8fE)~-v#=;T^({q`Mm@P^9+ zP8^P4jaOgKY%}qS;bvBHW06+9ym@>r-&{XldTjpLF99k<21ppkRg@Z2--yBj6+?}- z+@FXp8%PeDbUxpBK`1=E2TnoZDpH(0qFM3ZDBza~F~MoX8kPZNmx|QHoZA`CFCJW4 zf4OmJWqBwNOuOu%t6?fQdz@Z?u|SobQuM{F1M?pjcv#~%$E>g@2WEBz95NsgVgj`D zlonWvt&^oU9{{HQ(8!!U(UAQPTlGsqa_Ms+bi$P5LJ0+S3xl#^@Qa(nUU`60j}o&Gw3%jsl?A@Bqs z;j3 zCe~=9%-sr|EXj8VL~mUIWJ914Juf4tx9mGkGn<#U{6L{NG?o;3v>1B|6xVDZ84aoU zVPQx6OX0_OYQ%F_RF|nR3?(m&cdzL#!AkN0Rx}?quP$i~2*6DlB%O1~oHwHIO{5<+5WD4p zO?5sg+Sgjc%c^#SZh0`}2EZxfX0vq(&a3R5vVSR9cWn1_BG~EWfwei7;Pfq*2AQ&_ zSS)|{iV{2h4Iigt%jj)$k?Ied+;P~OEE3b^`037UbEDK=LBW%E*My>(icbPa(w6rz z3tAG5z6C*_5uSHn@1D!bky9S4re$X8M?pU=cjQx!Winm>jxh3|cBws4^X0(mw zZ|YEnQxB6-%W_F;WE27;UTKgnsedRZLl1cPL6}>U)ahxnv-9|3>Z6ov{yPJsD9KN- z{zKE7+!!V2x=VcIWlBS?h3N?83Psj#gFFqB1&QH*({}9qGBos!IuT>aTW=}gw)|cI zXV55#(8ATs}@B(aCHMMErqh$ z5Xk&7k;N}?UDae+5Eo0}8NGOm3NVpR^wQk;P~;{Lyo2#HD}=atPJ6@H zcolwd8_k!Dy57j7FY4d@OD%zhLj)xK2RhJlcRBF&bW|2(RZI1{&h;q89vvrOU#R3$ z+VKOP@@jS=4w`biWyb zlv$Kua(@i8Ot2h#0h_L&J8e>LeDKEbS(WD8Sx*=X>LmMAY^aeI_+1J)n~}V)M-<IOYM)b>L z4|Q&)L}1wJ(n5@hZy3N5YI{Azx?cN#dNth`<))GoG1oR~?6iKd0lq@q$?fae!eAba zip?>v@Vz)s$2}p9?`x-fB92w$s0@>Yt1wvGLEtKlc^c#{k9j1tQ%Qz+_{wfVhSF|> zoTUAAKQ#Jc!GK87e0^@?Ze<^F2sT`>d{S_Vp*>Pa3q}qoDU;NSWpo0aOxXvO6Jf;j zUI_OpR;>dr@Imsc$d4DyPz&HBDDg2#k^?6hN^-Fu3-|`o^{n=LUe#A_7w4$IzT)gc ziBgm?#sf_PWKi^StPe($_{?%qgCCRmjGP^w;5=?bCnQyV8;01FlF)Jw3vk5pq4wm*`KsN0jv-7OUQOoU^)A z^@wjq9Z*l}ZCfx(oeLg7d6+Bew^s!HY+Nz&GoKhWOXfE|{~;FY{l@)qOfeK$%0@sT zU1Q`td37Ww`cOHA9sbQZkXErON=>rHQ89Q?IFLoaZ!#D;I!n}o68}^ZR>OHYSz`5> zWlO63p0Y?n9|M{id9s&9d;Pwqv&rZDFOv60A`_s0#ypkywbkMJ@;vWj4?0THvwL|r zInNAc%E9v4WhZU)aM3z;&HKrRBDmDNOCbQ)>EIShMNZ?5)fgW@!A}v1PDhuo8B5}J z!LIMxk3>Bai(%XJuWF-Pr_L3=Qa5@P;lDmV&Z+qpGHDI`oBr*&u6bX%V9k77;e^~Ij<()o zf?+vtxj)PfY$T=}u4&`W$uOySYJtkowNjGQKY^?Tixl?~gYMa(@M9qILqu;4vYQgS z%lIase~!l_42h>{u;!dBBVSWE@bd+l3m1P~h3Po6gwwu;J3lCSUWgJ?$s-mndJ{NDF_smKMuE2pKMW zHt~O!;>YQ{cOsD`_`gBBW9~#^pv_3*+=$omHK1DsSLP9A9B7fzEKLWxm?fc<%_bgE zga^u5b6QD28v0Gc zP<$EBX(fyOp5UXS%}(cr`(Kl1)P6~pED`HOVsW|9X9*RV_ir^Ic(-nvrt`dqN+2vC z5UQF7-tcev=mtzUkRIOe+FL18w6f-Gf08}4r2fP*_Y-L%l--d&P$+Klq@^e@^zMDfuCJ zBkGLE1%X)F@TF@;9O6Fe+gkiNR3@A5{R!K#W*4XuDVuWHYJOT^u!AAbiPp*d#nzbS zgJ!@%1O-Gg$^Z%<{Al3{B=XUIxDNkIYR4`TrslyL>RVA~hgu%h#R1Xvl z#TJ4{h#Ls~e0)qtZ=>C(*P#E93yIkDF2g!ZSYhtSL~wAhp7Un+2Nz9)qe2^vw9Xuy z+#EQ~(mT)oinzrStW_QG{nxJ}@(s}2aIbO3q zI_0E?2hJ&2YxshLJZj@`9gWaxcd!|Z3N1A&!?z2l9+~IRJhjP^cob~95KP4d$N^X* z@VY}Fx?dVR%KYb=F!LXjTbt47yVl?edf3nEh<}l4$G3`RpgU>AjWxLb%)PGCSHLTb z+Rn;jW9+^abpx4JhD{wFXV+EAfE)}S;=jeNEg-G-pF0$8agcbTp`~FeZ||=b1#GP0 zngAaQp@Hxqq!g~9V%vaVQms)J{G=UrgGA(646lB+FH2bAtcMTs45BU<%RU3K6>HSC zP9T-uJ9J1acq&`)MrPgRWa9W!vVsh%>I%R@C<)&7LLB~opD%lUPT(WCAU`9xf4~izGi7K74GP39x0E5O`ZJgRSxWp zIDEa$+aSivZ+6$*zk>fIYh$SYFp*^a>j{O_AQ-%+I^1`G29B~QiU_&1E;0=dG-OnY zLH6D*JTIgP2K%ZJducFzOEtQ`BTA$#rq>~FsRakVoIiyKSdo^EFAJ?Z_A+iOmsF>S zcWOXxt|@+iAduHX4m${}su;bJxOz;MJb(lQ@pTXj*rLdIVC4CQ#TMPnS#sw5ebvP1 zQNgGHG~&%*YXm(2r^lGVoq+&|EsDjTN4Vf-6dBc9dizn6R)8_X|U5k5`nrJqSM4QV-ag!Cvl*$t$ zkWn&fK|GlQAv_U=#zW(?9rdqg1OgW8Dk6MR8h;rmP%`M^AXH)ThcU`bdqfQB zIcj)xj3p%jge*A9`1S#xv}Cx?4q_n>-VtV9UIsHUG2h`D%>!xYg4lbK_L$V1F}B$# zgEClhBhpkhCLgC`_G6uYL_gI@XJN{UpHl*3n==CjJXwU3F(B`UtoH@!l4~yLhLF-m z-p6=u%hw`Z48Zl%{DkhpM3ey5vd^y$YII$p{~#GJbUH?Ih-_Mr+?AUBYIa|^^|QZv z;#Dvl>--S4s9hE`&`Y3ea~t=BibCKrX3yU~IlZLb*nz0PR7i+WyHq4WQb+|eL4NC1 zkcLR1mS*95#WZAv;`V% z2}V*;>PcEk?~c~+(@w*F9AC#38T3_8JvM~2B0&Ig#gB=|8JcMzFo!VzRS35`^|51^x zziE7}ps@(7DUSuM+V?;R-6Rw0p}&>N~Bk-FJ!Ut66V$X#^LOm&9a2-SZe zalhQQek8Ug#R7>8xxwbomFW6{^Wgsn?BRO0(VEy5S`-8c?+@r{q$ems^gvfZNkU7&6^$&!F-K;RM-=^*4GJKD3 z3+n(*m(PH>k~_Y0h(>lUNDkA*#HNJ08w~EG$?aHFTQ2c?5w})`dD1Z2vRc`H`PXIFweq;z`TYV6fN-WqY*#*OB_J8gw-+5zQ}bB>{lQ zrU0>`Cj)Y>wOb(LE;jymmhVt#cDr+`>+pi+3KtDatx%% zT;0{ePRDh-k?9vssHqo|n=j6W{Nw2}NV1$CVz@D1>$5EITJy7=|S64|fmSKVG30lcRK$FDcrjx)h}=VsmrKG519`IZEiy zZ6xc+Pv)G=j-TAVb$V7wA_S8>oYPAbC2AcjAb1ay5CjS#L%B#L3@Pv(n~(gknX>@{ z6zW~+-%lv_1;O8VWJpQUm>`7hQFlE)h6akE6i>~PQ=V%v)zwW2OcWd%tl|%L#tVxZ zNJQ-FXPXN2i!km?=JVZCV?-3k?M1!U)k6VCa5LW#JRVF1qU3>D85@jDfjWo;n2e0b z1<Tc^D_JZHme6F@Ni zZs+{x_u-AjbxNDSJWw=`&z%6P6kj_GKFrT7>VHYk4r7`*!w;wb^UVmGR-h~sOkO#Q z0_Ggm8IwuF2dF_^s4xa?2?TBRY-<>kp|EQeSX`&lbM_RDvCmV<-G6VTKzmcNd&_%s z472nbh{wwmt&4HBlSAPP)oM3^7ro|JB|Z)y9#~3fyg4*^(wh(8pXlxtGDLJFQ(Oe{uagHyhLQ$z3*yYxqPzS|NupA#zapRy;tZiK0J4!Av< z&wo6WOO$s?q@XuM=!zM=VsZP|DCjCxd0-Qj>o)+MFEUP2u98ljfr(+lWww zxOGIhZ+oCifhcM1qJIngvL`T=blY+Dy^8UWu1QJBXmVFqcYWMmZzuCiI23ChW+uYk zSS8B94g$tCOCP|?1IDcj8@R2*30-1r=o?eL_def@49DeIj>de(-Pv)Hbm%5G5~=+=i8o$7osyiN zYqDI+k)Q1F{hP}7bD;Ka+y2_=O*Cm=v=WR&OKr}HDsBeJSwYm~E-Uq#Q%_=yS2l{P1Bc@=5k#d7G35a*!7w`gLU8#9;3?n(^% zK+LQHmngSifyGP`^PFItBV4;BHYrzkVO+D?doISQ95FqyHbYNyF%FX`mWrkz%GozS z^M&Kp5GXOg_oDCkRmTt4&jR!x%2#H~coX1k3*P<-Km(kC;u{58((!#7jb@ESW509OKm%gY{sjGTmBS zP6lZOw+L`g=)aDny`=bgNVp8jqQPVJF%+K;;{U#-d6N-SMLF#FMxGQJ@@zdyrR{s; z?fQdTRpVkgg|lvNGvD1KlqKFh_F$4#?-nudQE1Q{WYM!;mDU(!_3xx-M! zC*Hv{tl^AO1c#!Ske|+Ju5qrKENIZ*aBf)DK&oZT#)^Z35+jvp`(^5m%`J3>X1qx$ zqUIfTCCeS?#7`mR8MqH!?Kqu3%rj8uR+NkCs#4&rz9Fxz+vsDj9<-^kbP#pvB&`PGQ^m<^R55 zU_TusEftSyI;3m{XBevWh%CDUBF1j%rqvfTdnOBW425X)=KIY{29mW5r?IXYWMdgc zM4Il5;nZ1S0@gclsk)&NNbZ_NZsnt3*rjj{uPk zzJJqtp7uaLiuAox1Rk0tG0_j7dY?Xo%U@~+b!#i)@$P&O$+#%5wf=KqX>GRCl%@6B zbh?on*isHuIv+D^P6_i!A#9x;-FyuM*yR*>FFJc081B9jxmgkk(I zhRCcSh=~R(3Hdcn3gsY7gwwrLFfHeVmBMzm@nD8q71T0y6-E^$4i&G5Rkq)A9_H)9 z4$}bwmj0L9r!WcnkZoHN7v)ZX9}!EXhQ@?O9d?Z5#A?;vtjsWepV5D!_+1W{o7B$c zp-FcU9I^NCwOC(AwXV<^CdP!xfyw14T#8@qQRZxiaMXix;GV&{t;Oq#&BJy-TIXzb zD0+`rXVO$^B88>`J8AF1H|Qt&DHTK%hFrF?^EUWvcca$l19CJ4W#p~F`-w`t2@e(% zY{xdk(3P!OlBG*3LO4z+_1JUaqkthQ_U4?#&M=pSHy5niM=-z!!@GswYLCZX@bR({t zl`GOpT8r~ZKEy4Sp_%XDO7HIuv%=eF-oEfpVfL{Q5S5=B@ns<@5CGnprUskN^`k+j zgmu5eP3s7(lv&Sjm1>YMh*~%-X)Y&)pmbq$Xi_pIWfihaigF4vKeQBmQ|O@Z z2nC+;L^XW$AL;By`qr>Bp1Z??eIakaP{JpChpwCTw7rgCN zHMR#Ozj18J$xj;h@op@+Wi}@8m_w5ax#(CLA2_p6;g=*>_s{8*5&$K?UvemS|5y|5 z-wbYP*dtJ?AlF6%)*wp`vl8EPJ?>+#0bBmQ{%Z7^8@A#K(e8l=X1JL9RXQ5gZV9~9 z@yVN1%Z|aqLW;5R<#mJ{-SQ;Dg=o)tI49~~J7ixkJY`!#2Lx{M>x#FqR41%dlR~ka z5@xuYEZyzII$NXh#}F|Q(V%5??k#lfi+|$W{MN^ICtH1HQSowhO)bfcZL0RX6{v%wD#7$YPv>tBPp&a%K%+JB5P?txuI9~`3zjL3Gjd2yz_Bfpc`+i%g{ki8d zX6ZrdNmMG+9^cn8;&k~HNmHrIzDk6D&g{ABFj71Vh%{?}S3(h45UO!exUVj_q_w^3 zaE_5yZ_nmmbLbWi6|65$4EI%*e|;Bz{oePMc%5n8cV-UHT}&<+c2h)6#^Hz+!q?W< z{cu(7yc}e~II&P?_jy1^?^62YUuLgKBt=}XlDF~9q=}k|vk1firtTv>&{0O!5xGsq z!f}hxT-f6b4Z9@0_rj=7j8sDDnWvG8z>zV~yW*eFaE3@6j4M=rqDlyFOioS_)KD4K z-}e$J=_}!t_U>m7zwh7vu}Pw46w~r+yoZx@HK!8^yE=W9Wa_yB*nl=(PLYn^Ts-_AZh z{z0Vm>w)`^J+7Pr`LK59mEGQo!1msiGOFp3C_KGNS|1yf%9U{J5Qy*aaBah2RE zP{}w8>#408f^SYm<{@OnCK@4UM!$!vZ@2?dZ8 zbEKBcXbkVE)f2c86(zPP$#E*|Bpkom%D@ejUOq02i*^MQ6TOq0=e~tZGOu)T$$rCV89uAf4< zj6i_AV#dRvAvnNQ1&FuHn;B2A8=J3pUJ*>lf4jLW3o}y|W5F!QekngnDP7ebzOI#~ zVcvFZTw+(&`zic9jt;PiO41b5xI{#lp^f>-K4$S>7YNP5WzIz_b-I+Zvg|HV zX$qZ-{&A9FRL&8`iH^0FH$Zy0Jx$?InjAlioAXrgMaa zWI)Y?$oexGvJtpufK~`}*Yj`sY$cr~Z zL60Zp7+eL2+*9?upCJs>un6`c?>$Nw8n$c9K=?T4kT1m zLq~G2AI5SOq=7?PE@3KlW@u7Oim1eWYm7p}YNMw7)UzP}>RE|!ZlG}lcR?-+n0llA zv54mrs04nJS(}&wmE>k`B+{aVHq~1BkW;4A2Tp0qT;u^rlN?Z|kPewR4#p|Pz;CHT zT3Bz-&m@_+oZey5|C9hmLts_Tq^iFB99zN2wqs>#fd}Pu!z*oLS4St`Q$2hC#2Zbp zGnh2apKPnArljZS#@;{jAvCR#&zmQ_beWB_BaK+9&^9&<&gWvAwQ4g@cdhr)(X59u zd}u8$KQy942HS5A1_Md$TAsJrh9L#&$9Z;`HMu0j7*K0y-85G;nZ7JDky}qBxq2z!E@Qi_(W#rFSc635s*3{ zLHwo`!l%L&{GqZM*Y~Ezlb~v_0WBG^Y(a^fi-P=bLha1OKIxh#CH_ZDnt5tTfoNj>14J0)}a&Crd#HQ5BY|lYIiYt7CJ=Ha$-0? ztB0eu^A2W)?-{R4FOGI%v;oeVZWyZ;LKP6Hk1)p&TWo@5T{ld$+)CT9rzJW|j9SCd zra{2S-T@=QQo<2Jw4oMycmia#RG&7vmfnu`xlf5}zZ%drS3*KO@WncAU@W-`$f zuU)w(EeVTAPF4_>CwpCK6)>+4cP+x!J~y(9hAzU>maq9p_kRJi)dPn%hHQ7OZyVv6 zwGz@Mu1ABB-d<*A$+-!@WPiDU#mwNGJy@M1c-}#`i`ZliF_8`z)4Rx*YYAijGk>_c zi4!HwcYKlvkenl{v`Q&Y&O=P8O|#JIVlaH)xOH1v&HGnv>I%8W_bM@9d2R9!8sDgN zx8C!;;8BjjS+={*w9mE4Jl?cWpq)aeX6#C~McT?79p|KL1p7&KAaK-Bx!8> zqht;5%L(H2(d)mQx69z|b#u;Hew?G|$0F2sw8z5E|ElsZ$vi9GTZ82&o-`6VyH5-4 zn*E>^*_YSLTaPBOqGOh^lit%07igWoXflMV45G(GqCug7Pqb0EMf;Fr@;kZ8Rs%ge ztWxvxki>WC*28@AxaaoW1=^z$^g4p=+|SKBmZZ2m!7$SPbl>dhutgLWSG37HE~bL4MCgqA97CZ|kd zfsZ9zuMd0^n`)N8^O5h$KuOEU$A0nW0*+D&NPcUQk2S!SXtR zHy|Bd2+~PdMk(?&`#~Yyx3mm}zOx;a!zix61kCluVth{1&~+Q5T zRH!0zr;?DuK~7D5r9$Et=S^5&=;-`RDXTosIu%#eH0`5+_w!f2aN`zL?D5!D!=4?5 zh3B9#<9Qj(Km7iMC^cHtA^Ts!k3(1jP6+iV|BnR-X@dpt+WvZPROjAkpYjeehNRo7 zxj&;ivL!I^jH!&QZya}}w&OjVi|~Ep5e~Ng_(uHqNTjiz`U&$OeDWN-N1BZk zD+1;RlzoB&IcCk zS(7s}3pVVQEgL_Y%Er|t8<$R(>ul3`0yE;~ptl7h%UTVzBBXs5B4%E87x?Gd%++ib zCCK&QLhuylYf+Jlr~!e&hiRw)*`;K3r6tLTUD60MPw-OmH4cEP`?NO`htJ$8&gGdZbMnluUd@b9Dh+VxM;?3VvIjCXlM&Q5#q+f zG3;>3Xvn13zsZ8nDm2&>2aj3C&cZ~0Ra8)O#1VeZ5pFe1z22XA9%q=pJd_Cxne*Rc zFE1~TdSPc=6?hpmiesliidlNI#@*cxsG^hI$x~(cY%U~H;z^|4ISs*TRfa6-!Ql9}wDDzDPG={E^1KVb$|OiupO z7{8x57Yy@@^>9gqR^gg*kihU6ar$4dgp!zn=bXm#EQ?*gFzy=-?iVh^gd(|!imGxS zTJW3X(S@SjjE@soKOP($biQxx^!-R-@_!xXeGq1(r{}NP%-OI?EN-S0>sQh3A92pAks)5sb)|IyKe)FY^-~3|36QIl#0c zxf?%L;l~dM{^tkUqowwD)Ftah9AQu&YF|9PIi3QroaS(HHd=)xLJoz&|Y`C)Ktc_)3hJJ~);NgT&; zjE}Lz>ERQ|k1pEBQqS88HZJacn`(AoVlnp&pz_Wk@$|a3(DI5Dk1_ue2;5M>ZI?%i z_IdAd&^@c0)=`a-Ip|`tm7c{y?L{ zUzPvF90~4CTU>cX?L(*4Xw1IU8uddZ(5n#bb#y>8^>#ms;jVw}Pqxn)fC14EK2-})tcjCjzG@_Z~l&+v~}w8!VU{!D?0w)w*rLifq9FV3EK9>T-%6ltsl zkwIiMYh8ZC>V80nX<@>5N>C)qeMX(0*keE=Wx)yy-kR58@CFP>zQoHgT1S)U50D?H zh4^0+nx;q&rKFWQbv8hLy`W=>9gr^=s8%%0y-6_Z6*#FU&g!WmRfAV9Og#n-1sT`a_Pu=V1=N4H6X<)%(Q#lganW+;2VR))-F9nzTW6$S6`NQQtb-hSokQ zDair8peHr^#!NgtcU?eq*^m`jr|J-9JYRomRzCqQyIRp${$JPFf?UxJ3P(hJg>G%S zh$L;$7@XAtuEH#tiY+P@EJ~G(=3XWv$BT_@|8yHEsc{~v>_{_cZ(8MQhH4D-qoG_$ z8X-=T5+@92$D?|disz|F7I;^};1gk<>lxb8{aF36i}*!kY;4ToL%4mH+Hz;Bx~+%;A+ww1ZzRefBNiI;5DpXw&2LI`1SwWfY+P<@ zN6xkpc$zoM@@7> zPNrW8qFbV)*OVjJ(MOyZ1sl>L0_N4kzqmP~E|!v@|TA0re& z4h63BXM-@d(QBank0n&^XR~CIwb*eth$?@xY8-bt+T}52t$$MJ-snV@?qIYq1@s3V zR1zkCh=SI6A-j`uZ(envtL%B@T*0Iy0zN2-HFagV|gn}1HQX7+{D2==nYats(h^wW` zmO)^^AX1@w1z!VAh&~Ki7T~myc3QqqE2@4t1MDMwAhxm9g3#E9Y57FKak?qPy|HO| z$?w9La3kTDyLWi31-=QUL*!ptLIdIv7ohLvZ=jjltgY zLcE=j@V1eNKnq=Th=!btD*_;)pxEy%qXA>2^e~Cx=u6qBPo_lWRC+4Q$K(uGL?)dc z_g6$yM`tskgOQ8tj8^+~$JZfZEc~hXKcqNbG_G>;6cGA)?V|c`FU5N8thqy}xTqDj z>QZN~=`pd0bO0794=o59`GAG)m}uitJ0^Zf3fA>@+8Q)N@*Pa_+;aBkW6_&%kl0ohsTL9nu*MaWUvD2 za8Q)Tm2}eDzJ1I-ie3e?TG0A-!mhp3gwxl>?==r797l+tGu?47)5wUI3PLTJS&~ZZ zMFl;DnhCqEMm%Oq_>xrH7_u%U$flFO*`H>=Mdzb?V^dWgFwZ`UvbEixYMxqpWPAb1 zIzni8@b;&8M7}`OknB)&j&hD@ohvL-d{9==@J4{J-~itkpGgwQ+R0UvDuo7K%NnKH zschk+mNd}gMEw?7nYeW=Ca%Z{C5e>EGO-o-Yd+cjz1jV0)JH>0>w#LIt|q&uuCK-W^XpxWrGZUIQ}gupZ=jJ4Ew zqR9a(a*BcHd8P__;YmUh569wBrp59*78m~%9X8D#GrzVcf)M#z|9jp$O4BEO=1mOr zZtXNi4_iUOPUy@ZL}t*9N5OAe!pZfkABp>{eUHm$&C*6qmZLa0Qa3#IS5^SofxYh& z7!wa=~bH22}9GfMftPQa^nsU!N6md(JE=uPEED5 z?ANQgcKe?g3}%QmG=u8FCp!z?FT9dv)p+*zA|ex!tS-jFEJVG-Xq6~w+mfpCT?5e% zlt%tL9n7%yy_xx-DlIE}Ii&bMnyxac&92#&;#S;>Lm;@jySqCS*Wzw1?vmi{?gffN zao6I~;_mJ@eee2yWMyULN1k(X&Yqb)duD_Ou#^J`>T96!9HG&VH3&ST&K!%tArj?& zq_K^^>dl58-h^*oJ1%Fq&z6Y2w<3q?7qAz@fO0u$ki?bRmEedXUqDpDWED6m5>XDF zk)hh6!=?Jyt>#2M?-w7x77{OC5ms+6yPyKicx|S>lbHesB{_{vD+(BPr5BrNWv#11 z`eZcjL`SXyN4eO~h5xxoA74Mqk|R{+JLEYzF$~K#>C?!_CbB75Hx}_P^7<#-Z_|rk+XQQBhk9 zB}JUL7N1u|j3NGErh#=t{^l7A1NExBT7RXGq=Wo|KB; zg_~m~(QW6lO}PIE7#N&>*V*c_m4uR;G_h=#@HbcNf_cV!3S3F^hOF(aDF;MKwsy;K z+T0p=Nq~eV0#Cz~|6bnfM@MwpHAWWh?#Z{e?isOgkS~d{vMuiZ{xWRWBz@>{d~|yu z2)dO^WE2af!~tkYnqJ4r_iH_5gcN{-S_Iy=_|CoK`AZg9xZz!02@(=5oOU(69$ld4 z6?vwEg4L&6P+gAkZJr71V5#Z|8LC7oix2NU7@(ZZl`s8qJNc3!bGLsvPc>{Tixfqh%GkOm&wlM2)S^}QfDNkq zPOwUrsePlQIMcb0(l{7(fmtkYIZXvBAbEh}dw(rWczi~876OJw4oy(Xew`)PR)MLa zWK-gGJ_%Q=7&Tv*(kN6u)XM^vnY zs9Hw206%;Di>-#j1aEn@xY`h8b$LY*2+WWRwvLD>)Ti>!Vd<`CjjJmh{+DMvBYXF8 zNhGD%kOimJ%9Qt~e;Fe%FEqsHmBmW1;3M3(QO+Xpp{w3A>ZF2ABx!C{avTH^D;^4X z0Tm{&&5M#)$FQ)F50GSM5byefA+~JhbLM5XTYd_SW}0_DAN)$)#yX)NcAUB}kV2(Q_E7j@&f;`8p9^ux}Vv3~f+3j{CesS_kYQvnhxFmd4)T4z6J4y;^P zF?2U_irSoRMSM498To8EIxU!$u+AT!-H8QCqPUMx_q%Eo$D9cFiQIb?R5N}j(Gt3t zvQeD$W>Y)3;(Ex7xUBlyV2I&HA@Dj*C;Ya}9Z)kj$MTv0 zg|g5)UwJX_iZ~Kxs$lmiM$|XNyq5c8akEFvpHwQm=lS6`AbsI6YSZ4x*YLYa5K+oHs^tm1+;R|Ac{_#=h&Fz0 zdKXzZ2Bqg{D|etpH4Akt^MUdYu7LyxR-jrmz@TD#`tFL@pq=p#_Wc@8B0iY#PrMXs zr@hJ1PH!$^vziLUQRR0^kF_+Pgm}6vDwCT~yWDW&h`zQur}~wL;iqPqQ@xB9F!aiK z&yIaipQ1hwUU@GX{PfR2-oXS@y1`LJUhTpCG3fQ9=~DDHP1!v*CK-8jzv_YJ_{==r zneRsPE51mctMGut0hG-HbBY*sVw^}iLcPRkg%9CttTBL%*}d)8t(aBV)w z{w<qfC!4F)Y~L^eM)DLJ`L zK|pz#wyR&A0;TN-r$u?a;eYCb{Nd28VVRfi;3S#w)rhEf+13!594R|Yvs4}9^Ua<2 z31P)#TUMcx0}p9mNhCpgS7>&N!%6Og4PI!hA(2q!`{DS0z4LNJXn#4eR}oOdZS&EL z=a0L@T&t^L0%b7@HOz)lIM?{wdzqm<5@xNq zm&$%=Mzz5sNG@A`%4{l=<6!AiuL6wBuOL7OhI9xO18|1J`TLUbt8MD}TTN&CWF%r* zOD);lV(l;aeGU)Fxp8cE#V-Z(q~n|jhWrBvP=gV=yR+_T843jmIm2jF%v;w-8WUWS zaLYo0Nz-EGwi#Iv?jGeItEG-Wou$@LlAk}gu?8L+$`{%&cMZaXi$eyK%o&!fdM8^R zKTKZ}kp_oO4Ax-ZHTS!E4ALCQ|JG6iZT$qClVN-%6@-jBHG*mjKZuN&bH_vi0F4O)E=!MDQ-cy{bD zhplTsd=)NFAJk7Z^`;G(J@#QF6 zO8`y|q=8qh&5D$>)A;NP08M}DtHVaVU5nF1p4-tlANF4M7RI4x#sKhcOi={GEOB(o z*`&gc0Mpa}!egvT{BsO=xVFh3q-TS$CrumZzSE1xq;cKMm{+V z$BD}%3+DK914}4Wxby@jPgiOEado0pvSDc+E?Zkar`X1ROnE$Xzdz;}UZp_Hpc~95 zV&_jk*O?52YIWMudZH|;F)Rle%kdDc;vIER0Jd5+j(W`~ zcio{hbI6k)S1C!V21y}J`iloqO_uCv^!B^E01eJqp^bwWf)zzM{jQmnw5R2TRR+E} z$@AQ7-2;zGO4$H{z_7`deD>8mes0v$R*D;KZ>&fU4Cb??%mj=oN;r)p&*-8981Ls? zv&ZZ1iSKi@^awI4%2&0^6+R%c1q;*p(Z_-oC$rK#>&gS&zUY1Ci~1?QFkhwYt&5in zes9X*hM3Y^Z&1AdR-xYsxO=L1i!)|~i1sonvWZ~9@|$}Jv4w#gA0v$e<-EjhN#cqkK!o@!A~-xs|82Dg6~}%q|8q zHTap-_oLFrGRa>u`XwQD<%ia`Keg(rVmj?R<)?kM>`uVU%JsFHhJD^S*FG`E+#SH)UMw3 zn!)ja0yu)MR!1dE(8yS4f#BRYb((;Eo8ega9C<&tu2aIxCCjU-zcsW;&XeY4x+N1u z*go`dp$eI~OeQ}4u`=8J?dZ?zb5W$JrB4+60htd=t3 z;(n_hMg?BJTk<|5$?`A^_+HG>UQ;yit=A&y@)g@xdIhE4PBcQVrMfQGNV&ZBdZm3> zd3Mdlv%@KgD)Z#h$zIa8yXHXLAX@5>8$9)halxb!>6$$B3Ht$IxT@M$b=x%r2wS*a z!m6M=LTr(o_oD5`aQ20 zHR5>sYh1g^c!@zpGzWUyVsVO6)KQhu$bMVbxxmNXZR=t`=T#0u+BtRg#tg-k30#|u z>Eqi2w}nFsL0mk%kp`v(Ju4+7_4)`-o!qt!)DPBcK15%fd6i>=vda_eS&j@P^yij>$&!*O0~CA$n@CPS5d-Hfb^ zx@7Hsm^8w+kQT9db<1tNO(_eq9Iq)b>Mt#-GiyJLM&V%WzhKVe13B;Oo<^|_RweEC zvKH>bGLts~2?ens;_A6+qTDZquPDs%iY$){o}xZzky;O`mjaO=rpL4VP??1ZgQ$3@UZ zlK}!qVqFtZk7SRAWid6dlm#lr{7Xn2_q@;2H8&nVjg_nSlM_kb+fxlgpo~cWZ7RU+0DaR5^{sUxLxtf_T{83jbnQwYP6i4rz>QJ(adxW+Q+(qm2eV$1AWxk)^>bH zzsO{!q^sDTQ)RW6<|E>FWJ2L*@kUEa8wI8BvE%&Tt9B#?;K{tH2BJjEVd&vvJpiy) zNSH8YjED)k(%gnxepc8jM&5{0-s4n;J~|IX~z{44DNtY!>rbC+1M_INFDIr)BIzlj>dZZtp<@@ zD1O09q8|s8vhvb`vE=~8Nyt=h%A?yhyn*)_S-+Qf*Lp?TKLV!}e#*Jfg6H7Lsfz)j|XrQ%+Fu+d~hd;_*30;#ENRR6H2{CWNh zxi__69fy`w>*{A}b5Md84yC(2_Og0g>9rMIZUG@B^vZlu-(ktO zfcycWoVH2-sRAR&YfBZiWjW52R8ya`CFmlz88=W8u<(!dWp*SYqg8af#P)mVx?KNc z6%nNgZmRWakMs}2nBu1|Q-atazqa~5*bB~OO2nE$UYe(GI1%Atg&l?q#Hv?d$+<<>a8H~v=rdgLwMD|)< zQ({C+M94Rt?a4;9-7}_PIhyRY0*NqYEU1dfs9wjk=&Q8i>Hvs?VC>2@LoT`Dr0A=| z$YS6i4oW&^Z8JWtuHL}^v;b_ZX)I0ov6K|)H!Pzj!z`nGY6XI{s&KLl1%~8F5lK8C zF(J~VM00fB@(gdk$62eC$34g4hdsxYf$)I%>0`xjpH~~!w{9f^j=9y(galKtz+_~4 z^Z`asgS)ip9)Nvv|B@UPQgAXzT<(uSEJOqfVY`>eTeQ`@$FqA4)SntbTU0<5J-lIA zmiwK4N!aJ+owv_H*DskF-N>%H1Stz`COLM)oyCqt>61r8*e<{C; z`KoS3izY!iBuc2zZeT1xDxyYZ+$*qD5=W@Z0N?BS&8a*R{5KCZm57cmy5BF(gdcss z-`>u^x!MEd{SG`C@BeUr$Dt)@M<2ja5a1F}3-vCwKckJ1mu1CxH&!t9(|q^R4*+LW z|85ce=W{T9nbxPJpjCCYxhmwNJ&Lw}2*`HXk=T4yPs$@?OggQrcgnUu{1`zjr)GKX zlkMue&LkTd5%jtF)MGC^?OQV!E#gu98_%(PWmUFsxiV`a;JZ}WT(Mf?{3MV{HL;;! z&846&^179C1&6RCAiEN;3O5EfrWr!SA%KtoLDnNUSTneO{wk1Kd&-1_H3KXSu!ur| zJ0BGg_$9Lls4pV7Ue-dG9vS3D^e_${9Y0< zUR$PLOHHHKMM4HH-OKh9B-xTc#OHS4xN!t7t2fT4`=L6xL^G!MW|3@_FyED9y{t%e zB5fzO79l@da#3IEUBG#HEoW23X?~0hsAi>(TT{=H7_JAAD##3?)p=a%ay5)LB`J5g zO%^{LHEr}X7m{c@s2MkEmpylX-v9`qk$=E*)*4l6I+xH zL7z>pcRLI@sH)H;+Y2~aN2H_=k2JRysJzXUSQcB#$3EzzCz))>cKCow5&&YLClCU2 z?)u*m=Bg|D?j5#jb_Yoc zRw4a7adlFd$Q?BD&8QqB9*$90H4QB+Dnj_N9jlleO{}iw(POhfY!-oJ=5r8jtV7?|`M9h9NUat1{OY5f2|1};*R{Z^n_-X4(C1L+^(#D3w(_8rO`kdr#=m!m9> z;~vUh6@NjFYu>;AO4GGqNKp$XhhllDxiA&T3jCOvn3Vp!AtwKW5@5mHtQp)q(ROfI zYua_FIBlIDu$5acB>3w}yX#;?CaP#-e0zT^go=X7=3{J;gqlpBpM;DWY&j+Qm(OyM z2}uz$I{U*iX>dOj4BX6|{O#{%@(tA(gfClh_?F=UA4{=ik@rX%U#@`n!m{3EzG8J(tQEqq+YPsv5szcn17TyPxV>$r)K?M)EoEW3)I#fk5sWO zv%Quxzg~Ht-$V`W(v8ebVogLFYoAa8G$^@Gy^_VHF?hf1Z2G+rom+waD)NLr4({^M zJ{J^qP3nx526`s?{+ZrZeoY&7=fZB>4^<9i-OMla__HUXtH&$lYwt4VF&3Tr=o{EQ zlrIh*A8#CHW0Cq2gN5A(>F#0I^Lba1f8)l?j17y&NkIdNZPsz4JRs?JSv`9h4kQox zaY#|4m^#fnD2yl^SN!WNqPKhpn1Q^#97&&FeX4&=w&8f{M@vW8jTR+pdqI(x)$*e+ zDb@T*#ODUQ$Tb%#s^k2UsV`ldGeKGX58t~(9^blqZsXrSb>x@*N$?qe$-4 zq6!U}WcEKh?hm^v0KJrsGHhdj-ePS^f*!Y`eeMr?cW;aGq42SEUVToksS{jLFq(+vMr$1+&nqyH+KQrQx?_;mktt}TdqT-5I?})r3k<5+C zkhS!TG4hxk2Ge%#pfM47s-aXcx`sV};BnAe!e|2|Xf`>u~W zS0xR4B4{f)>XHB4oqUKp0nK9irG}2SlgaiB^RC*l2em={ajn|agXHazx!(EaQ%&H> z{b6gS-Mg>q`t$OW8Jjh#R>HO0@8 z>nkqt%CD)%L_*EK{=9gy2x@C7%BdSqPj~2hz3<&3JR)4z6LSReL#$>{~q(;J&$fRX_GV}lboefpXKitiAQR@75<)h zAs9IFNVO{wvZ;=#;)(bkkeiUybgQdE*)KcBm-}cC9x6F-1A&J_9?kye^c~Bb-YRv@ zbNf4*-2v7_#mO)F^PILZG5-Xy;Vi=j7Da>J2Z za8RbF1w_r^UflSX$VT8(pdoPbbtatR&EvcE*Tw1 z7-BJ$R_eNIviPB7lZ&FNLDxCR-HjD+$9>T8NNn)>w^ZlpDq4pXGI7ZjtTZ6XwZkQg zGy5SEfh$=^T6biEo6N?VGE}xybOcIkz%oZhw%)Y$X$?vFWlz)Sy6uzj;i0%<2us2&Q^!my*f)#X->$v1Vf-R))cwpS&zs0!b~QQsa8 zsFhgj9Sg=S@)1JOQU>IF;z?0+IuE{(?nX1?IDS73cB`$(A8ti*`}+3J$tOaB4FCs9pHZuaXWMWNy+0oX1e z8(*5Q!O?Tt@D6phh*BdK^nl}PMwZ#;3Gh%suxIUs)y=iaFAfI;ikUL42^f&P>0flM zl!-ETG9`ZA3x5`mF@UH=}CZ>yn0;eP&Z@#7iIHDK+(xHUB@EI9n@{_*asXL`HLz-Xe6;` zAqbjk%LOk)aNcM!Q?~v3o$vcJA{AN`qpaY1d*y9~bkLq72%ufaJ6r1sP?S)5;`_jv zRTd*=x@9&=EY^8Sd~tSfGPtMnzBOj=w@1r|*Bw!Re4s_RzM!Oe382!_a&ZA6&^Zgy z^Mw%lQUo<0NF3DMv^-qVF$Xw@o~3HH+L;D>251kWy_9WDoU0I}kt&Ha7p9<4GH%I^ z&Kau;_#G^Ou@m8{Bh_O}y^Y%fBD=3W+Z$J~h#>Te`6w1faySA1KoP#x5WX|wiU2R- zQDh{f?b?q0S;v~oqXD0@8JPOrt<^c{4H*rGWTfo6s^MjcB z=S5gr12;(b@ctHW)k$Val)0fZvqxmozoToEP=_)<;D1(^=HY{4 zW)2O0Z2p%_t$a1raIB8bi2T{aQ>xzBJmx^a^y?BNz)agP~D+9ycdT=OKY zIwQ0lCk4Dn`B}JejM;FBKbwb?EKxV5Q3gHn!M?M1yvdCk`&2srBy$7V=YCtGu@UXNQhjKh z0=}e6k24aRIDI+9hu@d-rn+wlI7K3TIM2B6vf>-XrQaaXLK4H=6@XN@1S2O+j6?)_ zQ3zxAJbnxPeNQz@|8O(uUp5apH=+N+b#Dzmxuy~LPCG(AS;d+87N5&`il8x)Xdu;& z5D#bCrUoogh^;`}8h$&LySIf5-*SB`{R<#2JDM2&=U1Ot@Dw1Se~+bJE6QwNk}qs z1O>Ym?h5J}wec5@Zm5 z`_m%yj1XQcAZ_<1q%1=R7yzRt7p-~UuqbzWLA7EGz+Aa9%}djbi-1g>cXnpNiFxb4 zRdhUtVKA4BBBmGsggiZKfwhaVw4n%c(89(1dksbW&v1YSK8<`60h&45{kaMWf_^!A)a zgxv1FUJZEm3BM^r%?$Vt+}fdOr%>eljlb#_HHDi_i)iCaJSW|K(^mDX@I5YtaBu)1 zYgl<-Y5f?UPMb$u)3x#rOsN9E6!dZEJdl#H+9S8fTyQ5zlEnYR?*x?k;Nf8vHMYE0 znf}3Qb;4ZQ{^WIro^3(@>wdF-hY8%(h@j)}zy7)FgdkIg%#mPeX*-5vzqji#zeB{$ zu4n2jACUKLzjF1jN}v$DT++Ad3-Lrn(%cGH`(&qxq---gF$iz+A125Aa%4Ev$GKIx z>^KLwnr=<-w7y3^B=bTM=6bI)9Tu z?6gyM-Ax~&=&j?G<@I|1>EtDbcJSc&tq4DO4Yk>JfxxyPa(KAT9b!FGp7DNP;he0M z4tsAirH0y!UDs9+14+1>s)OWRFPJ@4Wp#~&#O(ZhikgwNYp&$G?S~ac*Zk)8`Dqbk zE&KQRFdP?tl>@!8<6WsdZBF5ZGeiX=N$Vflp$N{1^wm>8^T+-JF+mw`%M0XjFzCPm zUrGa&PA+2pP+PT^a6xJ`ay4E@TBCnu4V%MrFV=itcrtWM-mSK~gHsmj%(f z*~ik{Wp5DZmO72k%f5d>P-~ItYARs#D)x_89lkyg>l{EBj>TVKB|wYFt7Hnl?02I0 zYsQO!NY7v(1*XUnfyw?nA6<19#Y<354&gPVs|Xo8P0v8TukeJ!Hr8*y!q6 zN&oP>Y>lZeGiu0(DMe_hEJoRvYR)j(>yl0g`7Xn(RC1{*y9&mjmyGLy9dfN}iz>+-MiFY5km#82g?A<$xMDdKPj+BpG z7s)>A8e|enrhbg^U6nkpyq+1G26~UFuZFLO+}wv~Jn+I6Bq8OFYS6B*OX~)_-RnB$ zZvI`va9cT>LdBFOjx@cxpyjIR>XG8Eqt>)BZXG<(`>-g#_NQ0iDj|BIy!q7km-O-} zq@Rtm_~}@7qMjFG`YXI|4te?FH(y*%Y0D+8H%$HXPxe2tR_S!?f2DR+JgyXS=imnV z`^S|B1EuU8baZ&e?%%&%+&N|g9RL9=Jrvdc1`Xrs9#I_ktj>trhh<{sRYgtA3IcsY z>*cCuwf_~=N6?8nBL@%d=gaUOKSs$66XM2Bh>IF&NZ4OJbtvsZ!-L{os#Iv)euSRZ z%<20l$1+cj1rSR+gj4w4R+y;EvC#F$s9W$STod(zaE+yHu`-|qYYX84f=8r&3z zhpXZGr8R!&pI(1L#d;8Y{=A4CPehz8al&bX@ljUxp{>wk6;QmGnaAmzp&ELe9IE|r zES&QNfB)tXk$X^S5B|e=lD6v0hwn4rzEOkyP;&B0lEh;xk7QZSQK-rFD}bx*sQ-&> z@mL?`sn9!jx0HXn6fWUWVW&1uI8bIj0i42fDt54=!IuNf)s#zP78 zO+$mtkoiDQ;3dMqLQ*oQ1;zppQ1v_ycDZcoQ{>?khZIi!qu1JFe$mPO8SW0&z$Ut- z(ZC+@EbPF{r;wyba|dW^cFY#QXZj58E7jeso!8H{g+r^G6`8>onn_2=6crU=xhgE# z85kQ$Z#5U&UH;HgL5oZ5+{|xq`G`Vftw=YQxQeFxGx;M{?QsosAT;$t7{{7mRpf=D z-i-Bm$5nly9CF<>Zr6o>%^Gc^OJ2S!t5=^&H19C%jDxbd6sZK?wQV`_FLUIDi? zOX<$3!IM|wdu=CsJgBPT`enZ>Vt81P{^#fl9;g7fu}lpL1IOn1?`+U%y7NIjUfS36 zW~&~^Slm_i)4y!h>wkwEN#cicE@|cj%S57G8^eR48zQDtqNq5i^r4zm2sM-ScXJ3X zH?oB{);FT@Fw!M8Ewr4wv!pvb&;8{)hNGS%&(A&2UHu$Rsv3L%Xo=a=)!v7nC3r?o zE(13Ye#E1DDw^~P?#-j#OWYVekZ3gyQ99H03Vum9QD-lXZZ-kgRD?N{8K)BLm1}bU zxpU4=d$S<=o`Bqluv9F4HLQ+TQ_kJ_I+CM|wDc3O)h%QsxW?{cN@du&zMM?J$LbYR z`(~JK2F?34<(O}fk~9hs6QD+1*vTwwg`KC#Q3-XuVSo(nwV;a0g3PyNuAO5z<4^oUPIL!09F+Nl`%4er%FyXIS?m*i1Bbd07&Yx)bQgT6+~XeeBRXn~d?ZrSfp%!;3tT6mHYFW0@lBK1BY z$nx^JqdT|dOTyLtWZ(Khkif>(7DKh}@A_8C!p=L2rA)F<+6AlK(Vp2L7siS8L$V%h zx{iqnfpw*tNRlS-19(6z8aDZXRR3v8;$6II06?PCq4d))V(1vfrlytV@U9$#pHFfC z@y|hmvSis%%o?Qpbp+uS0ZLRveM)Z7Q@B^>3+HJpFH&{q5_ECR1R{Ua{jEC5Mqj_Z zz`NX8tV0r$j~UUz$kWHvBb}xry3vZVug@A~Wm@aMX*dGlqIN$61zs~gGR46tPGmKp zPuZZMA>z}?1>72Zr`HPKabe-=N@||ebPe2g$#{Lfzw}*%?|AMM#EyRSqH$g(mSUK{ zFtrb|$B&;y6bI6BVdFS$QIA-LdeAXRR|LAwe)aXvw(%CZ`h2F?)sBGheHkYZF zw%*2>jIIwWWjmiOSC>xNACU;me(d(P!T4~VKp)to*NVz;gC@b@_m}Q3GasGMduYA3gf)!H5#m}fA`yGfb9K7 zw_dhX=N)(`{}wmxIR0&}YMIDB3)iiYS?MRh?$6$`5M&V|K;ju%g9*s$5ambzsDXz0GgV)mP~ZK9;{EpyJFc%X)N>dzL zV0n9qPyc%GeS}=kXD$Jgt$7DM_WcaH9<984*mb)33+f}@9Se2#g^FG&r29Yk1EI4i zyxX5t=Q>!m53!U%*S_?ke-(nIJN>DGQkHQ#4o@$y-6@)6OiF6M19Nh=9Q>2fxIXg< z4VwuIPXdKe&mUDt(U%0kY!bF~&tAXdvd@bQnoTf|h_Go9)C)Zt%`jW@vm+$RfQ-Z| zmuHcSriqa206XnxfZci2LgT~V^mCHl*$@lQ0P_PjLZ(49GTUW+ut82qaV37>nE*q!3a@Kx+hB^K9c{-2o7qkR(^8T9XP}XMbL}TO)2;UDH;vn4 zoez>&K|gOMP$_Vc^vLoYd>HXM&1gU53z6Wel{_Q8u))$&LifEKErvhFlj0e8yOV~7 zb$kc0#1MmAmfL7mi>_741dDiLL`tMi4-krykRUzmKjLb!tzlh2RS@oggS0 zRuUZZh;6%T4^2jr5q|!*r+92lif?A`lQI1|uZOH*3nioV%rF73F-jHjH8dshXh{Eq zqV&ZAwWtaYZv@Z!Gzg5!;2;z~k;)(|0BM&bD%m#*Y4bPsd^N5V+i)Bj{Ic0S<^1UD zYx9+shrNH$3G*<&KXJQ&#~YZK!N`RqDm5w?ne}Cm_P(FE37kxWoO~vWo8@J4$v1cP zZL3M70^%*%0?~OsY{l(h02a3QWO+nG-2pr*1!Myg;<7PtQRKx->qGt5XslW~q5%U8 zjPINGpvCGDS-w>{R6C!;ywH*FX5-W~!pk*ck!@huOua7v_npYs>C2{8p}w;iS`?E3 za}m#>5z+o~5BarQvEQTK`jb|-8GA4>AsX<>kzF6rUjJY*(3Ae9gjk8kQIZwDD2dN9 za_Ft(B*}r8hv@MeaS|w05a{J3CsZRVM8QuyWT{v${c3t*_r%fJp`;Xm9l!WdmfC0y z6>;)s@pAq3`bR#A%Q`V5}+w_DeTHjXkMWS4c(WP9ZhP9B$O;^RrSg5R~AX83)q&lxaN zB1`L;F{VCOW?^~CJ+nj|pVXNmXtLR3%N4k7L}KshCH6iZP&JA1M+S!Ka%>?E*g^dR zGT5YHgKE5^5y-Gyg}V9cTn*(i#gtV;^*AIEvSIEfwUZ-@qc=zP1y88f?-&_RQus&b*hbkLwPMYRR!Y;+(6Ky4o{MNCrN)ENGz2#WV?wo)66_s}h4VNeckD)yq}*U@V%iH3=#Tdz z3CX2}zuQQ0c>~EUyTD$UT!KOH?6%TvXR@(~%Z+;={Nvpwm49cfCnK;7{^r8e5E~#S zh@{B&9q`7MLN{I*M-M{$VW}VP_uHqdJl#~A6b$M7b7}F);uVyF`nv2$kE|h)mD*rV zXJYG?ri&HCi>Sg|eplX>ZexDoZJjY0fQDRUW1=5SW}GGLl_h6QJB+Kv%%6*@&;Nae z1;iA1wh0y2eL?r!P1E|YF351mG#FV&#c8h->RzC-pWE+5ku892Lxioc5&8U~XGZ|Y z=ArC#rPR|CrPVYYHzjzfr||FT5j2R^Dq@eEvoSh}-<7Z@q}L+9JF^JlRfsmmk=ujf zB5*f-@ixErtl%=V9wBOshh;bx;QY(#xF~^?A>Y|?S$%wXVqb*=Jm3l-aE~9_iUY}qw zu}C1#ixJa8G>W}okOzIa=gVCg{xapUNR*n%YsyX;NtN^V2YD5m*#-}2aQyn%_!6R$ z1Y@Ho1En=1U=1^mx{Twij-uy1Qvdf(1yH5E9u&VTOtKF;B_)kNw4U)uOUppv6^i|F z)R#-QHYy*|(+vAIb3uA7?##P+lYV#257c880k6XWaBnuC?fYH}+Z-%tKz^pHsq~38 zOC)yI(q?~em^(+-K?l}uR{wQQzdKXbIPknb+@k}x@V`f&cT)Wz(@xW-BrdZsWAB@| z+xBfc?^})q*Jg)^OAU5%JOxYyne=fRa@xu*djWJif$d>F=Q#NMxUqAENQBB7(R#Hd zF76WZ$9Cbk1Ybw;m+mPXjiW4ZxvKeG^)$LAhmJr7j*}?B+Md_{Yvcx`Plko}l(+rz zg1iw`uU2rP8*$HN-(1JVbtlntE{6IP0@Gu)PzVCi&wj;kvFlieJGsL$yuf^7C8AKi ztilg~Y|jF5{!v+0Z(vPkK~1fm^$uQ{p5zs!w=_P|ie9;Q?;)1TD(yRj>F!2!oDm1CT>W2w+_WV%8CJ93k0-hSE zXSUHE=h5$bI(%23^}gIr4-Mn-r1(w~VbGydEZaA+9azT9#kuw7pufXLCF2R^w!w1L zNg9sK)aT;O?`&qJ13*?{r(bHkju&O{jAA?1>AHi1@(cAI{`v*#wVa0;HNiZ8c9z5A zTy_>~uSTn#HVFB2o66@=2vg{i)S-Zr!S9&lSt=TP84^mfmC(S%q)QHA4YX6h=D$-l z$@K4Hhg5*$x3nyGix2crarta;kr^%*TUf%&d79ZtzoM(!Jzw@cQ(hh)W(TccX9HpbQX;cY#LmYADVvh$;>b~2&TeThKnMq(Ul z_|$lykr9f_Zx$hdLr#KVP3K-8Fz21s?Ti>oR)$P@Rz~a}9Uf-oeRkHQ0_1Wsl{(SknQ`p7sBH9$SKr%h zN~3DFU*39G=)_Gw+9@;-^O3+*QCN~PDgA+_5g?nl01I=pEFe1BA*ZR#gtrLKTjWEP z8crs%cjLokg!XZGKT$LeVWek@RI=Ga?QMEUr`{Yf`}}$0=$h-;>M6m;ePi;bCYZ?I z0!>^sZWz&#iU{CJTBcTFVt1uk&}^4iKRHyVqY-A80i9BtRBJQKNei7ZYFH)E9p6

k?dC+o zMe&GJ@ptn9A4VS5R^XuMOo*vtrKfTSZhHqLo(jA|o89eqyjKvzuw2 z1Uk6{dSJPHCrSB(D0VxgDmHrpom7RpNQUEMmaCvQIF&;4C++Y|gOA|Ah6Pdg`>MjZ zZ`gWqg62ALW9M;$96nU$Qi3J^{wufrf%)Sgz3!83`Y&UFNoQS?m9^l}yOHMtt=-y+ zkVxFxxRelYu1Nz!aF%^h>u>pY{dSv?UE8?fL<09VBfE2EDR1`&7U*|%7cPw5?^emcoz7jL0Ew3j5a&zb&z9bI)?lU*B@l14hD$6y2LPN@N- z8>EpG5Tv_%fOJa3=x#wWdEn-*YFO3_m$K_TYEW8t%cFWE2>jG7F)HG5m>U>P0 zR+rTQqfLnqyp4AJ538{{O@&sLxY05mZNR)iU;(4COsDbig0fzdg=!TQulORB`D|~L z0!T^x_Kq?BM110_5i`eMc|o&fSxyRY8#a-6=kl1YrBXO(vFkXs%xE>+{dHvi+CRx|{uvB+9T-MB~_;CfEvluLf=u2%v6q&kg z%@q`*Nsnp@ook7fS*n3I#_js=qN7e+Ppb|?DaKSZ6iic1ptb@ ztH7c(qZab!vt9Y&KqHk@j9HLqVJG?E0zF4Z6yz30vbU4tE&Ru@`hp;4(V*aGB4EaG zEnEZiuaCB-c#R-?06=qFJfqkEN-pKpJP9wrBiT$vK|}&-_CEncd87^tgRCl-`i9;? zE_Gl%jd_)00u%}uDAGn!mjfQ|pWcloQz>pAFff2cI(I>IpcDVD5g2&`I)B{my9Rcx z!rWk)CHdKpTvZEo7MBCo>}G2+JOY5SFML`Kc_hKTTxu7O+7H4P2iP}3*c}~4OTXit zTq9_-b~B;7=?AuZzE^ou;vL^9DfcJm(M`4-kugy4c;8I!i_0h;c6t2;$Chwh>l!$6lNTd+z@BnAX%6bGX2rlMm>^b88W z5fQr|6b6TQ=*{{1ct$4WN|pf8if+vmRx0tY9DULHantoN$!dJ#W1N_R36(HyDA!uT zG^w~fws2Ky?t;`f$CnvH3cR{tuRhw9GOWCNNcR-Q!7vY;fJ!V{Z64rZ=J}-kTHEfr z|Ay{^ljG$B!tc+)UZ%tZw$!E=s~P|ktp^!l?rKWBgXjXXAA3ZSDhm6KEZ%HF^m-Ka zl(bqBR*;y8#WS?l1SMO5G_H;ljAsf6Qfr;~gUGeQsY0uJ#bJpFQ|5rJ>l{A3HgSt2ub3fic?GT*)1ES zdQD@ox#A;lhPC{A!pX3MdW-fmNhsCZkK`E4PFdM^UtW+8a=-xDe#uz7VBtc0nd%Xr z|E{AOjg92tmivB8dq>a_)U~xS)dEjhZ!=Y_^&&t!-NRy=75f*l)%o@d4KqJ3 z-{d%Vi*3x|hc9+K z9UcccNr$k#VSE9PV+7)Div}?A(&@1?W3e(uPlB$b!(LdCqQUS8c~L6{xD?}iSEC}IHV9B{DVlv)8O+bg49D$F$@Yc z*r%peq+Dc^3M7X96IAkm`C>)%sH-NSMz}h_=o?U_ry=$(!vWrh z4mga3H&P};dmoqaOI+gYQ691v$liA~vf{e3^|o=ETE}Xhf*t;R+&F021T0 zB&K4#M}|RIS-~euJQl36gB(i!E!q-AZ)TErTfct1)(Icy;epksIa?ISAy{5REQUNl zCT^~3T0y2ZYtLI{qu=@?s;mp5@Atr2eJ|+LuAmzOX^#@_D|XYk@+?TU^~eNGDK_-% zlq{kDw91R2Ejl4kC$~2YAgar**DN?f*ZSV~=7G}hhAOmV6ng_nHc`6{QFkLjl7eCu zA=CtGNbX_r8HEqD(PysXCghzvnLFKUQzdV+4Y`Xls92Y8CyVhiUQ({`jeozrjO!+x z>8yyb&R(%}8yn`3{+UCB&j4fmp;qLe2OZ2Egn+)=L#L&Z=_8c>gZV1h{zL`i{cBh zy<#cLCn60SnX8JTdb;Mc(njJZLNLK^x$%28qDZt3aR)fo)0v)&$Nb=b9#nDmHHRa) z{-T1FGsw@4CGMb+*ZFFbU%`yV#@jxVM9h2>C7K2OO`BJ}m34}&fSM^(G)o}uH``~E z?XmkWFDPw;SlN1oeb+pcnp29TAqdu<<(J5VS)Jrx!i2@;x|s3=>a!m=hCQs#GSW7t zq}Ld=`?5*A1jErU=9Bsu>8}%0msDX^;v)*E=+WTTRmOEi^gqq_GDnBkXoN&Edt0nG z*1^%?uKMBF*9_Orwjo&P;{gHu97ak$uAvS4be8u&I;o7@-WF$c=db=^au?V+=sIxR z(QmO*_->P5J|-!m>~R9QF6?LGv%Wc}v=M)8aka~f_6j{t0&QIR^}B~s&o4hO8Mdj+ zxW-A_A2fp0;aVf}Dg0n=hTWu0<1{lfgSOD=mXE zGx%OgI}^;T0*5u&H&7itN#n8v3?-65Q6TMAB)ydZykNBuhPi2P(aB@2&GwmFxLUwP z)n2OP6GNUND>X+E1R;(Nk?pZn(U1J(zl zuQ7YEg8dUp=s#w1_feygaB1lx6UAhoUGP+X!d8=uE43P;oI328f)WCiusK z?ePB-!?X8b>Tt{z<3u#ordX>Y9t;Cyg!pEw>k;7A&l8dj$AUs~`;Ax-PKo@O`iDar z3J|7T1~%E=k1k@gbkw49@zJ|H{Y>9o2Hp)R=O21SxEn9KsSm;AcDOcnhzsp#QQU>I_L) zNp3R42-C)xyMj{i;|fzmNaBb;3GZ5}cW-E9-ih#^lH5P|rjxpVE<~w!Q2LK)rYj;+ zz2_rHe@VsUG0Bx1lVKXFIK||is7A9>YI=|r6y1{GxPGL=5xHh*)-Go0Y^f(Eno!|u zIA_qtOc=;L9r1|1^vzoHl|+d+>Bv(9hbQz@MC8QNb(DP zHYJ69%|z-eJJrS;Y*!TJ1%71D5tXl*v6nDoBpF`O2)wCAIvk9qa)tJ&^}<5oSK=xc z3QJE1KhXed1to8Fh+L(3dAN46y9P3Wb+7+_`7_3h7$DJ9eAZIfap@*->Lsi5G*jRh z+zGfwN}+{%+y#`z7!<%Ju2n?UnPc6$>^CoZFGtLXiX8$ONvtSFQ#q9!Ir$Cd4}M3* z@W9k_SvK5~VK>}11&-lw71T7=hQD`2BduKPodsi$^_+Y)upyY>mU!FWobw)#!|<9* zdntv9%nu)i(NpI5uYmFg ziN8{Z&@+KHA@hW23j&H!ZaE(Hnm=Ov^lFBJs{C@%kie!#{Goshj<8fw&`C_3=G$e) ze0Vmo?B_^wG&&n#VtqUgSi^;u6jO(|zGyLx1Zcr99ZcLC(_9Y#z@ro2!wxN(ROqQ} zJk9Y~We;B52hS7MuoJaRYJL1zz_SRICIv@}M_7dT8|BHEq5UoSdv`c`xa=^i78lt5 z`9DvX)C6>7a3nQ;LhJP#?L1b^WNW3yK6l~qlPf$#L-6X47cS5q%|s9b2wk-szq$G& zyrnLQfeVY&9}9+&1Rb~74i5EH=TF7*dhNri5?OrzCw{vilNX;EK=e~un310Glz3>#geVDx9D>J@Oc)Lqf7^euDaBk9V4#FDU=d=48jCxy6Hana%R_;hq(sA5GKtKJ zP5`MKLUc>iNFZJqO>(pyk(rI@)Y7b!rFzmp-piO8pG3CPci%W@OSOM9(twEw+S{#N zIAJeIjrK#M+-cI;xszr*R6m9~oTMTz3i$gPhlx{kJLJn-sQx5>5C!vztjfSf(VcFWSCQN9&&Ss>^X3k+FQA>l_^tLlC78kfO$OgQ9 zVJG^JfufI*)QuWLnulQ{m1!}RX(PS3uvR@ zErlLUB6lrJB{XVS!Nq()m~8;1;SBrmM$|vWRh2lUnhL8TX9I|vd&HCXwjJk4m_?71LTU%I~-VaS9WBT3n6=NInaznuug5X69$3dz8@u7qe&+Bd9e%F&DN?lmVe8m(x{EkP4;(Hrtq^#@ zNb%S(G3piTH+K>bx`-&`uR1UQLWcrsp=pB1-cAZSu|I2J+6mf`^=gSpUaDQDQHG?! zuKi^C&ZjMl7m-3;A!lb!J=|8#&WR6aoe5lle_}tbcV+pVA)+Wuy+a)8y3@5PQkVWY zm_59HxIN#;HM>K-UH9X9_4baz?7xeQHxo$inZFtAMy+v@PqUIWeyS!WCdOWC9>y;H zWYq>ukroX@b91Da1T>qI|D8-Ob$W4aJe_$hH(JLo+uGPfcAkIDUUBOD%#HW=e(~D` zj0AKS`|U0^<*N|=!_r{;N#p3j*_n;Gc`&V*r}H2!vdfQ%&&;6zQ#lADCCpU|uyq`F z)p}IIv}=ro3q(J%{YvtZc)$R*(Wc=P_f=qTU4%0lUqX1t<}CLxbX-ja*xs)dG0T&! zI0!7Yd^IOA?;Kjuv{iWwdGUhCLlGja^PUEczT?u%nBds+omYRP4TLSK4|^FbBrmTh z%xey)k+q;rxhtwdu-r%5OgdP!MO^NucbVx5b$3k|a0nOpU!>&k$kN{v2K~DYn&fC( z?MY%%0F&ZWn|6P>K3)X7yi3%%zjOXouh9iD|7yO{`-3fn*YAoh6wXwqu;Glp8thnWK@&^!j(Dyey(ik zYk=6ZoYjW^Oa{z{rn-0E>vF)v-0?xBv(ftO{(TD24ptncIj#?kS6qSbH<{1cb1JT6 zZOt@lV+oiGYt_p&K11E@dH5A~3kqmbmv#w5&gRK-Amke1Xso5GsK!_G<&FXLSB@Hs zhf2T&t4d=QKfOWxncE?MbZq(N-0qirO|=OWBDX*kuv)bIe82N{xKF*4B54KnYwTVh z;Wm8y!h4#R5cW)JB70x1DjZE_R9&2s0_!gE53R_NY0A%V%7?k`>%Bdl z??E9FXq_?fTI=6VkeonTqKvlofaRuo$o<0u(qnOh9@>JkgHsUYZEYF&)PlczaJl9j z-<0e`Qaf!9P=8WM{dOL3zCD}&A3u_pKI_2|8AvG1{HJ?|yLN8~b&ss=SKJ%aCX2-6 zFJJd6(u`=f4Y`U;D8ghQlp#M^;*Pg2 z+SSr!!GnWLafI)~!GpMkI?7h$L?hm;D-n%x`K|gard$=L#L>K1Pn9dFb49I=xxvZY z9x`nlxVDUl^46JUGtpCcQ>JA&fR3{|fe7{eV;3#e050Q@M!D?~R#9WzD1eAwU83-v zWcQLv2p5bV^+T%%ag8cmbu6ODghWDcH6$H9=R-jy$xIT}Je^vXDVL!JruD<;ubFp|jd#K&6-Vm;9r+bWp31-Fu&bZ!c7N(wuNpg48(&jQ#l8M7WddfI+fE-lA;y#Y6~6)Ti{{jm!KH^cGvFhV zc7UIj&*jT;JY*(^>GUUXWbC?PyXx1TuA6E-LF}tTZ=d;vP*Lz-|2$Vj4w#yj)_O3W z_GA^2@+#=A*WJqtbQBdC+5UGg8*%f~0r7Y-s{U7C*A)>1G!C}S4@gIb|Eby8Ua^h8 zYT9qb#mDj_{3z+@_MUBR(JV+}c6JsiFWFZTeaK|nNLuaj#B@PQY`dtity03NDu_9&3p_miY z0<@xaHK6bkb zJEpJn69p_rlzNV zAk(YLUnFT2%J&Eg)1kfbY?A%X{XD-TIw9rvl&;8TU(VwKi@$s6|4V!o_&e+oX;U`N z&fL>y$X*%(#~H@1*w2Ya^6#)ZGLN4t<}Tvei?OOn%sFejJ1Lc@*R2tbZ4^5%=nj@9 zn~o1rhHp2UyXiI`1FB=U;FW#WNv3VswXLR|tZY6DxgqJPqcV+Z-{k!Afn>KTV&W4L zgcJX2ayRK@fU6`zT+F9{CDvn}_el^_g&qUV4HO%(z|T2t`)6<50~JT8hTT=_A3A(k zvSg!j9iR4-v00qN*s3Zie0_2skbb%Q1CxH|i$iT;Rh7f~!@B2+ql$`(^X0e@Xyg@* z@bm89O~1uLf-fBex^cWCAQER4gFjG2{{QGrF{UaxNt zYhO;yd=Ht!3E9oQKE@euAUFn}%Jt0pRT~~sj#?U5NwZva0K4UzJLST=ydy)}4Qk3K z1%2JMa|mFPsZLgxXO=QC}sLMC1 z6yV=dx1zVGILOE-gJ5wovdDm_50GPTH!oqL>UA(fz)^B(B7cEd@vvIHc!LpD#UHQU zQS@_vh;#t(Rj&FXZKaBwR0G+Q;gie36rFW0Ovim%s?#xB<-`~k>^o7<|LG8tb zg@G8dH+$D~xDlwQr>8LHjHXwdBEDDP1c@8U{J&$igfjJ(g9O@()6>#sX8Fq#yRNIw zz4&-|c=Zm8wLT_M`m|J%Z<}~^>-2L>6~baxlq>X8*pgq6VNh>|2X4tl`4Iog*N~0n zOz<;ew0>C)Z2_CRkXRLa!xONW+u!GEgoW}K5*x(hWny{pNEP+)+cEGAS5*X<)Puzs zw32Zmq2Uf6u@qW9pYT|VU;{fG0n78M-W~t?qvhwow?vLyC6aG6$xI6y#pF>AS2PG91(vV`cD*BLu;d_aR zX@^Yl?(Y0a!Z^QI-6sF+as_1}*?T1g6-&ju&UQMEYqz)Q{|P@k3MD;#SxwDnPEO3^pue|1>Cg<>p8J2bFfTUOp2Mzh3?UI1<~6`L3Eg?8xH=PQV#69DUv!W zb4C;T?l$xOGIp55FjhyW*JK8qH2k^Ss!4QWYE9k*?)@cYrt-sfR88Iu7 zH!;M-+(l-{@{csDH`hLFH_9yCdTz>N{~Zb*I^;2B!Z&PAWw^Mw-l1!+A!oL?bNI$q z24$0f$jn=RQq04763#V{qXbR!C=W_EyvLbqb>>p-kdgtATB+C7M9v}jOsxTt$uS3s z>*WixdOgshl2mj6HmawDNIukfYn8&;#)}z+T}H^|yIlD`H9~t2G*Oize`TQC1pF8d^>bo`2bg|F z1E)z9sVC1j>8(?qJ^{JF^H9;*AIxWAxE!rz8Jtw@1TnRX8p)_%`mm^P6P*Had&K_; zlbDYQlw107BWJ96o>9Pd97Tuih?Y2s7XuVpO$hDkl#sS~ONPn*@tu6;#LAAVo^h!} z0)I+q`DoAbpv2oFl!(R|)e7$oH_rZ0xuW-t`WZtpAO?NlwANvAd6nRb-BkTbgR(#w zcYG(;^$%dT!?RfH?EgR6C&eT63#1~G<9-7DdhP3FF8FUKBnecYAUsG9Z8TSJPej3M zODvV-YBw!6xh(CaPLH(3FXB=^6^Dh>zm8pz{>G*(+!E!z)X6FJw5522TyX1t2R;$y zl4j0T|Gv1WWI=-Xrl1mEriPk;^|bnx+cnz6<$8w zEaMnDdoyatD5^+&V5#0vq01njHn6 z`}x@Xn$}{SPKA&OOeL+;YNKRn%KwiU{XAwa@i>JJ)PU8lv*$F^8sp;G&TDVPpVTFCIl3qJYvAJ4d_MGQ^W)Hq)Zk&-;+sx>w z!`o*;dngI$YcOtuI+r!(C;ZvYc;5IP?;JL%oubBy$dWfFvMY}nY()kgRZe7Q-00e* z*`^y9^1L!1`&l;PDe%E(+(~gw38}OcWOX<4;~7BPelBLUFb}C0JT@!v?HUnFkJMRf zcU-vkmJD|JuYO*t376b2b4HaFF*#`>m9Gnjb|j$fN^W@bIu0qBI;U1^$sz(s?T8v6 z%b6}jPb8ryhc9zAs%1(&H$>J4idiATS zFo6b+m8-2j`75KN$IU}%G04gXR;Ft0?wTgk#n$ra%Z1Q%1gdJ}3U66}n(hkQwMPgf zZ9JAwJQZ2!lKHF_j%MCoQ2{K5QPv6r?x?$d|F!g#Y5xSXvM1wU_{geP-C>uhsj00z zvRJN*JY`0NnQR1HeN;OKCI$MP{{?=ZC<%}lxBS;q7*iMHODIe3bg~sY; zsVUavHIJ~@7)$}GbTzQKuGRc-bjW0)>q?FeB@&TV(e!^swwBjwYt@8Jf~&}sDlxb& zXI5FI7GnEza0-5FAoZ*_{JgW}@(v%c+nS`q-RL9Ne(He^YIqb8S6!3o^V%jb#s!+) z8V3zeM5*hRM@Oql|8I0vqG?l&?{=j7Mvp!Izot6SxL5Op%#dt!Mh3<6gI&fx!bq(d b0`LC`dr8$8Cv7*pK>ifv)F8Do=Ar)s@QPk} literal 0 HcmV?d00001 diff --git a/rtdata/rt_splash_5.svg b/rtdata/rt_splash_5.svg new file mode 100644 index 000000000..d5f7ac4f3 --- /dev/null +++ b/rtdata/rt_splash_5.svg @@ -0,0 +1,1772 @@ + + + + + RawTherapee logo white font white glow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + RawTherapee logo white font white glow + + + RawTherapee + + + + + rawtherapee + logo + white + + + www.rawtherapee.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Select the desired element and apply one of the effects in the Filter Editor. You might need to ungroup the element before applying. For example to set the RT ring to have a colorful glow, select it and enable the "ring glow". You can change the flood color of the "ring shadow" effect to make it white if you want to make the logo usable on a dark background.For logo specifics, refer to rt_logo.svg Raw + Therapee + "Raw" font Eras-UltraBlk, 69px, -3px spacing between characters, skewed 2° to the right."Therapee" font Eras-Medium, 68px, 4px spacing between characters, skewed 2° to the right.Both have a dropshadow with an opacity of 0.40 and Gaussian blur standard deviation of 3.5.Version number Eras bold 64 or less.Eras font from "freefonts-0.10":ftp://ftp.gimp.org/pub/gimp/fonts/ RawTherapee splash screen design version 1.0 from 2014-05-03 | www.rawtherapee.com + GNU GPLv3 + 5 + + + From f017603478215231820cfd1860e2128c8dca14a5 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 8 Nov 2016 02:25:34 +0100 Subject: [PATCH 086/115] Enabled property of a tool shoot be first in tool group of pp3 file. Was not the case for Retinex. Fixed. No Issue --- rtengine/procparams.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 5a8ee39a6..1ac3cbed2 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1476,6 +1476,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b //save retinex + if (!pedited || pedited->retinex.enabled) { + keyFile.set_boolean ("Retinex", "Enabled", retinex.enabled); + } + if (!pedited || pedited->retinex.str) { keyFile.set_integer ("Retinex", "Str", retinex.str); } @@ -1504,10 +1508,6 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_double ("Retinex", "Slope", retinex.slope); } - if (!pedited || pedited->retinex.enabled) { - keyFile.set_boolean ("Retinex", "Enabled", retinex.enabled); - } - if (!pedited || pedited->retinex.medianmap) { keyFile.set_boolean ("Retinex", "Median", retinex.medianmap); } From b5094d9d9ffcd0f03e2819b3e259484de0a8a13c Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 8 Nov 2016 14:06:11 +0100 Subject: [PATCH 087/115] Pentax: ISO > 65535 was reported as 65535 in info dialog --- rtengine/imagedata.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index d3400a8d0..dc837117d 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -440,6 +440,16 @@ void ImageData::extractInfo () } } } else if (mnote && (!make.compare (0, 6, "PENTAX") || (!make.compare (0, 5, "RICOH") && !model.compare (0, 6, "PENTAX")))) { + // ISO at max value supported, check manufacturer specific + if (iso_speed == 65535 || iso_speed == 0) { + rtexif::Tag* baseIsoTag = mnote->getTag("ISO"); + if (baseIsoTag) { + std::string isoData = baseIsoTag->valueToString(); + if (isoData.size() > 1) { + iso_speed = atoi(isoData.c_str()); + } + } + } if (mnote->getTag ("LensType")) { lens = mnote->getTag ("LensType")->valueToString (); } From 59e999fbf548ad4ca3695b25804603ba22a070f2 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 8 Nov 2016 15:31:48 +0100 Subject: [PATCH 088/115] Used stoi instead of atoi --- rtengine/imagedata.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index dc837117d..f8e257ddc 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -446,7 +446,7 @@ void ImageData::extractInfo () if (baseIsoTag) { std::string isoData = baseIsoTag->valueToString(); if (isoData.size() > 1) { - iso_speed = atoi(isoData.c_str()); + iso_speed = stoi(isoData); } } } From 25c67ab3c16a9a5a79f4d904d0a451e84562875f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 8 Nov 2016 20:23:48 +0100 Subject: [PATCH 089/115] Fix some Clang warnings reported by @Partha1b --- rtgui/exifpanel.cc | 2 +- rtgui/thresholdselector.cc | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index 88d0a062b..2decd48eb 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -430,7 +430,7 @@ void ExifPanel::addPressed () } else { tcombo->set_active_text (sel); - if (tcombo->get_active () < 0) { + if (!tcombo->get_active ()) { tcombo->append_text (sel); tcombo->set_active_text (sel); } diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 34d5bf14a..59320dd2a 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -17,9 +17,11 @@ * along with RawTherapee. If not, see . */ +#include +#include + #include "thresholdselector.h" #include "multilangmgr.h" -#include #include "mycurve.h" ThresholdSelector::ThresholdSelector(double minValueBottom, double maxValueBottom, double defBottom, Glib::ustring labelBottom, unsigned int precisionBottom, @@ -551,7 +553,7 @@ void ThresholdSelector::findLitCursor(int posX, int posY) // we use minValTop since if this block is executed, it means that we are in a simple Threshold where both bottom and top range are the same double cursorX = (posX - hb) * (maxValTop - minValTop) / (w - 2 * hb) + minValTop; - if (cursorX > positions[TS_TOPRIGHT] || abs(cursorX - positions[TS_TOPRIGHT]) < abs(cursorX - positions[TS_TOPLEFT])) { + if (cursorX > positions[TS_TOPRIGHT] || std::fabs(cursorX - positions[TS_TOPRIGHT]) < std::fabs(cursorX - positions[TS_TOPLEFT])) { litCursor = TS_TOPRIGHT; } } @@ -564,7 +566,7 @@ void ThresholdSelector::findLitCursor(int posX, int posY) // we use minValTop since if this block is executed, it means that we are in a simple Threshold where both bottom and top range are the same double cursorX = (posX - hb) * (maxValTop - minValTop) / (w - 2 * hb) + minValTop; - if (cursorX > positions[TS_BOTTOMRIGHT] || abs(cursorX - positions[TS_BOTTOMRIGHT]) < abs(cursorX - positions[TS_BOTTOMLEFT])) { + if (cursorX > positions[TS_BOTTOMRIGHT] || std::fabs(cursorX - positions[TS_BOTTOMRIGHT]) < std::fabs(cursorX - positions[TS_BOTTOMLEFT])) { litCursor = TS_BOTTOMRIGHT; } } From 4ee191487e0d6357cee593be57bddf5ce814c715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 9 Nov 2016 19:28:14 +0100 Subject: [PATCH 090/115] Fix uncritical warnings in `rtengine/procparams.h` --- rtengine/procparams.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/rtengine/procparams.h b/rtengine/procparams.h index c65e89e24..3a7c3efbb 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -206,7 +206,7 @@ public: } }*/ - Threshold & operator= (const Threshold &rhs) + Threshold& operator =(const Threshold &rhs) { value[0] = rhs.value[0]; value[1] = rhs.value[1]; @@ -217,16 +217,17 @@ public: return *this; } - bool operator== (const Threshold &rhs) const + bool operator ==(const Threshold &rhs) const { - if (_isDouble) - return fabs(value[0] - rhs.value[0]) < 1e-10 - && fabs(value[1] - rhs.value[1]) < 1e-10 - && fabs(value[2] - rhs.value[2]) < 1e-10 - && fabs(value[3] - rhs.value[3]) < 1e-10; - else - return fabs(value[0] - rhs.value[0]) < 1e-10 - && fabs(value[1] - rhs.value[1]) < 1e-10; + if (_isDouble) { + return std::abs(value[0] - rhs.value[0]) < 1e-10 + && std::abs(value[1] - rhs.value[1]) < 1e-10 + && std::abs(value[2] - rhs.value[2]) < 1e-10 + && std::abs(value[3] - rhs.value[3]) < 1e-10; + } else { + return std::abs(value[0] - rhs.value[0]) < 1e-10 + && std::abs(value[1] - rhs.value[1]) < 1e-10; + } } }; From b3bc325934ff412ff740d35c1984bcd987e1929c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Wed, 9 Nov 2016 20:57:23 +0100 Subject: [PATCH 091/115] Add integral `Threshold::operator ==(Threshold)` Kudos to @heckflosse for reminding me what C++11 is about. :) --- rtengine/procparams.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 3a7c3efbb..868a56540 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -229,6 +230,22 @@ public: && std::abs(value[1] - rhs.value[1]) < 1e-10; } } + + template::value>::type> + bool operator ==(const Threshold &rhs) const + { + if (_isDouble) { + return + value[0] == rhs.value[0] + && value[1] == rhs.value[1] + && value[2] == rhs.value[2] + && value[3] == rhs.value[3]; + } else { + return + value[0] == rhs.value[0] + && value[1] == rhs.value[1]; + } + } }; /** From 2d743bfe7f9c5e4e520e3be7f9df39225b2deb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 10 Nov 2016 18:04:06 +0100 Subject: [PATCH 092/115] Provide a better `std::enable_if<>` solution --- rtengine/procparams.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 868a56540..7c2d71aaa 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -218,21 +218,22 @@ public: return *this; } - bool operator ==(const Threshold &rhs) const + template + typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const { if (_isDouble) { - return std::abs(value[0] - rhs.value[0]) < 1e-10 - && std::abs(value[1] - rhs.value[1]) < 1e-10 - && std::abs(value[2] - rhs.value[2]) < 1e-10 - && std::abs(value[3] - rhs.value[3]) < 1e-10; + return std::fabs(value[0] - rhs.value[0]) < 1e-10 + && std::fabs(value[1] - rhs.value[1]) < 1e-10 + && std::fabs(value[2] - rhs.value[2]) < 1e-10 + && std::fabs(value[3] - rhs.value[3]) < 1e-10; } else { - return std::abs(value[0] - rhs.value[0]) < 1e-10 - && std::abs(value[1] - rhs.value[1]) < 1e-10; + return std::fabs(value[0] - rhs.value[0]) < 1e-10 + && std::fabs(value[1] - rhs.value[1]) < 1e-10; } } - template::value>::type> - bool operator ==(const Threshold &rhs) const + template + typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const { if (_isDouble) { return From fda15c124ee146df9e488b2b872d46ab534f07d5 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 10 Nov 2016 20:13:21 +0100 Subject: [PATCH 093/115] Improve support for Pentax K-1, Olympus E-M1MarkII and Canon G7 X --- rtengine/camconst.json | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index cbef6d132..2e11ea204 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1003,8 +1003,8 @@ Camera constants: "ranges": { "white": 16300 } }, - { // Quality B - "make_model": [ "Canon PowerShot G7 X", "Canon PowerShot G7 X Mark II" ], + { // Quality B, + "make_model": "Canon PowerShot G7 X", "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 @@ -1012,8 +1012,8 @@ Camera constants: "ranges": { "white": 4080 } }, - { // Quality B - "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X" ], + { // Quality B, + "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X", "Canon PowerShot G7 X Mark II" ], "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 @@ -1332,6 +1332,20 @@ Camera constants: } }, + { // Quality C, 20Mp and 80Mp raw frames, Color matrix copied from EM5MKII which looks to be close. + "make_model": "OLYMPUS E-M1MarkII", + "dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // E-M5II dng_v9.5 D65 + "raw_crop": [ 8, 8, -16, -8 ], // full raw 5240X3912, jpeg top12,left12,5184x3888, full hires 10400X7792, jpeg crop 8,8,10368x7776 + "ranges": { + "white": [ + { "iso": [ 64, 100, 125, 160, 200, 250, 320, 400 ], "levels": 4090 }, // normal 4095 + { "iso": [ 500, 640, 800, 1000, 1600 ], "levels": 4080 }, // 4085-4095 + { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400 ], "levels": 4060 }, // 4085-4095 + { "iso": [ 12800, 25600, 51200 ], "levels": 4060 } // guess + ] + } + }, + { // Quality B, missing per ISO samples "make_model": "OLYMPUS E-M1", "dcraw_matrix": [ 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 ], // dng d65 @@ -1702,6 +1716,22 @@ Camera constants: } }, + { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid + "make_model": [ "RICOH PENTAX K-1", "PENTAX K-1" ], + "dcraw_matrix": [ 8596,-2981,-639,-4202,12046,2431,-685,1424,6122 ], // adobe DNG v9.7 D65 + // "dcraw_matrix": [ 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 ], // PENTAX DNG + "raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 + "ranges": { + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 16300 }, // 16380 + { "iso": [ 1600, 3200 ], "levels": 16250 }, // 16360 + { "iso": [ 6400, 12800 ], "levels": 16200 }, // 16330 + { "iso": [ 25600, 51200 ], "levels": 16100 }, // 16300 + { "iso": 102400, "levels": 16000 } // 16200 + ] + } + }, + { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX K-3", "PENTAX K-3" ], "dcraw_matrix": [ 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 ], // adobe dcp d65 From 7cb87819108f6ef221cde58f6583bf2dd6a5daeb Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 11 Nov 2016 09:25:29 +0100 Subject: [PATCH 094/115] camconst.json formatting fix --- rtengine/camconst.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 2e11ea204..ed28618ab 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1003,7 +1003,7 @@ Camera constants: "ranges": { "white": 16300 } }, - { // Quality B, + { // Quality B, "make_model": "Canon PowerShot G7 X", "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 @@ -1012,7 +1012,7 @@ Camera constants: "ranges": { "white": 4080 } }, - { // Quality B, + { // Quality B, "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X", "Canon PowerShot G7 X Mark II" ], "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 @@ -1338,12 +1338,12 @@ Camera constants: "raw_crop": [ 8, 8, -16, -8 ], // full raw 5240X3912, jpeg top12,left12,5184x3888, full hires 10400X7792, jpeg crop 8,8,10368x7776 "ranges": { "white": [ - { "iso": [ 64, 100, 125, 160, 200, 250, 320, 400 ], "levels": 4090 }, // normal 4095 - { "iso": [ 500, 640, 800, 1000, 1600 ], "levels": 4080 }, // 4085-4095 - { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400 ], "levels": 4060 }, // 4085-4095 - { "iso": [ 12800, 25600, 51200 ], "levels": 4060 } // guess - ] - } + { "iso": [ 64, 100, 125, 160, 200, 250, 320, 400 ], "levels": 4090 }, // normal 4095 + { "iso": [ 500, 640, 800, 1000, 1600 ], "levels": 4080 }, // 4085-4095 + { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400 ], "levels": 4060 }, // 4085-4095 + { "iso": [ 12800, 25600, 51200 ], "levels": 4060 } // guess + ] + } }, { // Quality B, missing per ISO samples @@ -1719,17 +1719,17 @@ Camera constants: { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid "make_model": [ "RICOH PENTAX K-1", "PENTAX K-1" ], "dcraw_matrix": [ 8596,-2981,-639,-4202,12046,2431,-685,1424,6122 ], // adobe DNG v9.7 D65 - // "dcraw_matrix": [ 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 ], // PENTAX DNG - "raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 + //"dcraw_matrix": [ 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 ], // PENTAX DNG + "raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 "ranges": { - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 16300 }, // 16380 - { "iso": [ 1600, 3200 ], "levels": 16250 }, // 16360 - { "iso": [ 6400, 12800 ], "levels": 16200 }, // 16330 - { "iso": [ 25600, 51200 ], "levels": 16100 }, // 16300 - { "iso": 102400, "levels": 16000 } // 16200 - ] - } + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 16300 }, // 16380 + { "iso": [ 1600, 3200 ], "levels": 16250 }, // 16360 + { "iso": [ 6400, 12800 ], "levels": 16200 }, // 16330 + { "iso": [ 25600, 51200 ], "levels": 16100 }, // 16300 + { "iso": 102400, "levels": 16000 } // 16200 + ] + } }, { // Quality B, intermediate ISOs info missing From bc85236ee916dab71376252823e91e4934089171 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 16 Nov 2016 19:19:35 +0100 Subject: [PATCH 095/115] rt_splash_5 licence changed to CC-BY-SA 3.0, closes #3511 --- rtdata/rt_splash_5.png | Bin 78671 -> 78654 bytes rtdata/rt_splash_5.svg | 12 +++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/rtdata/rt_splash_5.png b/rtdata/rt_splash_5.png index be996e1197805b83afb2b264a826671de829a341..71486b132eb397023c5b92704c8512a6cfc1cbe8 100644 GIT binary patch delta 38 ucmX^AjAh?5mI<#IgC@R~oh-&^#9f@IZ>(paAJ-hUr#Xyqdl)0*PeTAVhYoxI delta 55 zcmdn@jOF|@mI<#IlPA8G<@L+YbI#ArO)W~!Ow5_g&S=b+m#kZysBf%ipns1=>S?np L<91g@#-D}&d6yJ? diff --git a/rtdata/rt_splash_5.svg b/rtdata/rt_splash_5.svg index d5f7ac4f3..78620dd68 100644 --- a/rtdata/rt_splash_5.svg +++ b/rtdata/rt_splash_5.svg @@ -1384,8 +1384,8 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.8308002" - inkscape:cx="291.45048" + inkscape:zoom="1.7607809" + inkscape:cx="184.96363" inkscape:cy="103.21" inkscape:document-units="px" inkscape:current-layer="layer1" @@ -1432,10 +1432,10 @@ www.rawtherapee.com + rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" /> + rdf:about="http://creativecommons.org/licenses/by-sa/3.0/"> - + y="-4.99089" /> Date: Wed, 23 Nov 2016 17:23:25 +0100 Subject: [PATCH 096/115] Tone curve histogram ignores DCP tone curve, fixes #3512 --- rtengine/dcrop.cc | 3 ++- rtengine/improccoordinator.cc | 2 +- rtengine/improcfun.cc | 38 +++++++++++++++++++++++++++++++---- rtengine/improcfun.h | 4 ++-- rtengine/rtthumbnail.cc | 3 ++- rtengine/simpleprocess.cc | 4 +++- 6 files changed, 44 insertions(+), 10 deletions(-) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index e308ab13b..5e3ef6991 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -751,10 +751,11 @@ void Crop::update (int todo) DCPProfile::ApplyState as; DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, parent->currWB, as); + LUTu histToneCurve; parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit , parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm, - parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as); + parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve); } /*xref=000;yref=000; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index ca1d44cbf..1b546669a 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -539,7 +539,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, - rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as); + rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { if (settings->verbose) { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 586243391..3e0433197 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2948,15 +2948,15 @@ filmlike_clip(float *r, float *g, float *b) void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, 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, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ) + const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { - rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn); + rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); } // Process RGB image and convert to LAB space void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, 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, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ) + 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, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { BENCHFUN Imagefloat *tmpImage = nullptr; @@ -3030,6 +3030,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer {wprof[2][0], wprof[2][1], wprof[2][2]} }; + // For tonecurve histogram + float lumimulf[3] = {static_cast(lumimul[0]), static_cast(lumimul[1]), static_cast(lumimul[2])}; + bool mixchannels = (params->chmixer.red[0] != 100 || params->chmixer.red[1] != 0 || params->chmixer.red[2] != 0 || params->chmixer.green[0] != 0 || params->chmixer.green[1] != 100 || params->chmixer.green[2] != 0 || @@ -3282,6 +3285,16 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int W = working->width; int H = working->height; + // For tonecurve histogram + int toneCurveHistSize = histToneCurve ? histToneCurve.getSize() : 0; + int histToneCurveCompression; + + if(toneCurveHistSize > 0) { + histToneCurve.clear(); + histToneCurveCompression = log2(65536 / toneCurveHistSize); + } + + #define TS 112 #ifdef _OPENMP @@ -3325,6 +3338,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float out_rgbx[4 * TS] ALIGNED16; // Line buffer for CLUT + LUTu histToneCurveThr; + if(toneCurveHistSize > 0) { + histToneCurveThr(toneCurveHistSize); + histToneCurveThr.clear(); + } + #ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -3473,6 +3492,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer rtemp[ti * TS + tj] = tonecurve[ rtemp[ti * TS + tj] ]; gtemp[ti * TS + tj] = tonecurve[ gtemp[ti * TS + tj] ]; btemp[ti * TS + tj] = tonecurve[ btemp[ti * TS + tj] ]; + if(histToneCurveThr) { + int y = CLIP(lumimulf[0] * Color::gamma2curve[rtemp[ti * TS + tj]] + lumimulf[1] * Color::gamma2curve[gtemp[ti * TS + tj]] + lumimulf[2] * Color::gamma2curve[btemp[ti * TS + tj]]); + histToneCurveThr[y>>histToneCurveCompression]++; + } } } @@ -4398,7 +4421,14 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (editWhateverBuffer) { free (editWhateverBuffer); } - +#ifdef _OPENMP +#pragma omp critical +{ + if(toneCurveHistSize > 0) { + histToneCurve += histToneCurveThr; + } +} +#endif // _OPENMP } // starting a new tile processing with a 'reduction' clause for the auto mixer computing diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 5af2093d9..6a182e67b 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -208,11 +208,11 @@ public: void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, 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, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ); + const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, 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, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ); + double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve); 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] ); void toning2col (float r, float g, float b, float &ro, float &go, float &bo, float iplow, float iphigh, float rl, float gl, float bl, float rh, float gh, float bh, float SatLow, float SatHigh, float balanS, float balanH, float reducac, int mode, int preser, float strProtect); void toningsmh (float r, float g, float b, float &ro, float &go, float &bo, float RedLow, float GreenLow, float BlueLow, float RedMed, float GreenMed, float BlueMed, float RedHigh, float GreenHigh, float BlueHigh, float reducac, int mode, int preser, float strProtect); diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index c135acc39..4710f3fe8 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1057,7 +1057,8 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei } } - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + LUTu histToneCurve; + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); // freeing up some memory customToneCurve1.Reset(); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 9e7d5f58f..4fb193c2b 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -858,7 +858,9 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + LUTu histToneCurve; + + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); if (settings->verbose) { printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); From c5bef4f3bcb3aa719333d2b24880f3bb5e74ad74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Mon, 28 Nov 2016 20:57:19 +0100 Subject: [PATCH 097/115] Make `ImageIO` load grayscale JPGs and TIFFs (#3515) --- rtengine/imageio.cc | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index f869a0f3e..e886dabce 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -556,11 +556,13 @@ int ImageIO::loadJPEG (Glib::ustring fname) jpeg_read_header(&cinfo, TRUE); //if JPEG is CMYK, then abort reading - if (cinfo.jpeg_color_space == JCS_CMYK || cinfo.jpeg_color_space == JCS_YCCK || cinfo.jpeg_color_space == JCS_GRAYSCALE) { + if (cinfo.jpeg_color_space == JCS_CMYK || cinfo.jpeg_color_space == JCS_YCCK) { jpeg_destroy_decompress(&cinfo); return IMIO_READERROR; } + cinfo.out_color_space = JCS_RGB; + deleteLoadedProfileData(); loadedProfileDataJpg = true; bool hasprofile = read_icc_profile (&cinfo, (JOCTET**)&loadedProfileData, (unsigned int*)&loadedProfileLength); @@ -677,8 +679,8 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, TIFFClose(in); - if (photometric == PHOTOMETRIC_RGB) { - if ((samplesperpixel == 3 || samplesperpixel == 4) && sampleformat == SAMPLEFORMAT_UINT) { + if (photometric == PHOTOMETRIC_RGB || photometric == PHOTOMETRIC_MINISBLACK) { + if ((samplesperpixel == 1 || samplesperpixel == 3 || samplesperpixel == 4) && sampleformat == SAMPLEFORMAT_UINT) { if (bitspersample == 8) { sFormat = IIOSF_UNSIGNED_CHAR; return IMIO_SUCCESS; @@ -820,7 +822,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) allocate (width, height); float minValue[3] = {0.f, 0.f, 0.f}, maxValue[3] = {0.f, 0.f, 0.f}; - unsigned char* linebuffer = new unsigned char[TIFFScanlineSize(in)]; + unsigned char* linebuffer = new unsigned char[TIFFScanlineSize(in) * (samplesperpixel == 1 ? 3 : 1)]; for (int row = 0; row < height; row++) { if (TIFFReadScanline(in, linebuffer, row, 0) < 0) { @@ -829,10 +831,21 @@ int ImageIO::loadTIFF (Glib::ustring fname) return IMIO_READERROR; } - if (samplesperpixel > 3) + if (samplesperpixel > 3) { for (int i = 0; i < width; i++) { memcpy (linebuffer + i * 3 * bitspersample / 8, linebuffer + i * samplesperpixel * bitspersample / 8, 3 * bitspersample / 8); } + } + else if (samplesperpixel == 1) { + const size_t bytes = bitspersample / 8; + for (int i = width - 1; i >= 0; --i) { + const unsigned char* const src = linebuffer + i * bytes; + unsigned char* const dest = linebuffer + i * 3 * bytes; + memcpy(dest + 2 * bytes, src, bytes); + memcpy(dest + 1 * bytes, src, bytes); + memcpy(dest + 0 * bytes, src, bytes); + } + } if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { setScanline (row, linebuffer, bitspersample, minValue, maxValue); From 981a53492010a50fd9b2a334b4c130ca3799b7ae Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 29 Nov 2016 13:11:42 +0100 Subject: [PATCH 098/115] Fixes #3517, build fails when using libcairo 1.15 --- rtgui/guiutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index 38f5297eb..b8e058eb4 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -437,7 +437,7 @@ public: // you have to check if the surface is created thanks to surfaceCreated before starting to draw on it bool surfaceCreated() { - return surface; + return static_cast(surface); } Cairo::RefPtr getSurface() { From 976fc087bd52e8759e81bb7962fc66ea86b73ae9 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 3 Dec 2016 11:24:11 +0100 Subject: [PATCH 099/115] Removed some debug message left in code --- rtengine/iplab2rgb.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 6b04bb8f2..218dbf6fe 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -169,9 +169,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; if (icm.outputBPC) { flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; - printf("lab2rgb / bpc=true\n"); } - else printf("lab2rgb / bpc=false\n"); lcmsMutex->lock (); cmsHPROFILE LabIProf = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (LabIProf, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, icm.outputIntent, flags); // NOCACHE is important for thread safety @@ -290,19 +288,15 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int iccStore->getGammaArray(icm, *ga); oprof = iccStore->createGammaProfile(icm, *ga); lcmsMutex->unlock (); - printf("iccStore->createGammaProfile(icm, *ga);\n"); } else { oprof = iccStore->getProfile (icm.output); -// printf("iccStore->getProfile (%s);\n", icm.output.c_str()); } if (oprof) { cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; if (icm.outputBPC) { flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; -// printf("lab2rgb16 / icm.outputBPC=true / outputIntent=%d\n", icm.outputIntent); } -// else printf("lab2rgb16 / icm.outputBPC=false / outputIntent=%d\n", icm.outputIntent); lcmsMutex->lock (); cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, oprof, TYPE_RGB_16, icm.outputIntent, flags); From 1f080e0438e8e88270f8cd5612d86e724d699efb Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 11 Dec 2016 17:17:36 +0100 Subject: [PATCH 100/115] Bugfix: RT could crash while displaying Color Pickers (no issue) --- rtgui/cropwindow.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 10b188a21..20dd3eb9d 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -2083,10 +2083,15 @@ void CropWindow::updateHoveredPicker (rtengine::Coord *imgPos) } LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); hoveredPicker->setValidity (validity); + + { + MyMutex::MyLock lock(cropHandler.cimg); + if (validity == LockableColorPicker::Validity::INSIDE) { cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, hoveredPicker->getSize()); hoveredPicker->setRGB (r, g, b, rpreview, gpreview, bpreview); } + } } void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) { @@ -2450,6 +2455,7 @@ void CropWindow::drawObservedFrame (Cairo::RefPtr cr, int rw, in void CropWindow::cropImageUpdated () { + MyMutex::MyLock lock(cropHandler.cimg); for (auto colorPicker : colorPickers) { Coord imgPos, cropPos; From db2c01af023a3cfc7985442149b98897e63f39be Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 13 Dec 2016 15:13:03 +0100 Subject: [PATCH 101/115] Further small speedup for vignette and gradient --- rtengine/iptransform.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 594753526..fce599d8a 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -444,7 +444,7 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) val = 1.f - val; } - val *= (M_PI / 2); + val *= M_PIf_2; if (gp.scale < 1.f) { val = pow3(xsinf(val)); @@ -468,7 +468,7 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) val = gp.bright_top ? 1.f - val : val; - val *= (M_PI / 2); + val *= M_PIf_2; if (gp.scale < 1.f) { val = pow3(xsinf(val)); @@ -590,7 +590,7 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) std::swap(a, b); } - float dist = sqrtf(a * a + b * b); + float dist = normn(a, b, 2); float dist_oe, dist_ie; float2 sincosval; @@ -623,7 +623,7 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) if (dist >= dist_oe) { val = pcv.scale; } else { - val = (M_PI / 2) * (dist - dist_ie) / (dist_oe - dist_ie); + val = M_PIf_2 * (dist - dist_ie) / (dist_oe - dist_ie); if (pcv.scale < 1.f) { val = pow4(xcosf(val)); From 23f17bd9bc0d1413e3919285b23e5dd978429676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Tue, 13 Dec 2016 20:44:05 +0100 Subject: [PATCH 102/115] Fully check thumb data size (#3529) Also, take rotation into account when falling back to `Thumbnail::loadFromRaw()`. --- rtengine/rawimage.h | 16 ++++++++-------- rtengine/rtthumbnail.cc | 41 +++++++++++++++++++++++++++++++++++++---- rtgui/cropwindow.cc | 10 +++++----- 3 files changed, 50 insertions(+), 17 deletions(-) diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 88ef5d710..b741a7ffc 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -274,37 +274,37 @@ public: { return profile_data; } - IMFILE *get_file() + IMFILE *get_file() const { return ifp; } bool is_supportedThumb() const ; bool is_jpegThumb() const ; bool is_ppmThumb() const ; - int get_thumbOffset() + int get_thumbOffset() const { return int(thumb_offset); } - int get_thumbWidth() + int get_thumbWidth() const { return int(thumb_width); } - int get_thumbHeight() + int get_thumbHeight() const { return int(thumb_height); } - int get_thumbBPS() + int get_thumbBPS() const { return thumb_load_raw ? 16 : 8; } bool get_thumbSwap() const; - unsigned get_thumbLength() + unsigned get_thumbLength() const { return thumb_length; } - bool zeroIsBad() + bool zeroIsBad() const { - return zero_is_bad == 1 ? true : false; + return zero_is_bad == 1; } public: diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 4710f3fe8..77e260985 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -41,6 +41,25 @@ #include "StopWatch.h" +namespace +{ + + bool checkRawImageThumb(const rtengine::RawImage& raw_image) + { + if (!raw_image.is_supportedThumb()) { + return false; + } + + const std::size_t length = + fdata(raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() + ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 + : raw_image.get_thumbLength(); + + return raw_image.get_thumbOffset() + length < raw_image.get_file()->size; + } + +} + extern Options options; namespace rtengine @@ -175,8 +194,8 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL int err = 1; - // see if it is something we support - if ( ri->is_supportedThumb() && ri->get_thumbOffset() < ri->get_file()->size ) { + // See if it is something we support + if (checkRawImageThumb(*ri)) { const char* data((const char*)fdata(ri->get_thumbOffset(), ri->get_file())); if ( (unsigned char)data[1] == 0xd8 ) { @@ -491,6 +510,17 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati tmph = high; } + const bool rotate_90 = + rotate + && ( + ri->get_rotateDegree() == 90 + || ri->get_rotateDegree() == 270 + ); + + if (rotate_90) { + std::swap(tmpw, tmph); + } + if (fixwh == 1) { // fix height, scale width w = tmpw * h / tmph; } else { @@ -501,8 +531,11 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati delete tpp->thumbImg; } - tpp->thumbImg = nullptr; - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, tmpImg); + if (rotate_90) { + tpp->thumbImg = resizeTo(h, w, TI_Bilinear, tmpImg); + } else { + tpp->thumbImg = resizeTo(w, h, TI_Bilinear, tmpImg); + } delete tmpImg; diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 20dd3eb9d..0fc3359bc 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -2085,12 +2085,12 @@ void CropWindow::updateHoveredPicker (rtengine::Coord *imgPos) hoveredPicker->setValidity (validity); { - MyMutex::MyLock lock(cropHandler.cimg); + MyMutex::MyLock lock(cropHandler.cimg); - if (validity == LockableColorPicker::Validity::INSIDE) { - cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, hoveredPicker->getSize()); - hoveredPicker->setRGB (r, g, b, rpreview, gpreview, bpreview); - } + if (validity == LockableColorPicker::Validity::INSIDE) { + cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, hoveredPicker->getSize()); + hoveredPicker->setRGB (r, g, b, rpreview, gpreview, bpreview); + } } } void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) From cc4e7be2df813b4aebae93fbb4f1dc6278922021 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 14 Dec 2016 14:01:05 +0100 Subject: [PATCH 103/115] Fix crash with Canon m-raw files when raw crop in camconst.json is defined, #3533 --- rtengine/rawimage.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 382ebe0a7..1a8488c76 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -534,7 +534,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene free (raw_image); raw_image = nullptr; } else { - if (cc && cc->has_rawCrop()) { // foveon images + if (is_foveon && cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; cc->get_rawCrop(lm, tm, w, h); left_margin = lm; From 3cc8438cf90a3001c2f01d44e2962c0c2c8dc262 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 14 Dec 2016 14:39:20 +0100 Subject: [PATCH 104/115] CbDL before black and white no preview when changing exposure, fixes #3539 --- rtengine/dcrop.cc | 4 ++-- rtengine/improccoordinator.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 5e3ef6991..a90c78069 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -678,7 +678,7 @@ void Crop::update (int todo) createBuffer(cropw, croph); // transform - if (needstransform || ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) { + if (needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) { if (!transCrop) { transCrop = new Imagefloat (cropw, croph); } @@ -701,7 +701,7 @@ void Crop::update (int todo) transCrop = nullptr; } - if ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { + if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = baseCrop->getWidth(); const int H = baseCrop->getHeight(); diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 1b546669a..9c04e0710 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -372,12 +372,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Remove transformation if unneeded bool needstransform = ipf.needsTransform(); - if (!needstransform && !((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { + if (!needstransform && !((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { delete oprevi; oprevi = orig_prev; } - if ((needstransform || ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { + if ((needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { if(!oprevi || oprevi == orig_prev) oprevi = new Imagefloat (pW, pH); if (needstransform) @@ -387,7 +387,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) orig_prev->copyData(oprevi); } - if ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { + if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = oprevi->getWidth(); const int H = oprevi->getHeight(); LabImage labcbdl(W, H); From 47ce8778b18b4a36f06e9bc87a4365532ce835f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 15 Dec 2016 19:43:20 +0100 Subject: [PATCH 105/115] Experiment to prevent var-tracking warning (#3543) --- rtexif/nikonattribs.cc | 1040 +++++++++++++++++----------------- rtexif/sonyminoltaattribs.cc | 1008 ++++++++++++++++---------------- 2 files changed, 1025 insertions(+), 1023 deletions(-) diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index 01b825882..9bbeee8ce 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -322,526 +322,9 @@ NAAFInfoInterpreter naAFInfoInterpreter; class NALensDataInterpreter : public Interpreter { - std::map lenses; + static const std::map lenses; + public: - NALensDataInterpreter () - { - /* The key is a composite string made of 8 HEX bytes - * LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType */ - lenses["00 00 00 00 00 00 00 01"] = "Manual Lens No CPU"; - lenses["00 00 00 00 00 00 E1 12"] = "TC-17E II"; - lenses["00 00 00 00 00 00 F1 0C"] = "TC-14E [II] or Sigma APO Tele Converter 1.4x EX DG or Kenko Teleplus PRO 300 DG 1.4x"; - lenses["00 00 00 00 00 00 F2 18"] = "TC-20E [II] or Sigma APO Tele Converter 2x EX DG or Kenko Teleplus PRO 300 DG 2.0x"; - lenses["00 00 48 48 53 53 00 01"] = "Loreo 40mm f/11-22 3D Lens in a Cap 9005"; - lenses["00 36 1C 2D 34 3C 00 06"] = "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF) (A13)"; - lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 AF PRO DX (AF 12-24mm f/4)"; - lenses["00 3C 2B 44 30 30 00 06"] = "Tokina AT-X 17-35 f/4 PRO FX (AF 17-35mm f/4)"; - lenses["00 3C 5C 80 30 30 00 0E"] = "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm f/4)"; - lenses["00 3E 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF) (A08)"; - lenses["00 3F 2D 80 2B 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) (A14)"; - lenses["00 3F 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14)"; - lenses["00 3F 80 A0 38 3F 00 02"] = "Tamron SP AF 200-500mm f/5-6.3 Di (A08)"; - lenses["00 40 11 11 2C 2C 00 00"] = "Samyang 8mm f/3.5 Fish-Eye"; - lenses["00 40 18 2B 2C 34 00 06"] = "Tokina AT-X 107 AF DX Fisheye (AF 10-17mm f/3.5-4.5)"; - lenses["00 40 2A 72 2C 3C 00 06"] = "Tokina AT-X 16.5-135 DX (AF 16.5-135mm f/3.5-5.6)"; - lenses["00 40 2B 2B 2C 2C 00 02"] = "Tokina AT-X 17 AF PRO (AF 17mm f/3.5)"; - lenses["00 40 2D 2D 2C 2C 00 00"] = "Carl Zeiss Distagon T* 3.5/18 ZF.2"; - lenses["00 40 2D 80 2C 40 00 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)"; - lenses["00 40 2D 88 2C 40 00 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18NII)"; - lenses["00 40 2D 88 2C 40 62 06"] = "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18)"; - lenses["00 40 31 31 2C 2C 00 00"] = "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical"; - lenses["00 40 37 80 2C 3C 00 02"] = "Tokina AT-X 242 AF (AF 24-200mm f/3.5-5.6)"; - lenses["00 40 64 64 2C 2C 00 00"] = "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus"; - lenses["00 44 60 98 34 3C 00 02"] = "Tokina AT-X 840 D (AF 80-400mm f/4.5-5.6)"; - lenses["00 47 10 10 24 24 00 00"] = "Fisheye Nikkor 8mm f/2.8 AiS"; - lenses["00 47 25 25 24 24 00 02"] = "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)"; - lenses["00 47 3C 3C 24 24 00 00"] = "Nikkor 28mm f/2.8 AiS"; - lenses["00 47 44 44 24 24 00 06"] = "Tokina AT-X M35 PRO DX (AF 35mm f/2.8 Macro)"; - lenses["00 47 53 80 30 3C 00 06"] = "Tamron AF 55-200mm f/4-5.6 Di II LD (A15)"; - lenses["00 48 1C 29 24 24 00 06"] = "Tokina AT-X 116 PRO DX (AF 11-16mm f/2.8)"; - lenses["00 48 29 3C 24 24 00 06"] = "Tokina AT-X 16-28 AF PRO FX (AF 16-28mm f/2.8)"; - lenses["00 48 29 50 24 24 00 06"] = "Tokina AT-X 165 PRO DX (AF 16-50mm f/2.8)"; - lenses["00 48 32 32 24 24 00 00"] = "Carl Zeiss Distagon T* 2.8/21 ZF.2"; - lenses["00 48 37 5C 24 24 00 06"] = "Tokina AT-X 24-70 f/2.8 PRO FX (AF 24-70mm f/2.8)"; - lenses["00 48 3C 3C 24 24 00 00"] = "Voigtlander Color Skopar 28mm f/2.8 SL II"; - lenses["00 48 3C 60 24 24 00 02"] = "Tokina AT-X 280 AF PRO (AF 28-80mm f/2.8)"; - lenses["00 48 3C 6A 24 24 00 02"] = "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF (176D)"; - lenses["00 48 50 50 18 18 00 00"] = "Nikkor H 50mm f/2"; - lenses["00 48 50 72 24 24 00 06"] = "Tokina AT-X 535 PRO DX (AF 50-135mm f/2.8)"; - lenses["00 48 5C 80 30 30 00 0E"] = "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm f/4)"; - lenses["00 48 5C 8E 30 3C 00 06"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17NII)"; - lenses["00 48 68 68 24 24 00 00"] = "Series E 100mm f/2.8"; - lenses["00 48 80 80 30 30 00 00"] = "Nikkor 200mm f/4 AiS"; - lenses["00 49 30 48 22 2B 00 02"] = "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"; - lenses["00 4C 6A 6A 20 20 00 00"] = "Nikkor 105mm f/2.5 AiS"; - lenses["00 4C 7C 7C 2C 2C 00 02"] = "Tamron SP AF 180mm f/3.5 Di Model (B01)"; - lenses["00 53 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16)"; - lenses["00 54 2B 50 24 24 00 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"; - lenses["00 54 3C 3C 18 18 00 00"] = "Carl Zeiss Distagon T* 2/28 ZF.2"; - lenses["00 54 44 44 0C 0C 00 00"] = "Carl Zeiss Distagon T* 1.4/35 ZF.2"; - lenses["00 54 44 44 18 18 00 00"] = "Carl Zeiss Distagon T* 2/35 ZF.2"; - lenses["00 54 48 48 18 18 00 00"] = "Voigtlander Ultron 40mm f/2 SLII Aspherical"; - lenses["00 54 50 50 0C 0C 00 00"] = "Carl Zeiss Planar T* 1.4/50 ZF.2"; - lenses["00 54 50 50 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 2/50 ZF.2"; - lenses["00 54 53 53 0C 0C 00 00"] = "Zeiss Otus 1.4/55"; - lenses["00 54 55 55 0C 0C 00 00"] = "Voigtlander Nokton 58mm f/1.4 SLII"; - lenses["00 54 56 56 30 30 00 00"] = "Coastal Optical Systems 60mm 1:4 UV-VIS-IR Macro Apo"; - lenses["00 54 62 62 0C 0C 00 00"] = "Carl Zeiss Planar T* 1.4/85 ZF.2"; - lenses["00 54 68 68 18 18 00 00"] = "Carl Zeiss Makro-Planar T* 2/100 ZF.2"; - lenses["00 54 68 68 24 24 00 02"] = "Tokina AT-X M100 AF PRO D (AF 100mm f/2.8 Macro)"; - lenses["00 54 72 72 18 18 00 00"] = "Carl Zeiss Apo Sonnar T* 2/135 ZF.2"; - lenses["00 54 8E 8E 24 24 00 02"] = "Tokina AT-X 300 AF PRO (AF 300mm f/2.8)"; - lenses["00 57 50 50 14 14 00 00"] = "Nikkor 50mm f/1.8 AI"; - lenses["00 58 64 64 20 20 00 00"] = "Soligor C/D Macro MC 90mm f/2.5"; - lenses["01 00 00 00 00 00 02 00"] = "TC-16A"; - lenses["01 00 00 00 00 00 08 00"] = "TC-16A"; - lenses["01 54 62 62 0C 0C 00 00"] = "Zeiss Otus 1.4/85"; - lenses["01 58 50 50 14 14 02 00"] = "AF Nikkor 50mm f/1.8"; - lenses["01 58 50 50 14 14 05 00"] = "AF Nikkor 50mm f/1.8"; - lenses["02 2F 98 98 3D 3D 02 00"] = "Sigma APO 400mm f/5.6"; - lenses["02 34 A0 A0 44 44 02 00"] = "Sigma APO 500mm f/7.2"; - lenses["02 37 5E 8E 35 3D 02 00"] = "Sigma 75-300mm f/4.5-5.6 APO"; - lenses["02 37 A0 A0 34 34 02 00"] = "Sigma APO 500mm f/4.5"; - lenses["02 3A 37 50 31 3D 02 00"] = "Sigma 24-50mm f/4-5.6 UC"; - lenses["02 3A 5E 8E 32 3D 02 00"] = "Sigma 75-300mm f/4.0-5.6"; - lenses["02 3B 44 61 30 3D 02 00"] = "Sigma 35-80mm f/4-5.6"; - lenses["02 3C B0 B0 3C 3C 02 00"] = "Sigma APO 800mm f/5.6"; - lenses["02 3F 24 24 2C 2C 02 00"] = "Sigma 14mm f/3.5"; - lenses["02 3F 3C 5C 2D 35 02 00"] = "Sigma 28-70mm f/3.5-4.5 UC"; - lenses["02 40 44 5C 2C 34 02 00"] = "Exakta AF 35-70mm 1:3.5-4.5 MC"; - lenses["02 40 44 73 2B 36 02 00"] = "Sigma 35-135mm f/3.5-4.5 a"; - lenses["02 40 5C 82 2C 35 02 00"] = "Sigma APO 70-210mm f/3.5-4.5"; - lenses["02 42 44 5C 2A 34 02 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5"; - lenses["02 42 44 5C 2A 34 08 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5"; - lenses["02 46 37 37 25 25 02 00"] = "Sigma 24mm f/2.8 Super Wide II Macro"; - lenses["02 46 3C 5C 25 25 02 00"] = "Sigma 28-70mm f/2.8"; - lenses["02 46 5C 82 25 25 02 00"] = "Sigma 70-210mm f/2.8 APO"; - lenses["02 48 50 50 24 24 02 00"] = "Sigma Macro 50mm f/2.8"; - lenses["02 48 65 65 24 24 02 00"] = "Sigma Macro 90mm f/2.8"; - lenses["03 43 5C 81 35 35 02 00"] = "Soligor AF C/D Zoom UMCS 70-210mm 1:4.5"; - lenses["03 48 5C 81 30 30 02 00"] = "AF Zoom-Nikkor 70-210mm f/4"; - lenses["04 48 3C 3C 24 24 03 00"] = "AF Nikkor 28mm f/2.8"; - lenses["05 54 50 50 0C 0C 04 00"] = "AF Nikkor 50mm f/1.4"; - lenses["06 3F 68 68 2C 2C 06 00"] = "Cosina AF 100mm f/3.5 Macro"; - lenses["06 54 53 53 24 24 06 00"] = "AF Micro-Nikkor 55mm f/2.8"; - lenses["07 36 3D 5F 2C 3C 03 00"] = "Cosina AF Zoom 28-80mm f/3.5-5.6 MC Macro"; - lenses["07 3E 30 43 2D 35 03 00"] = "Soligor AF Zoom 19-35mm 1:3.5-4.5 MC"; - lenses["07 40 2F 44 2C 34 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)"; - lenses["07 40 30 45 2D 35 03 02"] = "Tamron AF 19-35mm f/3.5-4.5 (A10)"; - lenses["07 40 3C 5C 2C 35 03 00"] = "Tokina AF 270 II (AF 28-70mm f/3.5-4.5)"; - lenses["07 40 3C 62 2C 34 03 00"] = "AF Zoom-Nikkor 28-85mm f/3.5-4.5"; - lenses["07 46 2B 44 24 30 03 02"] = "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)"; - lenses["07 46 3D 6A 25 2F 03 00"] = "Cosina AF Zoom 28-105mm f/2.8-3.8 MC"; - lenses["07 47 3C 5C 25 35 03 00"] = "Tokina AF 287 SD (AF 28-70mm f/2.8-4.5)"; - lenses["07 48 3C 5C 24 24 03 00"] = "Tokina AT-X 287 AF (AF 28-70mm f/2.8)"; - lenses["08 40 44 6A 2C 34 04 00"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5"; - lenses["09 48 37 37 24 24 04 00"] = "AF Nikkor 24mm f/2.8"; - lenses["0A 48 8E 8E 24 24 03 00"] = "AF Nikkor 300mm f/2.8 IF-ED"; - lenses["0A 48 8E 8E 24 24 05 00"] = "AF Nikkor 300mm f/2.8 IF-ED N"; - lenses["0B 3E 3D 7F 2F 3D 0E 00"] = "Tamron AF 28-200mm f/3.8-5.6 (71D)"; - lenses["0B 3E 3D 7F 2F 3D 0E 02"] = "Tamron AF 28-200mm f/3.8-5.6D (171D)"; - lenses["0B 48 7C 7C 24 24 05 00"] = "AF Nikkor 180mm f/2.8 IF-ED"; - lenses["0D 40 44 72 2C 34 07 00"] = "AF Zoom-Nikkor 35-135mm f/3.5-4.5"; - lenses["0E 48 5C 81 30 30 05 00"] = "AF Zoom-Nikkor 70-210mm f/4"; - lenses["0E 4A 31 48 23 2D 0E 02"] = "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"; - lenses["0F 58 50 50 14 14 05 00"] = "AF Nikkor 50mm f/1.8 N"; - lenses["10 3D 3C 60 2C 3C D2 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"; - lenses["10 48 8E 8E 30 30 08 00"] = "AF Nikkor 300mm f/4 IF-ED"; - lenses["11 48 44 5C 24 24 08 00"] = "AF Zoom-Nikkor 35-70mm f/2.8"; - lenses["12 36 5C 81 35 3D 09 00"] = "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro"; - lenses["12 36 69 97 35 42 09 00"] = "Soligor AF Zoom 100-400mm 1:4.5-6.7 MC"; - lenses["12 38 69 97 35 42 09 02"] = "Promaster Spectrum 7 100-400mm f/4.5-6.7"; - lenses["12 39 5C 8E 34 3D 08 02"] = "Cosina AF Zoom 70-300mm f/4.5-5.6 MC Macro"; - lenses["12 3B 68 8D 3D 43 09 02"] = "Cosina AF Zoom 100-300mm f/5.6-6.7 MC Macro"; - lenses["12 3B 98 98 3D 3D 09 00"] = "Tokina AT-X 400 AF SD (AF 400mm f/5.6)"; - lenses["12 3D 3C 80 2E 3C DF 02"] = "Tamron AF 28-200mm f/3.8-5.6 AF Aspherical LD (IF) (271D)"; - lenses["12 44 5E 8E 34 3C 09 00"] = "Tokina AF 730 (AF 75-300mm f/4.5-5.6)"; - lenses["12 48 5C 81 30 3C 09 00"] = "AF Nikkor 70-210mm f/4-5.6"; - lenses["12 4A 5C 81 31 3D 09 00"] = "Soligor AF C/D Auto Zoom+Macro 70-210mm 1:4-5.6 UMCS"; - lenses["13 42 37 50 2A 34 0B 00"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5"; - lenses["14 48 60 80 24 24 0B 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED"; - lenses["14 48 68 8E 30 30 0B 00"] = "Tokina AT-X 340 AF (AF 100-300mm f/4)"; - lenses["14 54 60 80 24 24 0B 00"] = "Tokina AT-X 828 AF (AF 80-200mm f/2.8)"; - lenses["15 4C 62 62 14 14 0C 00"] = "AF Nikkor 85mm f/1.8"; - lenses["17 3C A0 A0 30 30 0F 00"] = "Nikkor 500mm f/4 P ED IF"; - lenses["17 3C A0 A0 30 30 11 00"] = "Nikkor 500mm f/4 P ED IF"; - lenses["18 40 44 72 2C 34 0E 00"] = "AF Zoom-Nikkor 35-135mm f/3.5-4.5 N"; - lenses["1A 54 44 44 18 18 11 00"] = "AF Nikkor 35mm f/2"; - lenses["1B 44 5E 8E 34 3C 10 00"] = "AF Zoom-Nikkor 75-300mm f/4.5-5.6"; - lenses["1C 48 30 30 24 24 12 00"] = "AF Nikkor 20mm f/2.8"; - lenses["1D 42 44 5C 2A 34 12 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N"; - lenses["1E 54 56 56 24 24 13 00"] = "AF Micro-Nikkor 60mm f/2.8"; - lenses["1E 5D 64 64 20 20 13 00"] = "Tamron SP AF 90mm f/2.5 (52E)"; - lenses["1F 54 6A 6A 24 24 14 00"] = "AF Micro-Nikkor 105mm f/2.8"; - lenses["20 3C 80 98 3D 3D 1E 02"] = "Tamron AF 200-400mm f/5.6 LD IF (75D)"; - lenses["20 48 60 80 24 24 15 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED"; - lenses["20 5A 64 64 20 20 14 00"] = "Tamron SP AF 90mm f/2.5 Macro (152E)"; - lenses["21 40 3C 5C 2C 34 16 00"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5"; - lenses["21 56 8E 8E 24 24 14 00"] = "Tamron SP AF 300mm f/2.8 LD-IF (60E)"; - lenses["22 48 72 72 18 18 16 00"] = "AF DC-Nikkor 135mm f/2"; - lenses["22 53 64 64 24 24 E0 02"] = "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)"; - lenses["23 30 BE CA 3C 48 17 00"] = "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF"; - lenses["24 44 60 98 34 3C 1A 02"] = "Tokina AT-X 840 AF-II (AF 80-400mm f/4.5-5.6)"; - lenses["24 48 60 80 24 24 1A 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; - lenses["24 54 60 80 24 24 1A 02"] = "Tokina AT-X 828 AF PRO (AF 80-200mm f/2.8)"; - lenses["25 44 44 8E 34 42 1B 02"] = "Tokina AF 353 (AF 35-300mm f/4.5-6.7)"; - lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 270 AF PRO II (AF 28-70mm f/2.6-2.8)"; - lenses["25 48 3C 5C 24 24 1B 02"] = "Tokina AT-X 287 AF PRO SV (AF 28-70mm f/2.8)"; - lenses["25 48 44 5C 24 24 1B 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D"; - lenses["25 48 44 5C 24 24 3A 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D"; - lenses["25 48 44 5C 24 24 52 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D"; - lenses["26 3C 54 80 30 3C 1C 06"] = "Sigma 55-200mm f/4-5.6 DC"; - lenses["26 3C 5C 82 30 3C 1C 02"] = "Sigma 70-210mm f/4-5.6 UC-II"; - lenses["26 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 DG Macro"; - lenses["26 3C 98 98 3C 3C 1C 02"] = "Sigma APO Tele Macro 400mm f/5.6"; - lenses["26 3D 3C 80 2F 3D 1C 02"] = "Sigma 28-300mm f/3.8-5.6 Aspherical"; - lenses["26 3E 3C 6A 2E 3C 1C 02"] = "Sigma 28-105mm f/3.8-5.6 UC-III Aspherical IF"; - lenses["26 40 27 3F 2C 34 1C 02"] = "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical DF"; - lenses["26 40 2D 44 2B 34 1C 02"] = "Sigma 18-35mm f/3.5-4.5 Aspherical"; - lenses["26 40 2D 50 2C 3C 1C 06"] = "Sigma 18-50mm f/3.5-5.6 DC"; - lenses["26 40 2D 70 2B 3C 1C 06"] = "Sigma 18-125mm f/3.5-5.6 DC"; - lenses["26 40 2D 80 2C 40 1C 06"] = "Sigma 18-200mm f/3.5-6.3 DC"; - lenses["26 40 37 5C 2C 3C 1C 02"] = "Sigma 24-70mm f/3.5-5.6 Aspherical HF"; - lenses["26 40 3C 5C 2C 34 1C 02"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"; - lenses["26 40 3C 60 2C 3C 1C 02"] = "Sigma 28-80mm f/3.5-5.6 Mini Zoom Macro II Aspherical"; - lenses["26 40 3C 65 2C 3C 1C 02"] = "Sigma 28-90mm f/3.5-5.6 Macro"; - lenses["26 40 3C 80 2B 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"; - lenses["26 40 3C 80 2C 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"; - lenses["26 40 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 Macro"; - lenses["26 40 7B A0 34 40 1C 02"] = "Sigma APO 170-500mm f/5-6.3 Aspherical RF"; - lenses["26 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro"; - lenses["26 44 73 98 34 3C 1C 02"] = "Sigma 135-400mm f/4.5-5.6 APO Aspherical"; - lenses["26 48 11 11 30 30 1C 02"] = "Sigma 8mm f/4 EX Circular Fisheye"; - lenses["26 48 27 27 24 24 1C 02"] = "Sigma 15mm f/2.8 EX Diagonal Fisheye"; - lenses["26 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC"; - lenses["26 48 31 49 24 24 1C 02"] = "Sigma 20-40mm f/2.8"; - lenses["26 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG"; - lenses["26 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm f/2.8 EX DG"; - lenses["26 48 3C 5C 24 30 1C 02"] = "Sigma 28-70mm f/2.8-4 DG"; - lenses["26 48 3C 6A 24 30 1C 02"] = "Sigma 28-105mm f/2.8-4 Aspherical"; - lenses["26 48 8E 8E 30 30 1C 02"] = "Sigma APO Tele Macro 300mm f/4"; - lenses["26 54 2B 44 24 30 1C 02"] = "Sigma 17-35mm f/2.8-4 EX Aspherical"; - lenses["26 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; - lenses["26 54 37 73 24 34 1C 02"] = "Sigma 24-135mm f/2.8-4.5"; - lenses["26 54 3C 5C 24 24 1C 02"] = "Sigma 28-70mm f/2.8 EX"; - lenses["26 58 31 31 14 14 1C 02"] = "Sigma 20mm f/1.8 EX DG Aspherical RF"; - lenses["26 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro"; - lenses["26 58 3C 3C 14 14 1C 02"] = "Sigma 28mm f/1.8 EX DG Aspherical Macro"; - lenses["27 48 8E 8E 24 24 1D 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED"; - lenses["27 48 8E 8E 24 24 E1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-17E"; - lenses["27 48 8E 8E 24 24 F1 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-14E"; - lenses["27 48 8E 8E 24 24 F2 02"] = "AF-I Nikkor 300mm f/2.8D IF-ED + TC-20E"; - lenses["27 48 8E 8E 30 30 1D 02"] = "Tokina AT-X 304 AF (AF 300mm f/4.0)"; - lenses["27 54 8E 8E 24 24 1D 02"] = "Tamron SP AF 300mm f/2.8 LD-IF (360E)"; - lenses["28 3C A6 A6 30 30 1D 02"] = "AF-I Nikkor 600mm f/4D IF-ED"; - lenses["28 3C A6 A6 30 30 E1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-17E"; - lenses["28 3C A6 A6 30 30 F1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-14E"; - lenses["28 3C A6 A6 30 30 F2 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-20E"; - lenses["2A 54 3C 3C 0C 0C 26 02"] = "AF Nikkor 28mm f/1.4D"; - lenses["2B 3C 44 60 30 3C 1F 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D"; - lenses["2C 48 6A 6A 18 18 27 02"] = "AF DC-Nikkor 105mm f/2D"; - lenses["2D 48 80 80 30 30 21 02"] = "AF Micro-Nikkor 200mm f/4D IF-ED"; - lenses["2E 48 5C 82 30 3C 22 02"] = "AF Nikkor 70-210mm f/4-5.6D"; - lenses["2E 48 5C 82 30 3C 28 02"] = "AF Nikkor 70-210mm f/4-5.6D"; - lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 235 II (AF 20-35mm f/3.5-4.5)"; - lenses["2F 40 30 44 2C 34 29 02"] = "Tokina AF 193 (AF 19-35mm f/3.5-4.5)"; - lenses["2F 48 30 44 24 24 29 02"] = "AF Zoom-Nikkor 20-35mm f/2.8D IF"; - lenses["2F 48 30 44 24 24 29 02"] = "Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8)"; - lenses["30 48 98 98 24 24 24 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED"; - lenses["30 48 98 98 24 24 E1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E"; - lenses["30 48 98 98 24 24 F1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E"; - lenses["30 48 98 98 24 24 F2 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E"; - lenses["31 54 56 56 24 24 25 02"] = "AF Micro-Nikkor 60mm f/2.8D"; - lenses["32 53 64 64 24 24 35 02"] = "Tamron SP AF 90mm f/2.8 [Di] Macro 1:1 (172E/272E)"; - lenses["32 54 50 50 24 24 35 02"] = "Sigma Macro 50mm f/2.8 EX DG"; - lenses["32 54 6A 6A 24 24 35 02"] = "AF Micro-Nikkor 105mm f/2.8D"; - lenses["32 54 6A 6A 24 24 35 02"] = "Sigma Macro 105mm f/2.8 EX DG"; - lenses["33 48 2D 2D 24 24 31 02"] = "AF Nikkor 18mm f/2.8D"; - lenses["33 54 3C 5E 24 24 62 02"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09)"; - lenses["34 48 29 29 24 24 32 02"] = "AF Fisheye Nikkor 16mm f/2.8D"; - lenses["35 3C A0 A0 30 30 33 02"] = "AF-I Nikkor 500mm f/4D IF-ED"; - lenses["35 3C A0 A0 30 30 E1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-17E"; - lenses["35 3C A0 A0 30 30 F1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-14E"; - lenses["35 3C A0 A0 30 30 F2 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-20E"; - lenses["36 48 37 37 24 24 34 02"] = "AF Nikkor 24mm f/2.8D"; - lenses["37 48 30 30 24 24 36 02"] = "AF Nikkor 20mm f/2.8D"; - lenses["38 4C 62 62 14 14 37 02"] = "AF Nikkor 85mm f/1.8D"; - lenses["3A 40 3C 5C 2C 34 39 02"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"; - lenses["3B 48 44 5C 24 24 3A 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D N"; - lenses["3C 48 60 80 24 24 3B 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; - lenses["3D 3C 44 60 30 3C 3E 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D"; - lenses["3E 48 3C 3C 24 24 3D 02"] = "AF Nikkor 28mm f/2.8D"; - lenses["3F 40 44 6A 2C 34 45 02"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5D"; - lenses["41 48 7C 7C 24 24 43 02"] = "AF Nikkor 180mm f/2.8D IF-ED"; - lenses["42 54 44 44 18 18 44 02"] = "AF Nikkor 35mm f/2D"; - lenses["43 54 50 50 0C 0C 46 02"] = "AF Nikkor 50mm f/1.4D"; - lenses["44 44 60 80 34 3C 47 02"] = "AF Zoom-Nikkor 80-200mm f/4.5-5.6D"; - lenses["45 3D 3C 60 2C 3C 48 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"; - lenses["45 40 3C 60 2C 3C 48 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"; - lenses["45 41 37 72 2C 3C 48 02"] = "Tamron SP AF 24-135mm f/3.5-5.6 AD Aspherical (IF) Macro (190D)"; - lenses["46 3C 44 60 30 3C 49 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D N"; - lenses["47 42 37 50 2A 34 4A 02"] = "AF Zoom-Nikkor 24-50mm f/3.3-4.5D"; - lenses["48 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"; - lenses["48 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; - lenses["48 3C 50 A0 30 40 4B 02"] = "Sigma 50-500mm f/4-6.3 EX APO RF HSM"; - lenses["48 3C 8E B0 3C 3C 4B 02"] = "Sigma APO 300-800mm f/5.6 EX DG HSM"; - lenses["48 3C B0 B0 3C 3C 4B 02"] = "Sigma APO 800mm f/5.6 EX HSM"; - lenses["48 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX HSM"; - lenses["48 48 24 24 24 24 4B 02"] = "Sigma 14mm f/2.8 EX Aspherical HSM"; - lenses["48 48 2B 44 24 30 4B 06"] = "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM"; - lenses["48 48 68 8E 30 30 4B 02"] = "Sigma APO 100-300mm f/4 EX IF HSM"; - lenses["48 48 76 76 24 24 4B 06"] = "Sigma APO Macro 150mm f/2.8 EX DG HSM"; - lenses["48 48 8E 8E 24 24 4B 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED"; - lenses["48 48 8E 8E 24 24 E1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-17E"; - lenses["48 48 8E 8E 24 24 F1 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E"; - lenses["48 48 8E 8E 24 24 F2 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E"; - lenses["48 4C 7C 7C 2C 2C 4B 02"] = "Sigma APO Macro 180mm f/3.5 EX DG HSM"; - lenses["48 4C 7D 7D 2C 2C 4B 02"] = "Sigma APO Macro 180mm f/3.5 EX DG HSM"; - lenses["48 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM"; - lenses["48 54 5C 80 24 24 4B 02"] = "Sigma 70-200mm f/2.8 EX APO IF HSM"; - lenses["48 54 6F 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; - lenses["48 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM"; - lenses["49 3C A6 A6 30 30 4C 02"] = "AF-S Nikkor 600mm f/4D IF-ED"; - lenses["49 3C A6 A6 30 30 E1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-17E"; - lenses["49 3C A6 A6 30 30 F1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-14E"; - lenses["49 3C A6 A6 30 30 F2 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-20E"; - lenses["4A 40 11 11 2C 0C 4D 02"] = "Samyang 8mm f/3.5 Fish-Eye CS"; - lenses["4A 48 1E 1E 24 0C 4D 02"] = "Samyang 12mm f/2.8 ED AS NCS Fish-Eye"; - lenses["4A 48 24 24 24 0C 4D 02"] = "Samyang AE 14mm f/2.8 ED AS IF UMC"; - lenses["4A 54 29 29 18 0C 4D 02"] = "Samyang 16mm f/2.0 ED AS UMC CS"; - lenses["4A 54 62 62 0C 0C 4D 02"] = "AF Nikkor 85mm f/1.4D IF"; - lenses["4A 60 44 44 0C 0C 4D 02"] = "Samyang 35mm f/1.4 AS UMC"; - lenses["4A 60 62 62 0C 0C 4D 02"] = "Samyang AE 85mm f/1.4 AS IF UMC"; - lenses["4B 3C A0 A0 30 30 4E 02"] = "AF-S Nikkor 500mm f/4D IF-ED"; - lenses["4B 3C A0 A0 30 30 E1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-17E"; - lenses["4B 3C A0 A0 30 30 F1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-14E"; - lenses["4B 3C A0 A0 30 30 F2 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-20E"; - lenses["4C 40 37 6E 2C 3C 4F 02"] = "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF"; - lenses["4D 3E 3C 80 2E 3C 62 02"] = "Tamron AF 28-200mm f/3.8-5.6 XR Aspherical (IF) Macro (A03N)"; - lenses["4D 40 3C 80 2C 3C 62 02"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6D IF"; - lenses["4D 41 3C 8E 2B 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)"; - lenses["4D 41 3C 8E 2C 40 62 02"] = "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)"; - lenses["4E 48 72 72 18 18 51 02"] = "AF DC-Nikkor 135mm f/2D"; - lenses["4F 40 37 5C 2C 3C 53 06"] = "IX-Nikkor 24-70mm f/3.5-5.6"; - lenses["50 48 56 7C 30 3C 54 06"] = "IX-Nikkor 60-180mm f/4-5.6"; - lenses["52 54 44 44 18 18 00 00"] = "Zeiss Milvus 35mm f/2"; - lenses["53 48 60 80 24 24 57 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; - lenses["53 48 60 80 24 24 60 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; - lenses["53 54 50 50 0C 0C 00 00"] = "Zeiss Milvus 50mm f/1.4"; - lenses["54 44 5C 7C 34 3C 58 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"; - lenses["54 44 5C 7C 34 3C 61 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"; - lenses["54 54 50 50 18 18 00 00"] = "Zeiss Milvus 50mm f/2 Macro"; - lenses["55 54 62 62 0C 0C 00 00"] = "Zeiss Milvus 85mm f/1.4"; - lenses["56 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 APO Macro Super II"; - lenses["56 48 5C 8E 30 3C 5A 02"] = "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"; - lenses["56 54 68 68 18 18 00 00"] = "Zeiss Milvus 100mm f/2 Macro"; - lenses["59 48 98 98 24 24 5D 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED"; - lenses["59 48 98 98 24 24 E1 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-17E"; - lenses["59 48 98 98 24 24 F1 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-14E"; - lenses["59 48 98 98 24 24 F2 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-20E"; - lenses["5A 3C 3E 56 30 3C 5E 06"] = "IX-Nikkor 30-60mm f/4-5.6"; - lenses["5B 44 56 7C 34 3C 5F 06"] = "IX-Nikkor 60-180mm f/4.5-5.6"; - lenses["5D 48 3C 5C 24 24 63 02"] = "AF-S Zoom-Nikkor 28-70mm f/2.8D IF-ED"; - lenses["5E 48 60 80 24 24 64 02"] = "AF-S Zoom-Nikkor 80-200mm f/2.8D IF-ED"; - lenses["5F 40 3C 6A 2C 34 65 02"] = "AF Zoom-Nikkor 28-105mm f/3.5-4.5D IF"; - lenses["60 40 3C 60 2C 3C 66 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"; - lenses["61 44 5E 86 34 3C 67 02"] = "AF Zoom-Nikkor 75-240mm f/4.5-5.6D"; - lenses["63 48 2B 44 24 24 68 02"] = "AF-S Nikkor 17-35mm f/2.8D IF-ED"; - lenses["64 00 62 62 24 24 6A 02"] = "PC Micro-Nikkor 85mm f/2.8D"; - lenses["65 44 60 98 34 3C 6B 0A"] = "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED"; - lenses["66 40 2D 44 2C 34 6C 02"] = "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED"; - lenses["67 48 37 62 24 30 6D 02"] = "AF Zoom-Nikkor 24-85mm f/2.8-4D IF"; - lenses["67 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; - lenses["68 42 3C 60 2A 3C 6E 06"] = "AF Zoom-Nikkor 28-80mm f/3.3-5.6G"; - lenses["69 47 5C 8E 30 3C 00 02"] = "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17N)"; - lenses["69 48 5C 8E 30 3C 6F 02"] = "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2 (572D/772D)"; - lenses["69 48 5C 8E 30 3C 6F 06"] = "AF Zoom-Nikkor 70-300mm f/4-5.6G"; - lenses["6A 48 8E 8E 30 30 70 02"] = "AF-S Nikkor 300mm f/4D IF-ED"; - lenses["6B 48 24 24 24 24 71 02"] = "AF Nikkor ED 14mm f/2.8D"; - lenses["6D 48 8E 8E 24 24 73 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED II"; - lenses["6E 48 98 98 24 24 74 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED II"; - lenses["6F 3C A0 A0 30 30 75 02"] = "AF-S Nikkor 500mm f/4D IF-ED II"; - lenses["70 3C A6 A6 30 30 76 02"] = "AF-S Nikkor 600mm f/4D IF-ED II"; - lenses["72 48 4C 4C 24 24 77 00"] = "Nikkor 45mm f/2.8 P"; - lenses["74 40 37 62 2C 34 78 06"] = "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"; - lenses["75 40 3C 68 2C 3C 79 06"] = "AF Zoom-Nikkor 28-100mm f/3.5-5.6G"; - lenses["76 58 50 50 14 14 7A 02"] = "AF Nikkor 50mm f/1.8D"; - lenses["77 44 61 98 34 3C 7B 0E"] = "Sigma 80-400mm f/4.5-5.6 EX OS"; - lenses["77 48 5C 80 24 24 7B 0E"] = "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"; - lenses["78 40 37 6E 2C 3C 7C 0E"] = "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED"; - lenses["79 40 11 11 2C 2C 1C 06"] = "Sigma 8mm f/3.5 EX Circular Fisheye"; - lenses["79 40 3C 80 2C 3C 7F 06"] = "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED"; - lenses["79 48 3C 5C 24 24 1C 06"] = "Sigma 28-70mm f/2.8 EX DG"; - lenses["79 48 5C 5C 24 24 1C 06"] = "Sigma Macro 70mm f/2.8 EX DG"; - lenses["7A 3B 53 80 30 3C 4B 06"] = "Sigma 55-200mm f/4-5.6 DC HSM"; - lenses["7A 3C 1F 37 30 30 7E 06"] = "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"; - lenses["7A 3C 1F 37 30 30 7E 06"] = "Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)"; - lenses["7A 3C 1F 3C 30 30 7E 06"] = "Tokina AT-X 12-28 PRO DX (AF 12-28mm f/4)"; - lenses["7A 40 2D 50 2C 3C 4B 06"] = "Sigma 18-50mm f/3.5-5.6 DC HSM"; - lenses["7A 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM"; - lenses["7A 47 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"; - lenses["7A 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM"; - lenses["7A 48 1C 29 24 24 7E 06"] = "Tokina AT-X 116 PRO DX II (AF 11-16mm f/2.8)"; - lenses["7A 48 1C 30 24 24 7E 06"] = "Tokina AT-X 11-20 f/2.8 PRO DX (AF 11-20mm f/2.8)"; - lenses["7A 48 2B 5C 24 34 4B 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"; - lenses["7A 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro"; - lenses["7A 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"; - lenses["7A 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; - lenses["7B 48 80 98 30 30 80 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"; - lenses["7D 48 2B 53 24 24 82 06"] = "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"; - lenses["7F 40 2D 5C 2C 34 84 06"] = "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED"; - lenses["7F 48 2B 5C 24 34 1C 06"] = "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF"; - lenses["7F 48 2D 50 24 24 1C 06"] = "Sigma 18-50mm f/2.8 EX DC Macro"; - lenses["80 48 1A 1A 24 24 85 06"] = "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED"; - lenses["81 34 76 A6 38 40 4B 0E"] = "Sigma 150-600mm f/5-6.3 DG OS HSM | S"; - lenses["81 54 80 80 18 18 86 0E"] = "AF-S VR Nikkor 200mm f/2G IF-ED"; - lenses["82 34 76 A6 38 40 4B 0E"] = "Sigma 150-600mm f/5-6.3 DG OS HSM | C"; - lenses["82 48 8E 8E 24 24 87 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED"; - lenses["83 00 B0 B0 5A 5A 88 04"] = "FSA-L2, EDG 65, 800mm f/13 G"; - lenses["88 54 50 50 0C 0C 4B 06"] = "Sigma 50mm f/1.4 DG HSM | A"; - lenses["89 3C 53 80 30 3C 8B 06"] = "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"; - lenses["8A 3C 37 6A 30 30 4B 0E"] = "Sigma 24-105mm f/4 DG OS HSM"; - lenses["8A 54 6A 6A 24 24 8C 0E"] = "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"; - lenses["8B 40 2D 80 2C 3C 8D 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"; - lenses["8B 40 2D 80 2C 3C FD 0E"] = "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED [II]"; - lenses["8B 4C 2D 44 14 14 4B 06"] = "Sigma 18-35mm f/1.8 DC HSM"; - lenses["8C 40 2D 53 2C 3C 8E 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED"; - lenses["8D 44 5C 8E 34 3C 8F 0E"] = "AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED"; - lenses["8E 3C 2B 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM | C"; - lenses["8F 40 2D 72 2C 3C 91 06"] = "AF-S DX Zoom-Nikkor 18-135mm f/3.5-5.6G IF-ED"; - lenses["8F 48 2B 50 24 24 4B 0E"] = "Sigma 17-50mm f/2.8 EX DC OS HSM"; - lenses["90 3B 53 80 30 3C 92 0E"] = "AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED"; - lenses["90 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 II DC OS HSM"; - lenses["91 54 44 44 0C 0C 4B 06"] = "Sigma 35mm f/1.4 DG HSM"; - lenses["92 2C 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM"; - lenses["92 48 24 37 24 24 94 06"] = "AF-S Zoom-Nikkor 14-24mm f/2.8G ED"; - lenses["93 48 37 5C 24 24 95 06"] = "AF-S Zoom-Nikkor 24-70mm f/2.8G ED"; - lenses["94 40 2D 53 2C 3C 96 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED II"; - lenses["95 00 37 37 2C 2C 97 06"] = "PC-E Nikkor 24mm f/3.5D ED"; - lenses["95 4C 37 37 2C 2C 97 02"] = "PC-E Nikkor 24mm f/3.5D ED"; - lenses["96 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 II DG HSM"; - lenses["96 48 98 98 24 24 98 0E"] = "AF-S VR Nikkor 400mm f/2.8G ED"; - lenses["97 3C A0 A0 30 30 99 0E"] = "AF-S VR Nikkor 500mm f/4G ED"; - lenses["97 48 6A 6A 24 24 4B 0E"] = "Sigma Macro 105mm f/2.8 EX DG OS HSM"; - lenses["98 3C A6 A6 30 30 9A 0E"] = "AF-S VR Nikkor 600mm f/4G ED"; - lenses["98 48 50 76 24 24 4B 0E"] = "Sigma 50-150mm f/2.8 EX APO DC OS HSM"; - lenses["99 40 29 62 2C 3C 9B 0E"] = "AF-S DX VR Zoom-Nikkor 16-85mm f/3.5-5.6G ED"; - lenses["99 48 76 76 24 24 4B 0E"] = "Sigma APO Macro 150mm f/2.8 EX DG OS HSM"; - lenses["9A 40 2D 53 2C 3C 9C 0E"] = "AF-S DX VR Zoom-Nikkor 18-55mm f/3.5-5.6G"; - lenses["9B 00 4C 4C 24 24 9D 06"] = "PC-E Micro Nikkor 45mm f/2.8D ED"; - lenses["9B 54 4C 4C 24 24 9D 02"] = "PC-E Micro Nikkor 45mm f/2.8D ED"; - lenses["9B 54 62 62 0C 0C 4B 06"] = "Sigma 85mm f/1.4 EX DG HSM"; - lenses["9C 48 5C 80 24 24 4B 0E"] = "Sigma 70-200mm f/2.8 EX DG OS HSM"; - lenses["9C 54 56 56 24 24 9E 06"] = "AF-S Micro Nikkor 60mm f/2.8G ED"; - lenses["9D 00 62 62 24 24 9F 06"] = "PC-E Micro Nikkor 85mm f/2.8D"; - lenses["9D 48 2B 50 24 24 4B 0E"] = "Sigma 17-50mm f/2.8 EX DC OS HSM"; - lenses["9D 54 62 62 24 24 9F 02"] = "PC-E Micro Nikkor 85mm f/2.8D"; - lenses["9E 38 11 29 34 3C 4B 06"] = "Sigma 8-16mm f/4.5-5.6 DC HSM"; - lenses["9E 40 2D 6A 2C 3C A0 0E"] = "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"; - lenses["9F 37 50 A0 34 40 4B 0E"] = "Sigma 50-500mm f/4.5-6.3 DG OS HSM"; - lenses["9F 58 44 44 14 14 A1 06"] = "AF-S DX Nikkor 35mm f/1.8G"; - lenses["A0 40 2D 74 2C 3C BB 0E"] = "AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR"; - lenses["A0 48 2A 5C 24 30 4B 0E"] = "Sigma 17-70mm f/2.8-4 DC Macro OS HSM"; - lenses["A0 54 50 50 0C 0C A2 06"] = "AF-S Nikkor 50mm f/1.4G"; - lenses["A1 40 18 37 2C 34 A3 06"] = "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED"; - lenses["A1 41 19 31 2C 2C 4B 06"] = "Sigma 10-20mm f/3.5 EX DC HSM"; - lenses["A1 54 55 55 0C 0C BC 06"] = "AF-S Nikkor 58mm f/1.4G"; - lenses["A2 40 2D 53 2C 3C BD 0E"] = "AF-S DX Nikkor 18-55mm f/3.5-5.6G VR II"; - lenses["A2 48 5C 80 24 24 A4 0E"] = "AF-S Nikkor 70-200mm f/2.8G ED VR II"; - lenses["A3 3C 29 44 30 30 A5 0E"] = "AF-S Nikkor 16-35mm f/4G ED VR"; - lenses["A3 3C 5C 8E 30 3C 4B 0E"] = "Sigma 70-300mm f/4-5.6 DG OS"; - lenses["A4 40 2D 8E 2C 40 BF 0E"] = "AF-S DX Nikkor 18-300mm f/3.5-6.3G ED VR"; - lenses["A4 47 2D 50 24 34 4B 0E"] = "Sigma 18-50mm f/2.8-4.5 DC OS HSM"; - lenses["A4 54 37 37 0C 0C A6 06"] = "AF-S Nikkor 24mm f/1.4G ED"; - lenses["A5 40 2D 88 2C 40 4B 0E"] = "Sigma 18-250mm f/3.5-6.3 DC OS HSM"; - lenses["A5 40 3C 8E 2C 3C A7 0E"] = "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR"; - lenses["A5 4C 44 44 14 14 C0 06"] = "AF-S Nikkor 35mm f/1.8G ED"; - lenses["A6 48 37 5C 24 24 4B 06"] = "Sigma 24-70mm f/2.8 IF EX DG HSM"; - lenses["A6 48 8E 8E 24 24 A8 0E"] = "AF-S VR Nikkor 300mm f/2.8G IF-ED II"; - lenses["A6 48 98 98 24 24 C1 0E"] = "AF-S Nikkor 400mm f/2.8E FL ED VR"; - lenses["A7 3C 53 80 30 3C C2 0E"] = "AF-S DX Nikkor 55-200mm f/4-5.6G ED VR II"; - lenses["A7 49 80 A0 24 24 4B 06"] = "Sigma APO 200-500mm f/2.8 EX DG"; - lenses["A7 4B 62 62 2C 2C A9 0E"] = "AF-S DX Micro Nikkor 85mm f/3.5G ED VR"; - lenses["A8 48 80 98 30 30 AA 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II"; - lenses["A8 48 8E 8E 30 30 C3 0E"] = "AF-S Nikkor 300mm f/4E PF ED VR"; - lenses["A8 48 8E 8E 30 30 C3 4E"] = "AF-S Nikkor 300mm f/4E PF ED VR"; - lenses["A9 4C 31 31 14 14 C4 06"] = "AF-S Nikkor 20mm f/1.8G ED"; - lenses["A9 54 80 80 18 18 AB 0E"] = "AF-S Nikkor 200mm f/2G ED VR II"; - lenses["AA 3C 37 6E 30 30 AC 0E"] = "AF-S Nikkor 24-120mm f/4G ED VR"; - lenses["AA 48 37 5C 24 24 C5 4E"] = "AF-S Nikkor 24-70mm f/2.8E ED VR"; - lenses["AB 3C A0 A0 30 30 C6 4E"] = "AF-S Nikkor 500mm f/4E FL ED VR"; - lenses["AC 38 53 8E 34 3C AE 0E"] = "AF-S DX VR Nikkor 55-300mm f/4.5-5.6G ED"; - lenses["AC 3C A6 A6 30 30 C7 4E"] = "AF-S Nikkor 600mm f/4E FL ED VR"; - lenses["AD 3C 2D 8E 2C 3C AF 0E"] = "AF-S DX Nikkor 18-300mm f/3.5-5.6G ED VR"; - lenses["AD 48 28 60 24 30 C8 0E"] = "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"; - lenses["AD 48 28 60 24 30 C8 4E"] = "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"; - lenses["AE 3C 80 A0 3C 3C C9 0E"] = "AF-S Nikkor 200-500mm f/5.6E ED VR"; - lenses["AE 3C 80 A0 3C 3C C9 4E"] = "AF-S Nikkor 200-500mm f/5.6E ED VR"; - lenses["AE 54 62 62 0C 0C B0 06"] = "AF-S Nikkor 85mm f/1.4G"; - lenses["AF 4C 37 37 14 14 CC 06"] = "AF-S Nikkor 24mm f/1.8G ED"; - lenses["AF 54 44 44 0C 0C B1 06"] = "AF-S Nikkor 35mm f/1.4G"; - lenses["B0 4C 50 50 14 14 B2 06"] = "AF-S Nikkor 50mm f/1.8G"; - lenses["B1 48 48 48 24 24 B3 06"] = "AF-S DX Micro Nikkor 40mm f/2.8G"; - lenses["B2 48 5C 80 30 30 B4 0E"] = "AF-S Nikkor 70-200mm f/4G ED VR"; - lenses["B3 4C 62 62 14 14 B5 06"] = "AF-S Nikkor 85mm f/1.8G"; - lenses["B4 40 37 62 2C 34 B6 0E"] = "AF-S VR Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"; - lenses["B5 4C 3C 3C 14 14 B7 06"] = "AF-S Nikkor 28mm f/1.8G"; - lenses["B6 3C B0 B0 3C 3C B8 0E"] = "AF-S VR Nikkor 800mm f/5.6E FL ED"; - lenses["B6 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG"; - lenses["B7 44 60 98 34 3C B9 0E"] = "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR"; - lenses["B8 40 2D 44 2C 34 BA 06"] = "AF-S Nikkor 18-35mm f/3.5-4.5G ED"; - lenses["CC 4C 50 68 14 14 4B 06"] = "Sigma 50-100mm f/1.8 DC HSM | A"; - lenses["CD 3D 2D 70 2E 3C 4B 0E"] = "Sigma 18-125mm f/3.8-5.6 DC OS HSM"; - lenses["CE 34 76 A0 38 40 4B 0E"] = "Sigma 150-500mm f/5-6.3 DG OS APO HSM"; - lenses["CF 38 6E 98 34 3C 4B 0E"] = "Sigma APO 120-400mm f/4.5-5.6 DG OS HSM"; - lenses["DC 48 19 19 24 24 4B 06"] = "Sigma 10mm f/2.8 EX DC HSM Fisheye"; - lenses["DE 54 50 50 0C 0C 4B 06"] = "Sigma 50mm f/1.4 EX DG HSM"; - lenses["E0 3C 5C 8E 30 3C 4B 06"] = "Sigma 70-300mm f/4-5.6 APO DG Macro HSM"; - lenses["E1 58 37 37 14 14 1C 02"] = "Sigma 24mm f/1.8 EX DG Aspherical Macro"; - lenses["E3 54 50 50 24 24 35 02"] = "Sigma Macro 50mm f/2.8 EX DG"; - lenses["E5 54 6A 6A 24 24 35 02"] = "Sigma Macro 105mm f/2.8 EX DG"; - lenses["E6 41 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 DG Macro"; - lenses["E8 4C 44 44 14 14 DF 0E"] = "Tamron SP 35mm f/1.8 VC"; - lenses["E9 48 27 3E 24 24 DF 0E"] = "Tamron SP 15-30mm f/2.8 Di VC USD (A012)"; - lenses["E9 54 37 5C 24 24 1C 02"] = "Sigma 24-70mm f/2.8 EX DG Macro"; - lenses["EA 40 29 8E 2C 40 DF 0E"] = "Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)"; - lenses["EA 48 27 27 24 24 1C 02"] = "Sigma 15mm f/2.8 EX Diagonal Fisheye"; - lenses["EB 40 76 A6 38 40 DF 0E"] = "Tamron SP AF 150-600mm f/5-6.3 VC USD (A011)"; - lenses["ED 40 2D 80 2C 40 4B 0E"] = "Sigma 18-200mm f/3.5-6.3 DC OS HSM"; - lenses["EE 48 5C 80 24 24 4B 06"] = "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"; - lenses["F0 38 1F 37 34 3C 4B 06"] = "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"; - lenses["F0 3F 2D 8A 2C 40 DF 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)"; - lenses["F1 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX DG HSM"; - lenses["F1 47 5C 8E 30 3C DF 0E"] = "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"; - lenses["F3 48 68 8E 30 30 4B 02"] = "Sigma APO 100-300mm f/4 EX IF HSM"; - lenses["F3 54 2B 50 24 24 84 0E"] = "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF) (B005)"; - lenses["F4 54 56 56 18 18 84 06"] = "Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)"; - lenses["F5 40 2C 8A 2C 40 40 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Macro (B003)"; - lenses["F5 48 76 76 24 24 4B 06"] = "Sigma APO Macro 150mm f/2.8 EX DG HSM"; - lenses["F6 3F 18 37 2C 34 84 06"] = "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"; - lenses["F6 3F 18 37 2C 34 DF 06"] = "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"; - lenses["F6 48 2D 50 24 24 4B 06"] = "Sigma 18-50mm f/2.8 EX DC Macro"; - lenses["F7 53 5C 80 24 24 40 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; - lenses["F7 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; - lenses["F8 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM"; - lenses["F8 54 64 64 24 24 DF 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; - lenses["F8 55 64 64 24 24 84 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; - lenses["F9 3C 19 31 30 3C 4B 06"] = "Sigma 10-20mm f/4-5.6 EX DC HSM"; - lenses["F9 40 3C 8E 2C 40 40 0E"] = "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical (IF) Macro (A20)"; - lenses["FA 54 3C 5E 24 24 84 06"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"; - lenses["FA 54 3C 5E 24 24 DF 06"] = "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"; - lenses["FA 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; - lenses["FB 54 2B 50 24 24 84 06"] = "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"; - lenses["FB 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM"; - lenses["FC 40 2D 80 2C 40 DF 06"] = "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)"; - lenses["FD 47 50 76 24 24 4B 06"] = "Sigma 50-150mm f/2.8 EX APO DC HSM II"; - lenses["FE 47 00 00 24 24 4B 06"] = "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"; - lenses["FE 48 37 5C 24 24 DF 0E"] = "Tamron SP 24-70mm f/2.8 Di VC USD (A007)"; - lenses["FE 53 5C 80 24 24 84 06"] = "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"; - lenses["FE 54 5C 80 24 24 DF 0E"] = "Tamron SP 70-200mm f/2.8 Di VC USD (A009)"; - lenses["FE 54 64 64 24 24 DF 0E"] = "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 (F004)"; - lenses["FF 40 2D 80 2C 40 4B 06"] = "Sigma 18-200mm f/3.5-6.3 DC"; - } virtual std::string toString (Tag* t) { @@ -1066,7 +549,7 @@ public: lid << std::setw(2) << std::setfill('0') << lenstype; - std::map::iterator r = lenses.find (lid.str()); + std::map::const_iterator r = lenses.find (lid.str()); if (r != lenses.end()) { if(r == lenses.begin() && EffectiveMaxApertureString != "") { // first entry is for unchipped lenses @@ -1083,6 +566,523 @@ public: }; NALensDataInterpreter naLensDataInterpreter; +const std::map NALensDataInterpreter::lenses = { + // The key is a composite string made of 8 HEX bytes + // LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType + {"00 00 00 00 00 00 00 01", "Manual Lens No CPU"}, + {"00 00 00 00 00 00 E1 12", "TC-17E II"}, + {"00 00 00 00 00 00 F1 0C", "TC-14E [II] or Sigma APO Tele Converter 1.4x EX DG or Kenko Teleplus PRO 300 DG 1.4x"}, + {"00 00 00 00 00 00 F2 18", "TC-20E [II] or Sigma APO Tele Converter 2x EX DG or Kenko Teleplus PRO 300 DG 2.0x"}, + {"00 00 48 48 53 53 00 01", "Loreo 40mm f/11-22 3D Lens in a Cap 9005"}, + {"00 36 1C 2D 34 3C 00 06", "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF) (A13)"}, + {"00 3C 1F 37 30 30 00 06", "Tokina AT-X 124 AF PRO DX (AF 12-24mm f/4)"}, + {"00 3C 2B 44 30 30 00 06", "Tokina AT-X 17-35 f/4 PRO FX (AF 17-35mm f/4)"}, + {"00 3C 5C 80 30 30 00 0E", "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm f/4)"}, + {"00 3E 80 A0 38 3F 00 02", "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF) (A08)"}, + {"00 3F 2D 80 2B 40 00 06", "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) (A14)"}, + {"00 3F 2D 80 2C 40 00 06", "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14)"}, + {"00 3F 80 A0 38 3F 00 02", "Tamron SP AF 200-500mm f/5-6.3 Di (A08)"}, + {"00 40 11 11 2C 2C 00 00", "Samyang 8mm f/3.5 Fish-Eye"}, + {"00 40 18 2B 2C 34 00 06", "Tokina AT-X 107 AF DX Fisheye (AF 10-17mm f/3.5-4.5)"}, + {"00 40 2A 72 2C 3C 00 06", "Tokina AT-X 16.5-135 DX (AF 16.5-135mm f/3.5-5.6)"}, + {"00 40 2B 2B 2C 2C 00 02", "Tokina AT-X 17 AF PRO (AF 17mm f/3.5)"}, + {"00 40 2D 2D 2C 2C 00 00", "Carl Zeiss Distagon T* 3.5/18 ZF.2"}, + {"00 40 2D 80 2C 40 00 06", "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)"}, + {"00 40 2D 88 2C 40 00 06", "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18NII)"}, + {"00 40 2D 88 2C 40 62 06", "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18)"}, + {"00 40 31 31 2C 2C 00 00", "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical"}, + {"00 40 37 80 2C 3C 00 02", "Tokina AT-X 242 AF (AF 24-200mm f/3.5-5.6)"}, + {"00 40 64 64 2C 2C 00 00", "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus"}, + {"00 44 60 98 34 3C 00 02", "Tokina AT-X 840 D (AF 80-400mm f/4.5-5.6)"}, + {"00 47 10 10 24 24 00 00", "Fisheye Nikkor 8mm f/2.8 AiS"}, + {"00 47 25 25 24 24 00 02", "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)"}, + {"00 47 3C 3C 24 24 00 00", "Nikkor 28mm f/2.8 AiS"}, + {"00 47 44 44 24 24 00 06", "Tokina AT-X M35 PRO DX (AF 35mm f/2.8 Macro)"}, + {"00 47 53 80 30 3C 00 06", "Tamron AF 55-200mm f/4-5.6 Di II LD (A15)"}, + {"00 48 1C 29 24 24 00 06", "Tokina AT-X 116 PRO DX (AF 11-16mm f/2.8)"}, + {"00 48 29 3C 24 24 00 06", "Tokina AT-X 16-28 AF PRO FX (AF 16-28mm f/2.8)"}, + {"00 48 29 50 24 24 00 06", "Tokina AT-X 165 PRO DX (AF 16-50mm f/2.8)"}, + {"00 48 32 32 24 24 00 00", "Carl Zeiss Distagon T* 2.8/21 ZF.2"}, + {"00 48 37 5C 24 24 00 06", "Tokina AT-X 24-70 f/2.8 PRO FX (AF 24-70mm f/2.8)"}, + {"00 48 3C 3C 24 24 00 00", "Voigtlander Color Skopar 28mm f/2.8 SL II"}, + {"00 48 3C 60 24 24 00 02", "Tokina AT-X 280 AF PRO (AF 28-80mm f/2.8)"}, + {"00 48 3C 6A 24 24 00 02", "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF (176D)"}, + {"00 48 50 50 18 18 00 00", "Nikkor H 50mm f/2"}, + {"00 48 50 72 24 24 00 06", "Tokina AT-X 535 PRO DX (AF 50-135mm f/2.8)"}, + {"00 48 5C 80 30 30 00 0E", "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm f/4)"}, + {"00 48 5C 8E 30 3C 00 06", "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17NII)"}, + {"00 48 68 68 24 24 00 00", "Series E 100mm f/2.8"}, + {"00 48 80 80 30 30 00 00", "Nikkor 200mm f/4 AiS"}, + {"00 49 30 48 22 2B 00 02", "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"}, + {"00 4C 6A 6A 20 20 00 00", "Nikkor 105mm f/2.5 AiS"}, + {"00 4C 7C 7C 2C 2C 00 02", "Tamron SP AF 180mm f/3.5 Di Model (B01)"}, + {"00 53 2B 50 24 24 00 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16)"}, + {"00 54 2B 50 24 24 00 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"}, + {"00 54 3C 3C 18 18 00 00", "Carl Zeiss Distagon T* 2/28 ZF.2"}, + {"00 54 44 44 0C 0C 00 00", "Carl Zeiss Distagon T* 1.4/35 ZF.2"}, + {"00 54 44 44 18 18 00 00", "Carl Zeiss Distagon T* 2/35 ZF.2"}, + {"00 54 48 48 18 18 00 00", "Voigtlander Ultron 40mm f/2 SLII Aspherical"}, + {"00 54 50 50 0C 0C 00 00", "Carl Zeiss Planar T* 1.4/50 ZF.2"}, + {"00 54 50 50 18 18 00 00", "Carl Zeiss Makro-Planar T* 2/50 ZF.2"}, + {"00 54 53 53 0C 0C 00 00", "Zeiss Otus 1.4/55"}, + {"00 54 55 55 0C 0C 00 00", "Voigtlander Nokton 58mm f/1.4 SLII"}, + {"00 54 56 56 30 30 00 00", "Coastal Optical Systems 60mm 1:4 UV-VIS-IR Macro Apo"}, + {"00 54 62 62 0C 0C 00 00", "Carl Zeiss Planar T* 1.4/85 ZF.2"}, + {"00 54 68 68 18 18 00 00", "Carl Zeiss Makro-Planar T* 2/100 ZF.2"}, + {"00 54 68 68 24 24 00 02", "Tokina AT-X M100 AF PRO D (AF 100mm f/2.8 Macro)"}, + {"00 54 72 72 18 18 00 00", "Carl Zeiss Apo Sonnar T* 2/135 ZF.2"}, + {"00 54 8E 8E 24 24 00 02", "Tokina AT-X 300 AF PRO (AF 300mm f/2.8)"}, + {"00 57 50 50 14 14 00 00", "Nikkor 50mm f/1.8 AI"}, + {"00 58 64 64 20 20 00 00", "Soligor C/D Macro MC 90mm f/2.5"}, + {"01 00 00 00 00 00 02 00", "TC-16A"}, + {"01 00 00 00 00 00 08 00", "TC-16A"}, + {"01 54 62 62 0C 0C 00 00", "Zeiss Otus 1.4/85"}, + {"01 58 50 50 14 14 02 00", "AF Nikkor 50mm f/1.8"}, + {"01 58 50 50 14 14 05 00", "AF Nikkor 50mm f/1.8"}, + {"02 2F 98 98 3D 3D 02 00", "Sigma APO 400mm f/5.6"}, + {"02 34 A0 A0 44 44 02 00", "Sigma APO 500mm f/7.2"}, + {"02 37 5E 8E 35 3D 02 00", "Sigma 75-300mm f/4.5-5.6 APO"}, + {"02 37 A0 A0 34 34 02 00", "Sigma APO 500mm f/4.5"}, + {"02 3A 37 50 31 3D 02 00", "Sigma 24-50mm f/4-5.6 UC"}, + {"02 3A 5E 8E 32 3D 02 00", "Sigma 75-300mm f/4.0-5.6"}, + {"02 3B 44 61 30 3D 02 00", "Sigma 35-80mm f/4-5.6"}, + {"02 3C B0 B0 3C 3C 02 00", "Sigma APO 800mm f/5.6"}, + {"02 3F 24 24 2C 2C 02 00", "Sigma 14mm f/3.5"}, + {"02 3F 3C 5C 2D 35 02 00", "Sigma 28-70mm f/3.5-4.5 UC"}, + {"02 40 44 5C 2C 34 02 00", "Exakta AF 35-70mm 1:3.5-4.5 MC"}, + {"02 40 44 73 2B 36 02 00", "Sigma 35-135mm f/3.5-4.5 a"}, + {"02 40 5C 82 2C 35 02 00", "Sigma APO 70-210mm f/3.5-4.5"}, + {"02 42 44 5C 2A 34 02 00", "AF Zoom-Nikkor 35-70mm f/3.3-4.5"}, + {"02 42 44 5C 2A 34 08 00", "AF Zoom-Nikkor 35-70mm f/3.3-4.5"}, + {"02 46 37 37 25 25 02 00", "Sigma 24mm f/2.8 Super Wide II Macro"}, + {"02 46 3C 5C 25 25 02 00", "Sigma 28-70mm f/2.8"}, + {"02 46 5C 82 25 25 02 00", "Sigma 70-210mm f/2.8 APO"}, + {"02 48 50 50 24 24 02 00", "Sigma Macro 50mm f/2.8"}, + {"02 48 65 65 24 24 02 00", "Sigma Macro 90mm f/2.8"}, + {"03 43 5C 81 35 35 02 00", "Soligor AF C/D Zoom UMCS 70-210mm 1:4.5"}, + {"03 48 5C 81 30 30 02 00", "AF Zoom-Nikkor 70-210mm f/4"}, + {"04 48 3C 3C 24 24 03 00", "AF Nikkor 28mm f/2.8"}, + {"05 54 50 50 0C 0C 04 00", "AF Nikkor 50mm f/1.4"}, + {"06 3F 68 68 2C 2C 06 00", "Cosina AF 100mm f/3.5 Macro"}, + {"06 54 53 53 24 24 06 00", "AF Micro-Nikkor 55mm f/2.8"}, + {"07 36 3D 5F 2C 3C 03 00", "Cosina AF Zoom 28-80mm f/3.5-5.6 MC Macro"}, + {"07 3E 30 43 2D 35 03 00", "Soligor AF Zoom 19-35mm 1:3.5-4.5 MC"}, + {"07 40 2F 44 2C 34 03 02", "Tamron AF 19-35mm f/3.5-4.5 (A10)"}, + {"07 40 30 45 2D 35 03 02", "Tamron AF 19-35mm f/3.5-4.5 (A10)"}, + {"07 40 3C 5C 2C 35 03 00", "Tokina AF 270 II (AF 28-70mm f/3.5-4.5)"}, + {"07 40 3C 62 2C 34 03 00", "AF Zoom-Nikkor 28-85mm f/3.5-4.5"}, + {"07 46 2B 44 24 30 03 02", "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)"}, + {"07 46 3D 6A 25 2F 03 00", "Cosina AF Zoom 28-105mm f/2.8-3.8 MC"}, + {"07 47 3C 5C 25 35 03 00", "Tokina AF 287 SD (AF 28-70mm f/2.8-4.5)"}, + {"07 48 3C 5C 24 24 03 00", "Tokina AT-X 287 AF (AF 28-70mm f/2.8)"}, + {"08 40 44 6A 2C 34 04 00", "AF Zoom-Nikkor 35-105mm f/3.5-4.5"}, + {"09 48 37 37 24 24 04 00", "AF Nikkor 24mm f/2.8"}, + {"0A 48 8E 8E 24 24 03 00", "AF Nikkor 300mm f/2.8 IF-ED"}, + {"0A 48 8E 8E 24 24 05 00", "AF Nikkor 300mm f/2.8 IF-ED N"}, + {"0B 3E 3D 7F 2F 3D 0E 00", "Tamron AF 28-200mm f/3.8-5.6 (71D)"}, + {"0B 3E 3D 7F 2F 3D 0E 02", "Tamron AF 28-200mm f/3.8-5.6D (171D)"}, + {"0B 48 7C 7C 24 24 05 00", "AF Nikkor 180mm f/2.8 IF-ED"}, + {"0D 40 44 72 2C 34 07 00", "AF Zoom-Nikkor 35-135mm f/3.5-4.5"}, + {"0E 48 5C 81 30 30 05 00", "AF Zoom-Nikkor 70-210mm f/4"}, + {"0E 4A 31 48 23 2D 0E 02", "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"}, + {"0F 58 50 50 14 14 05 00", "AF Nikkor 50mm f/1.8 N"}, + {"10 3D 3C 60 2C 3C D2 02", "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"}, + {"10 48 8E 8E 30 30 08 00", "AF Nikkor 300mm f/4 IF-ED"}, + {"11 48 44 5C 24 24 08 00", "AF Zoom-Nikkor 35-70mm f/2.8"}, + {"12 36 5C 81 35 3D 09 00", "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro"}, + {"12 36 69 97 35 42 09 00", "Soligor AF Zoom 100-400mm 1:4.5-6.7 MC"}, + {"12 38 69 97 35 42 09 02", "Promaster Spectrum 7 100-400mm f/4.5-6.7"}, + {"12 39 5C 8E 34 3D 08 02", "Cosina AF Zoom 70-300mm f/4.5-5.6 MC Macro"}, + {"12 3B 68 8D 3D 43 09 02", "Cosina AF Zoom 100-300mm f/5.6-6.7 MC Macro"}, + {"12 3B 98 98 3D 3D 09 00", "Tokina AT-X 400 AF SD (AF 400mm f/5.6)"}, + {"12 3D 3C 80 2E 3C DF 02", "Tamron AF 28-200mm f/3.8-5.6 AF Aspherical LD (IF) (271D)"}, + {"12 44 5E 8E 34 3C 09 00", "Tokina AF 730 (AF 75-300mm f/4.5-5.6)"}, + {"12 48 5C 81 30 3C 09 00", "AF Nikkor 70-210mm f/4-5.6"}, + {"12 4A 5C 81 31 3D 09 00", "Soligor AF C/D Auto Zoom+Macro 70-210mm 1:4-5.6 UMCS"}, + {"13 42 37 50 2A 34 0B 00", "AF Zoom-Nikkor 24-50mm f/3.3-4.5"}, + {"14 48 60 80 24 24 0B 00", "AF Zoom-Nikkor 80-200mm f/2.8 ED"}, + {"14 48 68 8E 30 30 0B 00", "Tokina AT-X 340 AF (AF 100-300mm f/4)"}, + {"14 54 60 80 24 24 0B 00", "Tokina AT-X 828 AF (AF 80-200mm f/2.8)"}, + {"15 4C 62 62 14 14 0C 00", "AF Nikkor 85mm f/1.8"}, + {"17 3C A0 A0 30 30 0F 00", "Nikkor 500mm f/4 P ED IF"}, + {"17 3C A0 A0 30 30 11 00", "Nikkor 500mm f/4 P ED IF"}, + {"18 40 44 72 2C 34 0E 00", "AF Zoom-Nikkor 35-135mm f/3.5-4.5 N"}, + {"1A 54 44 44 18 18 11 00", "AF Nikkor 35mm f/2"}, + {"1B 44 5E 8E 34 3C 10 00", "AF Zoom-Nikkor 75-300mm f/4.5-5.6"}, + {"1C 48 30 30 24 24 12 00", "AF Nikkor 20mm f/2.8"}, + {"1D 42 44 5C 2A 34 12 00", "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N"}, + {"1E 54 56 56 24 24 13 00", "AF Micro-Nikkor 60mm f/2.8"}, + {"1E 5D 64 64 20 20 13 00", "Tamron SP AF 90mm f/2.5 (52E)"}, + {"1F 54 6A 6A 24 24 14 00", "AF Micro-Nikkor 105mm f/2.8"}, + {"20 3C 80 98 3D 3D 1E 02", "Tamron AF 200-400mm f/5.6 LD IF (75D)"}, + {"20 48 60 80 24 24 15 00", "AF Zoom-Nikkor 80-200mm f/2.8 ED"}, + {"20 5A 64 64 20 20 14 00", "Tamron SP AF 90mm f/2.5 Macro (152E)"}, + {"21 40 3C 5C 2C 34 16 00", "AF Zoom-Nikkor 28-70mm f/3.5-4.5"}, + {"21 56 8E 8E 24 24 14 00", "Tamron SP AF 300mm f/2.8 LD-IF (60E)"}, + {"22 48 72 72 18 18 16 00", "AF DC-Nikkor 135mm f/2"}, + {"22 53 64 64 24 24 E0 02", "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)"}, + {"23 30 BE CA 3C 48 17 00", "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF"}, + {"24 44 60 98 34 3C 1A 02", "Tokina AT-X 840 AF-II (AF 80-400mm f/4.5-5.6)"}, + {"24 48 60 80 24 24 1A 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"24 54 60 80 24 24 1A 02", "Tokina AT-X 828 AF PRO (AF 80-200mm f/2.8)"}, + {"25 44 44 8E 34 42 1B 02", "Tokina AF 353 (AF 35-300mm f/4.5-6.7)"}, + {"25 48 3C 5C 24 24 1B 02", "Tokina AT-X 270 AF PRO II (AF 28-70mm f/2.6-2.8)"}, + {"25 48 3C 5C 24 24 1B 02", "Tokina AT-X 287 AF PRO SV (AF 28-70mm f/2.8)"}, + {"25 48 44 5C 24 24 1B 02", "AF Zoom-Nikkor 35-70mm f/2.8D"}, + {"25 48 44 5C 24 24 3A 02", "AF Zoom-Nikkor 35-70mm f/2.8D"}, + {"25 48 44 5C 24 24 52 02", "AF Zoom-Nikkor 35-70mm f/2.8D"}, + {"26 3C 54 80 30 3C 1C 06", "Sigma 55-200mm f/4-5.6 DC"}, + {"26 3C 5C 82 30 3C 1C 02", "Sigma 70-210mm f/4-5.6 UC-II"}, + {"26 3C 5C 8E 30 3C 1C 02", "Sigma 70-300mm f/4-5.6 DG Macro"}, + {"26 3C 98 98 3C 3C 1C 02", "Sigma APO Tele Macro 400mm f/5.6"}, + {"26 3D 3C 80 2F 3D 1C 02", "Sigma 28-300mm f/3.8-5.6 Aspherical"}, + {"26 3E 3C 6A 2E 3C 1C 02", "Sigma 28-105mm f/3.8-5.6 UC-III Aspherical IF"}, + {"26 40 27 3F 2C 34 1C 02", "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical DF"}, + {"26 40 2D 44 2B 34 1C 02", "Sigma 18-35mm f/3.5-4.5 Aspherical"}, + {"26 40 2D 50 2C 3C 1C 06", "Sigma 18-50mm f/3.5-5.6 DC"}, + {"26 40 2D 70 2B 3C 1C 06", "Sigma 18-125mm f/3.5-5.6 DC"}, + {"26 40 2D 80 2C 40 1C 06", "Sigma 18-200mm f/3.5-6.3 DC"}, + {"26 40 37 5C 2C 3C 1C 02", "Sigma 24-70mm f/3.5-5.6 Aspherical HF"}, + {"26 40 3C 5C 2C 34 1C 02", "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"}, + {"26 40 3C 60 2C 3C 1C 02", "Sigma 28-80mm f/3.5-5.6 Mini Zoom Macro II Aspherical"}, + {"26 40 3C 65 2C 3C 1C 02", "Sigma 28-90mm f/3.5-5.6 Macro"}, + {"26 40 3C 80 2B 3C 1C 02", "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"}, + {"26 40 3C 80 2C 3C 1C 02", "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"}, + {"26 40 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 Macro"}, + {"26 40 7B A0 34 40 1C 02", "Sigma APO 170-500mm f/5-6.3 Aspherical RF"}, + {"26 41 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 DG Macro"}, + {"26 44 73 98 34 3C 1C 02", "Sigma 135-400mm f/4.5-5.6 APO Aspherical"}, + {"26 48 11 11 30 30 1C 02", "Sigma 8mm f/4 EX Circular Fisheye"}, + {"26 48 27 27 24 24 1C 02", "Sigma 15mm f/2.8 EX Diagonal Fisheye"}, + {"26 48 2D 50 24 24 1C 06", "Sigma 18-50mm f/2.8 EX DC"}, + {"26 48 31 49 24 24 1C 02", "Sigma 20-40mm f/2.8"}, + {"26 48 37 56 24 24 1C 02", "Sigma 24-60mm f/2.8 EX DG"}, + {"26 48 3C 5C 24 24 1C 06", "Sigma 28-70mm f/2.8 EX DG"}, + {"26 48 3C 5C 24 30 1C 02", "Sigma 28-70mm f/2.8-4 DG"}, + {"26 48 3C 6A 24 30 1C 02", "Sigma 28-105mm f/2.8-4 Aspherical"}, + {"26 48 8E 8E 30 30 1C 02", "Sigma APO Tele Macro 300mm f/4"}, + {"26 54 2B 44 24 30 1C 02", "Sigma 17-35mm f/2.8-4 EX Aspherical"}, + {"26 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"}, + {"26 54 37 73 24 34 1C 02", "Sigma 24-135mm f/2.8-4.5"}, + {"26 54 3C 5C 24 24 1C 02", "Sigma 28-70mm f/2.8 EX"}, + {"26 58 31 31 14 14 1C 02", "Sigma 20mm f/1.8 EX DG Aspherical RF"}, + {"26 58 37 37 14 14 1C 02", "Sigma 24mm f/1.8 EX DG Aspherical Macro"}, + {"26 58 3C 3C 14 14 1C 02", "Sigma 28mm f/1.8 EX DG Aspherical Macro"}, + {"27 48 8E 8E 24 24 1D 02", "AF-I Nikkor 300mm f/2.8D IF-ED"}, + {"27 48 8E 8E 24 24 E1 02", "AF-I Nikkor 300mm f/2.8D IF-ED + TC-17E"}, + {"27 48 8E 8E 24 24 F1 02", "AF-I Nikkor 300mm f/2.8D IF-ED + TC-14E"}, + {"27 48 8E 8E 24 24 F2 02", "AF-I Nikkor 300mm f/2.8D IF-ED + TC-20E"}, + {"27 48 8E 8E 30 30 1D 02", "Tokina AT-X 304 AF (AF 300mm f/4.0)"}, + {"27 54 8E 8E 24 24 1D 02", "Tamron SP AF 300mm f/2.8 LD-IF (360E)"}, + {"28 3C A6 A6 30 30 1D 02", "AF-I Nikkor 600mm f/4D IF-ED"}, + {"28 3C A6 A6 30 30 E1 02", "AF-I Nikkor 600mm f/4D IF-ED + TC-17E"}, + {"28 3C A6 A6 30 30 F1 02", "AF-I Nikkor 600mm f/4D IF-ED + TC-14E"}, + {"28 3C A6 A6 30 30 F2 02", "AF-I Nikkor 600mm f/4D IF-ED + TC-20E"}, + {"2A 54 3C 3C 0C 0C 26 02", "AF Nikkor 28mm f/1.4D"}, + {"2B 3C 44 60 30 3C 1F 02", "AF Zoom-Nikkor 35-80mm f/4-5.6D"}, + {"2C 48 6A 6A 18 18 27 02", "AF DC-Nikkor 105mm f/2D"}, + {"2D 48 80 80 30 30 21 02", "AF Micro-Nikkor 200mm f/4D IF-ED"}, + {"2E 48 5C 82 30 3C 22 02", "AF Nikkor 70-210mm f/4-5.6D"}, + {"2E 48 5C 82 30 3C 28 02", "AF Nikkor 70-210mm f/4-5.6D"}, + {"2F 40 30 44 2C 34 29 02", "Tokina AF 235 II (AF 20-35mm f/3.5-4.5)"}, + {"2F 40 30 44 2C 34 29 02", "Tokina AF 193 (AF 19-35mm f/3.5-4.5)"}, + {"2F 48 30 44 24 24 29 02", "AF Zoom-Nikkor 20-35mm f/2.8D IF"}, + {"2F 48 30 44 24 24 29 02", "Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8)"}, + {"30 48 98 98 24 24 24 02", "AF-I Nikkor 400mm f/2.8D IF-ED"}, + {"30 48 98 98 24 24 E1 02", "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E"}, + {"30 48 98 98 24 24 F1 02", "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E"}, + {"30 48 98 98 24 24 F2 02", "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E"}, + {"31 54 56 56 24 24 25 02", "AF Micro-Nikkor 60mm f/2.8D"}, + {"32 53 64 64 24 24 35 02", "Tamron SP AF 90mm f/2.8 [Di] Macro 1:1 (172E/272E)"}, + {"32 54 50 50 24 24 35 02", "Sigma Macro 50mm f/2.8 EX DG"}, + {"32 54 6A 6A 24 24 35 02", "AF Micro-Nikkor 105mm f/2.8D"}, + {"32 54 6A 6A 24 24 35 02", "Sigma Macro 105mm f/2.8 EX DG"}, + {"33 48 2D 2D 24 24 31 02", "AF Nikkor 18mm f/2.8D"}, + {"33 54 3C 5E 24 24 62 02", "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09)"}, + {"34 48 29 29 24 24 32 02", "AF Fisheye Nikkor 16mm f/2.8D"}, + {"35 3C A0 A0 30 30 33 02", "AF-I Nikkor 500mm f/4D IF-ED"}, + {"35 3C A0 A0 30 30 E1 02", "AF-I Nikkor 500mm f/4D IF-ED + TC-17E"}, + {"35 3C A0 A0 30 30 F1 02", "AF-I Nikkor 500mm f/4D IF-ED + TC-14E"}, + {"35 3C A0 A0 30 30 F2 02", "AF-I Nikkor 500mm f/4D IF-ED + TC-20E"}, + {"36 48 37 37 24 24 34 02", "AF Nikkor 24mm f/2.8D"}, + {"37 48 30 30 24 24 36 02", "AF Nikkor 20mm f/2.8D"}, + {"38 4C 62 62 14 14 37 02", "AF Nikkor 85mm f/1.8D"}, + {"3A 40 3C 5C 2C 34 39 02", "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"}, + {"3B 48 44 5C 24 24 3A 02", "AF Zoom-Nikkor 35-70mm f/2.8D N"}, + {"3C 48 60 80 24 24 3B 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"3D 3C 44 60 30 3C 3E 02", "AF Zoom-Nikkor 35-80mm f/4-5.6D"}, + {"3E 48 3C 3C 24 24 3D 02", "AF Nikkor 28mm f/2.8D"}, + {"3F 40 44 6A 2C 34 45 02", "AF Zoom-Nikkor 35-105mm f/3.5-4.5D"}, + {"41 48 7C 7C 24 24 43 02", "AF Nikkor 180mm f/2.8D IF-ED"}, + {"42 54 44 44 18 18 44 02", "AF Nikkor 35mm f/2D"}, + {"43 54 50 50 0C 0C 46 02", "AF Nikkor 50mm f/1.4D"}, + {"44 44 60 80 34 3C 47 02", "AF Zoom-Nikkor 80-200mm f/4.5-5.6D"}, + {"45 3D 3C 60 2C 3C 48 02", "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"}, + {"45 40 3C 60 2C 3C 48 02", "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"}, + {"45 41 37 72 2C 3C 48 02", "Tamron SP AF 24-135mm f/3.5-5.6 AD Aspherical (IF) Macro (190D)"}, + {"46 3C 44 60 30 3C 49 02", "AF Zoom-Nikkor 35-80mm f/4-5.6D N"}, + {"47 42 37 50 2A 34 4A 02", "AF Zoom-Nikkor 24-50mm f/3.3-4.5D"}, + {"48 38 1F 37 34 3C 4B 06", "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"}, + {"48 3C 19 31 30 3C 4B 06", "Sigma 10-20mm f/4-5.6 EX DC HSM"}, + {"48 3C 50 A0 30 40 4B 02", "Sigma 50-500mm f/4-6.3 EX APO RF HSM"}, + {"48 3C 8E B0 3C 3C 4B 02", "Sigma APO 300-800mm f/5.6 EX DG HSM"}, + {"48 3C B0 B0 3C 3C 4B 02", "Sigma APO 800mm f/5.6 EX HSM"}, + {"48 44 A0 A0 34 34 4B 02", "Sigma APO 500mm f/4.5 EX HSM"}, + {"48 48 24 24 24 24 4B 02", "Sigma 14mm f/2.8 EX Aspherical HSM"}, + {"48 48 2B 44 24 30 4B 06", "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM"}, + {"48 48 68 8E 30 30 4B 02", "Sigma APO 100-300mm f/4 EX IF HSM"}, + {"48 48 76 76 24 24 4B 06", "Sigma APO Macro 150mm f/2.8 EX DG HSM"}, + {"48 48 8E 8E 24 24 4B 02", "AF-S Nikkor 300mm f/2.8D IF-ED"}, + {"48 48 8E 8E 24 24 E1 02", "AF-S Nikkor 300mm f/2.8D IF-ED + TC-17E"}, + {"48 48 8E 8E 24 24 F1 02", "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E"}, + {"48 48 8E 8E 24 24 F2 02", "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E"}, + {"48 4C 7C 7C 2C 2C 4B 02", "Sigma APO Macro 180mm f/3.5 EX DG HSM"}, + {"48 4C 7D 7D 2C 2C 4B 02", "Sigma APO Macro 180mm f/3.5 EX DG HSM"}, + {"48 54 3E 3E 0C 0C 4B 06", "Sigma 30mm f/1.4 EX DC HSM"}, + {"48 54 5C 80 24 24 4B 02", "Sigma 70-200mm f/2.8 EX APO IF HSM"}, + {"48 54 6F 8E 24 24 4B 02", "Sigma APO 120-300mm f/2.8 EX DG HSM"}, + {"48 54 8E 8E 24 24 4B 02", "Sigma APO 300mm f/2.8 EX DG HSM"}, + {"49 3C A6 A6 30 30 4C 02", "AF-S Nikkor 600mm f/4D IF-ED"}, + {"49 3C A6 A6 30 30 E1 02", "AF-S Nikkor 600mm f/4D IF-ED + TC-17E"}, + {"49 3C A6 A6 30 30 F1 02", "AF-S Nikkor 600mm f/4D IF-ED + TC-14E"}, + {"49 3C A6 A6 30 30 F2 02", "AF-S Nikkor 600mm f/4D IF-ED + TC-20E"}, + {"4A 40 11 11 2C 0C 4D 02", "Samyang 8mm f/3.5 Fish-Eye CS"}, + {"4A 48 1E 1E 24 0C 4D 02", "Samyang 12mm f/2.8 ED AS NCS Fish-Eye"}, + {"4A 48 24 24 24 0C 4D 02", "Samyang AE 14mm f/2.8 ED AS IF UMC"}, + {"4A 54 29 29 18 0C 4D 02", "Samyang 16mm f/2.0 ED AS UMC CS"}, + {"4A 54 62 62 0C 0C 4D 02", "AF Nikkor 85mm f/1.4D IF"}, + {"4A 60 44 44 0C 0C 4D 02", "Samyang 35mm f/1.4 AS UMC"}, + {"4A 60 62 62 0C 0C 4D 02", "Samyang AE 85mm f/1.4 AS IF UMC"}, + {"4B 3C A0 A0 30 30 4E 02", "AF-S Nikkor 500mm f/4D IF-ED"}, + {"4B 3C A0 A0 30 30 E1 02", "AF-S Nikkor 500mm f/4D IF-ED + TC-17E"}, + {"4B 3C A0 A0 30 30 F1 02", "AF-S Nikkor 500mm f/4D IF-ED + TC-14E"}, + {"4B 3C A0 A0 30 30 F2 02", "AF-S Nikkor 500mm f/4D IF-ED + TC-20E"}, + {"4C 40 37 6E 2C 3C 4F 02", "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF"}, + {"4D 3E 3C 80 2E 3C 62 02", "Tamron AF 28-200mm f/3.8-5.6 XR Aspherical (IF) Macro (A03N)"}, + {"4D 40 3C 80 2C 3C 62 02", "AF Zoom-Nikkor 28-200mm f/3.5-5.6D IF"}, + {"4D 41 3C 8E 2B 40 62 02", "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)"}, + {"4D 41 3C 8E 2C 40 62 02", "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)"}, + {"4E 48 72 72 18 18 51 02", "AF DC-Nikkor 135mm f/2D"}, + {"4F 40 37 5C 2C 3C 53 06", "IX-Nikkor 24-70mm f/3.5-5.6"}, + {"50 48 56 7C 30 3C 54 06", "IX-Nikkor 60-180mm f/4-5.6"}, + {"52 54 44 44 18 18 00 00", "Zeiss Milvus 35mm f/2"}, + {"53 48 60 80 24 24 57 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"53 48 60 80 24 24 60 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"53 54 50 50 0C 0C 00 00", "Zeiss Milvus 50mm f/1.4"}, + {"54 44 5C 7C 34 3C 58 02", "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"}, + {"54 44 5C 7C 34 3C 61 02", "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"}, + {"54 54 50 50 18 18 00 00", "Zeiss Milvus 50mm f/2 Macro"}, + {"55 54 62 62 0C 0C 00 00", "Zeiss Milvus 85mm f/1.4"}, + {"56 3C 5C 8E 30 3C 1C 02", "Sigma 70-300mm f/4-5.6 APO Macro Super II"}, + {"56 48 5C 8E 30 3C 5A 02", "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"}, + {"56 54 68 68 18 18 00 00", "Zeiss Milvus 100mm f/2 Macro"}, + {"59 48 98 98 24 24 5D 02", "AF-S Nikkor 400mm f/2.8D IF-ED"}, + {"59 48 98 98 24 24 E1 02", "AF-S Nikkor 400mm f/2.8D IF-ED + TC-17E"}, + {"59 48 98 98 24 24 F1 02", "AF-S Nikkor 400mm f/2.8D IF-ED + TC-14E"}, + {"59 48 98 98 24 24 F2 02", "AF-S Nikkor 400mm f/2.8D IF-ED + TC-20E"}, + {"5A 3C 3E 56 30 3C 5E 06", "IX-Nikkor 30-60mm f/4-5.6"}, + {"5B 44 56 7C 34 3C 5F 06", "IX-Nikkor 60-180mm f/4.5-5.6"}, + {"5D 48 3C 5C 24 24 63 02", "AF-S Zoom-Nikkor 28-70mm f/2.8D IF-ED"}, + {"5E 48 60 80 24 24 64 02", "AF-S Zoom-Nikkor 80-200mm f/2.8D IF-ED"}, + {"5F 40 3C 6A 2C 34 65 02", "AF Zoom-Nikkor 28-105mm f/3.5-4.5D IF"}, + {"60 40 3C 60 2C 3C 66 02", "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"}, + {"61 44 5E 86 34 3C 67 02", "AF Zoom-Nikkor 75-240mm f/4.5-5.6D"}, + {"63 48 2B 44 24 24 68 02", "AF-S Nikkor 17-35mm f/2.8D IF-ED"}, + {"64 00 62 62 24 24 6A 02", "PC Micro-Nikkor 85mm f/2.8D"}, + {"65 44 60 98 34 3C 6B 0A", "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED"}, + {"66 40 2D 44 2C 34 6C 02", "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED"}, + {"67 48 37 62 24 30 6D 02", "AF Zoom-Nikkor 24-85mm f/2.8-4D IF"}, + {"67 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"}, + {"68 42 3C 60 2A 3C 6E 06", "AF Zoom-Nikkor 28-80mm f/3.3-5.6G"}, + {"69 47 5C 8E 30 3C 00 02", "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17N)"}, + {"69 48 5C 8E 30 3C 6F 02", "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2 (572D/772D)"}, + {"69 48 5C 8E 30 3C 6F 06", "AF Zoom-Nikkor 70-300mm f/4-5.6G"}, + {"6A 48 8E 8E 30 30 70 02", "AF-S Nikkor 300mm f/4D IF-ED"}, + {"6B 48 24 24 24 24 71 02", "AF Nikkor ED 14mm f/2.8D"}, + {"6D 48 8E 8E 24 24 73 02", "AF-S Nikkor 300mm f/2.8D IF-ED II"}, + {"6E 48 98 98 24 24 74 02", "AF-S Nikkor 400mm f/2.8D IF-ED II"}, + {"6F 3C A0 A0 30 30 75 02", "AF-S Nikkor 500mm f/4D IF-ED II"}, + {"70 3C A6 A6 30 30 76 02", "AF-S Nikkor 600mm f/4D IF-ED II"}, + {"72 48 4C 4C 24 24 77 00", "Nikkor 45mm f/2.8 P"}, + {"74 40 37 62 2C 34 78 06", "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"}, + {"75 40 3C 68 2C 3C 79 06", "AF Zoom-Nikkor 28-100mm f/3.5-5.6G"}, + {"76 58 50 50 14 14 7A 02", "AF Nikkor 50mm f/1.8D"}, + {"77 44 61 98 34 3C 7B 0E", "Sigma 80-400mm f/4.5-5.6 EX OS"}, + {"77 48 5C 80 24 24 7B 0E", "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"}, + {"78 40 37 6E 2C 3C 7C 0E", "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED"}, + {"79 40 11 11 2C 2C 1C 06", "Sigma 8mm f/3.5 EX Circular Fisheye"}, + {"79 40 3C 80 2C 3C 7F 06", "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED"}, + {"79 48 3C 5C 24 24 1C 06", "Sigma 28-70mm f/2.8 EX DG"}, + {"79 48 5C 5C 24 24 1C 06", "Sigma Macro 70mm f/2.8 EX DG"}, + {"7A 3B 53 80 30 3C 4B 06", "Sigma 55-200mm f/4-5.6 DC HSM"}, + {"7A 3C 1F 37 30 30 7E 06", "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"}, + {"7A 3C 1F 37 30 30 7E 06", "Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)"}, + {"7A 3C 1F 3C 30 30 7E 06", "Tokina AT-X 12-28 PRO DX (AF 12-28mm f/4)"}, + {"7A 40 2D 50 2C 3C 4B 06", "Sigma 18-50mm f/3.5-5.6 DC HSM"}, + {"7A 40 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 DC OS HSM"}, + {"7A 47 2B 5C 24 34 4B 06", "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"}, + {"7A 47 50 76 24 24 4B 06", "Sigma 50-150mm f/2.8 EX APO DC HSM"}, + {"7A 48 1C 29 24 24 7E 06", "Tokina AT-X 116 PRO DX II (AF 11-16mm f/2.8)"}, + {"7A 48 1C 30 24 24 7E 06", "Tokina AT-X 11-20 f/2.8 PRO DX (AF 11-20mm f/2.8)"}, + {"7A 48 2B 5C 24 34 4B 06", "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"}, + {"7A 48 2D 50 24 24 4B 06", "Sigma 18-50mm f/2.8 EX DC Macro"}, + {"7A 48 5C 80 24 24 4B 06", "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"}, + {"7A 54 6E 8E 24 24 4B 02", "Sigma APO 120-300mm f/2.8 EX DG HSM"}, + {"7B 48 80 98 30 30 80 0E", "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"}, + {"7D 48 2B 53 24 24 82 06", "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"}, + {"7F 40 2D 5C 2C 34 84 06", "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED"}, + {"7F 48 2B 5C 24 34 1C 06", "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF"}, + {"7F 48 2D 50 24 24 1C 06", "Sigma 18-50mm f/2.8 EX DC Macro"}, + {"80 48 1A 1A 24 24 85 06", "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED"}, + {"81 34 76 A6 38 40 4B 0E", "Sigma 150-600mm f/5-6.3 DG OS HSM | S"}, + {"81 54 80 80 18 18 86 0E", "AF-S VR Nikkor 200mm f/2G IF-ED"}, + {"82 34 76 A6 38 40 4B 0E", "Sigma 150-600mm f/5-6.3 DG OS HSM | C"}, + {"82 48 8E 8E 24 24 87 0E", "AF-S VR Nikkor 300mm f/2.8G IF-ED"}, + {"83 00 B0 B0 5A 5A 88 04", "FSA-L2, EDG 65, 800mm f/13 G"}, + {"88 54 50 50 0C 0C 4B 06", "Sigma 50mm f/1.4 DG HSM | A"}, + {"89 3C 53 80 30 3C 8B 06", "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"}, + {"8A 3C 37 6A 30 30 4B 0E", "Sigma 24-105mm f/4 DG OS HSM"}, + {"8A 54 6A 6A 24 24 8C 0E", "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"}, + {"8B 40 2D 80 2C 3C 8D 0E", "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"}, + {"8B 40 2D 80 2C 3C FD 0E", "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED [II]"}, + {"8B 4C 2D 44 14 14 4B 06", "Sigma 18-35mm f/1.8 DC HSM"}, + {"8C 40 2D 53 2C 3C 8E 06", "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED"}, + {"8D 44 5C 8E 34 3C 8F 0E", "AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED"}, + {"8E 3C 2B 5C 24 30 4B 0E", "Sigma 17-70mm f/2.8-4 DC Macro OS HSM | C"}, + {"8F 40 2D 72 2C 3C 91 06", "AF-S DX Zoom-Nikkor 18-135mm f/3.5-5.6G IF-ED"}, + {"8F 48 2B 50 24 24 4B 0E", "Sigma 17-50mm f/2.8 EX DC OS HSM"}, + {"90 3B 53 80 30 3C 92 0E", "AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED"}, + {"90 40 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 II DC OS HSM"}, + {"91 54 44 44 0C 0C 4B 06", "Sigma 35mm f/1.4 DG HSM"}, + {"92 2C 2D 88 2C 40 4B 0E", "Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM"}, + {"92 48 24 37 24 24 94 06", "AF-S Zoom-Nikkor 14-24mm f/2.8G ED"}, + {"93 48 37 5C 24 24 95 06", "AF-S Zoom-Nikkor 24-70mm f/2.8G ED"}, + {"94 40 2D 53 2C 3C 96 06", "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED II"}, + {"95 00 37 37 2C 2C 97 06", "PC-E Nikkor 24mm f/3.5D ED"}, + {"95 4C 37 37 2C 2C 97 02", "PC-E Nikkor 24mm f/3.5D ED"}, + {"96 38 1F 37 34 3C 4B 06", "Sigma 12-24mm f/4.5-5.6 II DG HSM"}, + {"96 48 98 98 24 24 98 0E", "AF-S VR Nikkor 400mm f/2.8G ED"}, + {"97 3C A0 A0 30 30 99 0E", "AF-S VR Nikkor 500mm f/4G ED"}, + {"97 48 6A 6A 24 24 4B 0E", "Sigma Macro 105mm f/2.8 EX DG OS HSM"}, + {"98 3C A6 A6 30 30 9A 0E", "AF-S VR Nikkor 600mm f/4G ED"}, + {"98 48 50 76 24 24 4B 0E", "Sigma 50-150mm f/2.8 EX APO DC OS HSM"}, + {"99 40 29 62 2C 3C 9B 0E", "AF-S DX VR Zoom-Nikkor 16-85mm f/3.5-5.6G ED"}, + {"99 48 76 76 24 24 4B 0E", "Sigma APO Macro 150mm f/2.8 EX DG OS HSM"}, + {"9A 40 2D 53 2C 3C 9C 0E", "AF-S DX VR Zoom-Nikkor 18-55mm f/3.5-5.6G"}, + {"9B 00 4C 4C 24 24 9D 06", "PC-E Micro Nikkor 45mm f/2.8D ED"}, + {"9B 54 4C 4C 24 24 9D 02", "PC-E Micro Nikkor 45mm f/2.8D ED"}, + {"9B 54 62 62 0C 0C 4B 06", "Sigma 85mm f/1.4 EX DG HSM"}, + {"9C 48 5C 80 24 24 4B 0E", "Sigma 70-200mm f/2.8 EX DG OS HSM"}, + {"9C 54 56 56 24 24 9E 06", "AF-S Micro Nikkor 60mm f/2.8G ED"}, + {"9D 00 62 62 24 24 9F 06", "PC-E Micro Nikkor 85mm f/2.8D"}, + {"9D 48 2B 50 24 24 4B 0E", "Sigma 17-50mm f/2.8 EX DC OS HSM"}, + {"9D 54 62 62 24 24 9F 02", "PC-E Micro Nikkor 85mm f/2.8D"}, + {"9E 38 11 29 34 3C 4B 06", "Sigma 8-16mm f/4.5-5.6 DC HSM"}, + {"9E 40 2D 6A 2C 3C A0 0E", "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"}, + {"9F 37 50 A0 34 40 4B 0E", "Sigma 50-500mm f/4.5-6.3 DG OS HSM"}, + {"9F 58 44 44 14 14 A1 06", "AF-S DX Nikkor 35mm f/1.8G"}, + {"A0 40 2D 74 2C 3C BB 0E", "AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR"}, + {"A0 48 2A 5C 24 30 4B 0E", "Sigma 17-70mm f/2.8-4 DC Macro OS HSM"}, + {"A0 54 50 50 0C 0C A2 06", "AF-S Nikkor 50mm f/1.4G"}, + {"A1 40 18 37 2C 34 A3 06", "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED"}, + {"A1 41 19 31 2C 2C 4B 06", "Sigma 10-20mm f/3.5 EX DC HSM"}, + {"A1 54 55 55 0C 0C BC 06", "AF-S Nikkor 58mm f/1.4G"}, + {"A2 40 2D 53 2C 3C BD 0E", "AF-S DX Nikkor 18-55mm f/3.5-5.6G VR II"}, + {"A2 48 5C 80 24 24 A4 0E", "AF-S Nikkor 70-200mm f/2.8G ED VR II"}, + {"A3 3C 29 44 30 30 A5 0E", "AF-S Nikkor 16-35mm f/4G ED VR"}, + {"A3 3C 5C 8E 30 3C 4B 0E", "Sigma 70-300mm f/4-5.6 DG OS"}, + {"A4 40 2D 8E 2C 40 BF 0E", "AF-S DX Nikkor 18-300mm f/3.5-6.3G ED VR"}, + {"A4 47 2D 50 24 34 4B 0E", "Sigma 18-50mm f/2.8-4.5 DC OS HSM"}, + {"A4 54 37 37 0C 0C A6 06", "AF-S Nikkor 24mm f/1.4G ED"}, + {"A5 40 2D 88 2C 40 4B 0E", "Sigma 18-250mm f/3.5-6.3 DC OS HSM"}, + {"A5 40 3C 8E 2C 3C A7 0E", "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR"}, + {"A5 4C 44 44 14 14 C0 06", "AF-S Nikkor 35mm f/1.8G ED"}, + {"A6 48 37 5C 24 24 4B 06", "Sigma 24-70mm f/2.8 IF EX DG HSM"}, + {"A6 48 8E 8E 24 24 A8 0E", "AF-S VR Nikkor 300mm f/2.8G IF-ED II"}, + {"A6 48 98 98 24 24 C1 0E", "AF-S Nikkor 400mm f/2.8E FL ED VR"}, + {"A7 3C 53 80 30 3C C2 0E", "AF-S DX Nikkor 55-200mm f/4-5.6G ED VR II"}, + {"A7 49 80 A0 24 24 4B 06", "Sigma APO 200-500mm f/2.8 EX DG"}, + {"A7 4B 62 62 2C 2C A9 0E", "AF-S DX Micro Nikkor 85mm f/3.5G ED VR"}, + {"A8 48 80 98 30 30 AA 0E", "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II"}, + {"A8 48 8E 8E 30 30 C3 0E", "AF-S Nikkor 300mm f/4E PF ED VR"}, + {"A8 48 8E 8E 30 30 C3 4E", "AF-S Nikkor 300mm f/4E PF ED VR"}, + {"A9 4C 31 31 14 14 C4 06", "AF-S Nikkor 20mm f/1.8G ED"}, + {"A9 54 80 80 18 18 AB 0E", "AF-S Nikkor 200mm f/2G ED VR II"}, + {"AA 3C 37 6E 30 30 AC 0E", "AF-S Nikkor 24-120mm f/4G ED VR"}, + {"AA 48 37 5C 24 24 C5 4E", "AF-S Nikkor 24-70mm f/2.8E ED VR"}, + {"AB 3C A0 A0 30 30 C6 4E", "AF-S Nikkor 500mm f/4E FL ED VR"}, + {"AC 38 53 8E 34 3C AE 0E", "AF-S DX VR Nikkor 55-300mm f/4.5-5.6G ED"}, + {"AC 3C A6 A6 30 30 C7 4E", "AF-S Nikkor 600mm f/4E FL ED VR"}, + {"AD 3C 2D 8E 2C 3C AF 0E", "AF-S DX Nikkor 18-300mm f/3.5-5.6G ED VR"}, + {"AD 48 28 60 24 30 C8 0E", "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"}, + {"AD 48 28 60 24 30 C8 4E", "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"}, + {"AE 3C 80 A0 3C 3C C9 0E", "AF-S Nikkor 200-500mm f/5.6E ED VR"}, + {"AE 3C 80 A0 3C 3C C9 4E", "AF-S Nikkor 200-500mm f/5.6E ED VR"}, + {"AE 54 62 62 0C 0C B0 06", "AF-S Nikkor 85mm f/1.4G"}, + {"AF 4C 37 37 14 14 CC 06", "AF-S Nikkor 24mm f/1.8G ED"}, + {"AF 54 44 44 0C 0C B1 06", "AF-S Nikkor 35mm f/1.4G"}, + {"B0 4C 50 50 14 14 B2 06", "AF-S Nikkor 50mm f/1.8G"}, + {"B1 48 48 48 24 24 B3 06", "AF-S DX Micro Nikkor 40mm f/2.8G"}, + {"B2 48 5C 80 30 30 B4 0E", "AF-S Nikkor 70-200mm f/4G ED VR"}, + {"B3 4C 62 62 14 14 B5 06", "AF-S Nikkor 85mm f/1.8G"}, + {"B4 40 37 62 2C 34 B6 0E", "AF-S VR Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"}, + {"B5 4C 3C 3C 14 14 B7 06", "AF-S Nikkor 28mm f/1.8G"}, + {"B6 3C B0 B0 3C 3C B8 0E", "AF-S VR Nikkor 800mm f/5.6E FL ED"}, + {"B6 48 37 56 24 24 1C 02", "Sigma 24-60mm f/2.8 EX DG"}, + {"B7 44 60 98 34 3C B9 0E", "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR"}, + {"B8 40 2D 44 2C 34 BA 06", "AF-S Nikkor 18-35mm f/3.5-4.5G ED"}, + {"CC 4C 50 68 14 14 4B 06", "Sigma 50-100mm f/1.8 DC HSM | A"}, + {"CD 3D 2D 70 2E 3C 4B 0E", "Sigma 18-125mm f/3.8-5.6 DC OS HSM"}, + {"CE 34 76 A0 38 40 4B 0E", "Sigma 150-500mm f/5-6.3 DG OS APO HSM"}, + {"CF 38 6E 98 34 3C 4B 0E", "Sigma APO 120-400mm f/4.5-5.6 DG OS HSM"}, + {"DC 48 19 19 24 24 4B 06", "Sigma 10mm f/2.8 EX DC HSM Fisheye"}, + {"DE 54 50 50 0C 0C 4B 06", "Sigma 50mm f/1.4 EX DG HSM"}, + {"E0 3C 5C 8E 30 3C 4B 06", "Sigma 70-300mm f/4-5.6 APO DG Macro HSM"}, + {"E1 58 37 37 14 14 1C 02", "Sigma 24mm f/1.8 EX DG Aspherical Macro"}, + {"E3 54 50 50 24 24 35 02", "Sigma Macro 50mm f/2.8 EX DG"}, + {"E5 54 6A 6A 24 24 35 02", "Sigma Macro 105mm f/2.8 EX DG"}, + {"E6 41 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 DG Macro"}, + {"E8 4C 44 44 14 14 DF 0E", "Tamron SP 35mm f/1.8 VC"}, + {"E9 48 27 3E 24 24 DF 0E", "Tamron SP 15-30mm f/2.8 Di VC USD (A012)"}, + {"E9 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"}, + {"EA 40 29 8E 2C 40 DF 0E", "Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)"}, + {"EA 48 27 27 24 24 1C 02", "Sigma 15mm f/2.8 EX Diagonal Fisheye"}, + {"EB 40 76 A6 38 40 DF 0E", "Tamron SP AF 150-600mm f/5-6.3 VC USD (A011)"}, + {"ED 40 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 DC OS HSM"}, + {"EE 48 5C 80 24 24 4B 06", "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"}, + {"F0 38 1F 37 34 3C 4B 06", "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"}, + {"F0 3F 2D 8A 2C 40 DF 0E", "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)"}, + {"F1 44 A0 A0 34 34 4B 02", "Sigma APO 500mm f/4.5 EX DG HSM"}, + {"F1 47 5C 8E 30 3C DF 0E", "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"}, + {"F3 48 68 8E 30 30 4B 02", "Sigma APO 100-300mm f/4 EX IF HSM"}, + {"F3 54 2B 50 24 24 84 0E", "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF) (B005)"}, + {"F4 54 56 56 18 18 84 06", "Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)"}, + {"F5 40 2C 8A 2C 40 40 0E", "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Macro (B003)"}, + {"F5 48 76 76 24 24 4B 06", "Sigma APO Macro 150mm f/2.8 EX DG HSM"}, + {"F6 3F 18 37 2C 34 84 06", "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"}, + {"F6 3F 18 37 2C 34 DF 06", "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"}, + {"F6 48 2D 50 24 24 4B 06", "Sigma 18-50mm f/2.8 EX DC Macro"}, + {"F7 53 5C 80 24 24 40 06", "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"}, + {"F7 53 5C 80 24 24 84 06", "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"}, + {"F8 54 3E 3E 0C 0C 4B 06", "Sigma 30mm f/1.4 EX DC HSM"}, + {"F8 54 64 64 24 24 DF 06", "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"}, + {"F8 55 64 64 24 24 84 06", "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"}, + {"F9 3C 19 31 30 3C 4B 06", "Sigma 10-20mm f/4-5.6 EX DC HSM"}, + {"F9 40 3C 8E 2C 40 40 0E", "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical (IF) Macro (A20)"}, + {"FA 54 3C 5E 24 24 84 06", "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"}, + {"FA 54 3C 5E 24 24 DF 06", "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"}, + {"FA 54 6E 8E 24 24 4B 02", "Sigma APO 120-300mm f/2.8 EX DG HSM"}, + {"FB 54 2B 50 24 24 84 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"}, + {"FB 54 8E 8E 24 24 4B 02", "Sigma APO 300mm f/2.8 EX DG HSM"}, + {"FC 40 2D 80 2C 40 DF 06", "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) Macro (A14NII)"}, + {"FD 47 50 76 24 24 4B 06", "Sigma 50-150mm f/2.8 EX APO DC HSM II"}, + {"FE 47 00 00 24 24 4B 06", "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"}, + {"FE 48 37 5C 24 24 DF 0E", "Tamron SP 24-70mm f/2.8 Di VC USD (A007)"}, + {"FE 53 5C 80 24 24 84 06", "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"}, + {"FE 54 5C 80 24 24 DF 0E", "Tamron SP 70-200mm f/2.8 Di VC USD (A009)"}, + {"FE 54 64 64 24 24 DF 0E", "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 (F004)"}, + {"FF 40 2D 80 2C 40 4B 06", "Sigma 18-200mm f/3.5-6.3 DC"} +}; const TagAttrib nikonISOInfoAttribs[] = { {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index adb19c969..a559969bf 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -541,513 +541,515 @@ public: }; SAAntiBlurInterpreter saAntiBlurInterpreter; -class SALensIDInterpreter : public IntLensInterpreter< int > +class SALensIDInterpreter : public IntLensInterpreter { public: SALensIDInterpreter () { - choices.insert(p_t(0, "Minolta AF 28-85mm f/3.5-4.5 New")); - choices.insert(p_t(1, "Minolta AF 80-200mm f/2.8 HS-APO G")); - choices.insert(p_t(2, "Minolta AF 28-70mm f/2.8 G")); - choices.insert(p_t(3, "Minolta AF 28-80mm f/4-5.6")); - choices.insert(p_t(4, "Minolta AF 85mm f/1.4G")); - choices.insert(p_t(5, "Minolta AF 35-70mm f/3.5-4.5 [II]")); - choices.insert(p_t(6, "Minolta AF 24-85mm f/3.5-4.5 [New]")); - choices.insert(p_t(7, "Minolta AF 100-300mm f/4.5-5.6 APO [New] or 100-400mm or Sigma Lens")); - choices.insert(p_t(7, "Minolta AF 100-400mm f/4.5-6.7 APO")); - choices.insert(p_t(7, "Sigma AF 100-300mm f/4 EX DG IF")); - choices.insert(p_t(8, "Minolta AF 70-210mm f/4.5-5.6 [II]")); - choices.insert(p_t(9, "Minolta AF 50mm f/3.5 Macro")); - choices.insert(p_t(10, "Minolta AF 28-105mm f/3.5-4.5 [New]")); - choices.insert(p_t(11, "Minolta AF 300mm f/4 HS-APO G")); - choices.insert(p_t(12, "Minolta AF 100mm f/2.8 Soft Focus")); - choices.insert(p_t(13, "Minolta AF 75-300mm f/4.5-5.6 (New or II)")); - choices.insert(p_t(14, "Minolta AF 100-400mm f/4.5-6.7 APO")); - choices.insert(p_t(15, "Minolta AF 400mm f/4.5 HS-APO G")); - choices.insert(p_t(16, "Minolta AF 17-35mm f/3.5 G")); - choices.insert(p_t(17, "Minolta AF 20-35mm f/3.5-4.5")); - choices.insert(p_t(18, "Minolta AF 28-80mm f/3.5-5.6 II")); - choices.insert(p_t(19, "Minolta AF 35mm f/1.4 G")); - choices.insert(p_t(20, "Minolta/Sony 135mm f/2.8 [T4.5] STF")); - choices.insert(p_t(22, "Minolta AF 35-80mm f/4-5.6 II")); - choices.insert(p_t(23, "Minolta AF 200mm f/4 Macro APO G")); - choices.insert(p_t(24, "Minolta/Sony AF 24-105mm f/3.5-4.5 (D) or Sigma or Tamron Lens")); - choices.insert(p_t(24, "Sigma 18-50mm f/2.8")); - choices.insert(p_t(24, "Sigma 17-70mm f/2.8-4.5 (D)")); - choices.insert(p_t(24, "Sigma 20-40mm f/2.8 EX DG Aspherical IF")); - choices.insert(p_t(24, "Sigma 18-200mm f/3.5-6.3 DC")); - choices.insert(p_t(24, "Sigma DC 18-125mm f/4-5,6 D")); - choices.insert(p_t(24, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro")); - choices.insert(p_t(25, "Minolta AF 100-300mm f/4.5-5.6 APO (D) or Sigma Lens")); - choices.insert(p_t(25, "Sigma 100-300mm f/4 EX (APO (D) or D IF)")); - choices.insert(p_t(25, "Sigma 70mm f/2.8 EX DG Macro")); - choices.insert(p_t(25, "Sigma 20mm f/1.8 EX DG Aspherical RF")); - choices.insert(p_t(25, "Sigma 30mm f/1.4 EX DC")); - choices.insert(p_t(25, "Sigma 24mm f/1.8 EX DG ASP Macro")); - choices.insert(p_t(27, "Minolta AF 85mm f/1.4 G (D)")); - choices.insert(p_t(28, "Minolta/Sony AF 100mm f/2.8 Macro (D) or Tamron Lens")); - choices.insert(p_t(28, "Tamron SP AF 90mm f/2.8 Di Macro")); - choices.insert(p_t(28, "Tamron SP AF 180mm f/3.5 Di LD [IF] Macro")); - choices.insert(p_t(29, "Minolta/Sony AF 75-300mm f/4.5-5.6 (D)")); - choices.insert(p_t(30, "Minolta AF 28-80mm f/3.5-5.6 (D) or Sigma Lens")); - choices.insert(p_t(30, "Sigma AF 10-20mm f/4-5.6 EX DC")); - choices.insert(p_t(30, "Sigma AF 12-24mm f/4.5-5.6 EX DG")); - choices.insert(p_t(30, "Sigma 28-70mm EX DG f/2.8")); - choices.insert(p_t(30, "Sigma 55-200mm f/4-5.6 DC")); - choices.insert(p_t(31, "Minolta/Sony AF 50mm f/2.8 Macro (D) or f/3.5")); - choices.insert(p_t(31, "Minolta/Sony AF 50mm f/3.5 Macro")); - choices.insert(p_t(32, "Minolta/Sony AF 300mm f/2.8 G or 1.5x Teleconverter")); - choices.insert(p_t(33, "Minolta/Sony AF 70-200mm f/2.8 G")); - choices.insert(p_t(35, "Minolta AF 85mm f/1.4 G (D) Limited")); - choices.insert(p_t(36, "Minolta AF 28-100mm f/3.5-5.6 (D)")); - choices.insert(p_t(38, "Minolta AF 17-35mm f/2.8-4 (D)")); - choices.insert(p_t(39, "Minolta AF 28-75mm f/2.8 (D)")); - choices.insert(p_t(40, "Minolta/Sony AF DT 18-70mm f/3.5-5.6 (D)")); - choices.insert(p_t(41, "Minolta/Sony AF DT 11-18mm f/4.5-5.6 (D) or Tamron Lens")); - choices.insert(p_t(41, "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical IF")); - choices.insert(p_t(42, "Minolta/Sony AF DT 18-200mm f/3.5-6.3 (D)")); - choices.insert(p_t(43, "Sony 35mm f/1.4 G (SAL35F14G)")); - choices.insert(p_t(44, "Sony 50mm f/1.4 (SAL50F14)")); - choices.insert(p_t(45, "Carl Zeiss Planar T* 85mm f/1.4 ZA (SAL85F14Z)")); - choices.insert(p_t(46, "Carl Zeiss Vario-Sonnar T* DT 16-80mm f/3.5-4.5 ZA (SAL1680Z)")); - choices.insert(p_t(47, "Carl Zeiss Sonnar T* 135mm f/1.8 ZA (SAL135F18Z)")); - choices.insert(p_t(48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM (SAL2470Z) or ZA SSM II")); - choices.insert(p_t(48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM II (SAL2470Z2)")); - choices.insert(p_t(49, "Sony DT 55-200mm f/4-5.6 (SAL55200)")); - choices.insert(p_t(50, "Sony DT 18-250mm f/3.5-6.3 (SAL18250)")); - choices.insert(p_t(51, "Sony DT 16-105mm f/3.5-5.6 (SAL16105)")); - choices.insert(p_t(52, "Sony 70-300mm f/4.5-5.6 G SSM (SAL70300G) or G SSM II or Tamron Lens")); - choices.insert(p_t(52, "Sony 70-300mm f/4.5-5.6 G SSM II (SAL70300G2)")); - choices.insert(p_t(52, "Tamron SP 70-300mm f/4-5.6 Di USD")); - choices.insert(p_t(53, "Sony 70-400mm f/4-5.6 G SSM (SAL70400G)")); - choices.insert(p_t(54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM (SAL1635Z) or ZA SSM II")); - choices.insert(p_t(54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM II (SAL1635Z2)")); - choices.insert(p_t(55, "Sony DT 18-55mm f/3.5-5.6 SAM (SAL1855) or SAM II")); - choices.insert(p_t(55, "Sony DT 18-55mm f/3.5-5.6 SAM II (SAL18552)")); - choices.insert(p_t(56, "Sony DT 55-200mm f/4-5.6 SAM (SAL55200-2)")); - choices.insert(p_t(57, "Sony DT 50mm f/1.8 SAM (SAL50F18) or Tamron Lens or Commlite CM-EF-NEX adapter")); - choices.insert(p_t(57, "Tamron SP AF 60mm f/2 Di II LD [IF] Macro 1:1")); - choices.insert(p_t(57, "Tamron 18-270mm f/3.5-6.3 Di II PZD")); - choices.insert(p_t(58, "Sony DT 30mm f/2.8 Macro SAM (SAL30M28)")); - choices.insert(p_t(59, "Sony 28-75mm f/2.8 SAM (SAL2875)")); - choices.insert(p_t(60, "Carl Zeiss Distagon T* 24mm f/2 ZA SSM (SAL24F20Z)")); - choices.insert(p_t(61, "Sony 85mm f/2.8 SAM (SAL85F28)")); - choices.insert(p_t(62, "Sony DT 35mm f/1.8 SAM (SAL35F18)")); - choices.insert(p_t(63, "Sony DT 16-50mm f/2.8 SSM (SAL1650)")); - choices.insert(p_t(64, "Sony 500mm f/4 G SSM (SAL500F40G)")); - choices.insert(p_t(65, "Sony DT 18-135mm f/3.5-5.6 SAM (SAL18135)")); - choices.insert(p_t(66, "Sony 300mm f/2.8 G SSM II (SAL300F28G2)")); - choices.insert(p_t(67, "Sony 70-200mm f/2.8 G SSM II (SAL70200G2)")); - choices.insert(p_t(68, "Sony DT 55-300mm f/4.5-5.6 SAM (SAL55300)")); - choices.insert(p_t(69, "Sony 70-400mm f/4-5.6 G SSM II (SAL70400G2)")); - choices.insert(p_t(70, "Carl Zeiss Planar T* 50mm f/1.4 ZA SSM (SAL50F14Z)")); - choices.insert(p_t(128, "Tamron or Sigma Lens (128)")); - choices.insert(p_t(128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro")); - choices.insert(p_t(128, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro")); - choices.insert(p_t(128, "Tamron 80-300mm f/3.5-6.3")); - choices.insert(p_t(128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical [IF] Macro")); - choices.insert(p_t(128, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF")); - choices.insert(p_t(128, "Sigma AF 50-150mm f/2.8 EX DC APO HSM II")); - choices.insert(p_t(128, "Sigma 10-20mm f/3.5 EX DC HSM")); - choices.insert(p_t(128, "Sigma 70-200mm f/2.8 II EX DG APO MACRO HSM")); - choices.insert(p_t(128, "Sigma 10mm f/2.8 EX DC HSM Fisheye")); - choices.insert(p_t(128, "Sigma 50mm f/1.4 EX DG HSM")); - choices.insert(p_t(128, "Sigma 85mm f/1.4 EX DG HSM")); - choices.insert(p_t(128, "Sigma 24-70mm f/2.8 IF EX DG HSM")); - choices.insert(p_t(128, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); - choices.insert(p_t(128, "Sigma 17-50mm f/2.8 EX DC HSM")); - choices.insert(p_t(128, "Sigma 17-70mm f/2.8-4 DC Macro HSM")); - choices.insert(p_t(128, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro")); - choices.insert(p_t(128, "Sigma 150-500mm f/5-6.3 APO DG OS HSM")); - choices.insert(p_t(128, "Tamron AF 28-105mm f/4-5.6 [IF]")); - choices.insert(p_t(128, "Sigma 35mm f/1.4 DG HSM")); - choices.insert(p_t(128, "Sigma 18-35mm f/1.8 DC HSM")); - choices.insert(p_t(128, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM")); - choices.insert(p_t(129, "Tamron Lens (129)")); - choices.insert(p_t(129, "Tamron 200-400mm f/5.6 LD")); - choices.insert(p_t(129, "Tamron 70-300mm f/4-5.6 LD")); - choices.insert(p_t(131, "Tamron 20-40mm f/2.7-3.5 SP Aspherical IF")); - choices.insert(p_t(135, "Vivitar 28-210mm f/3.5-5.6")); - choices.insert(p_t(136, "Tokina EMZ M100 AF 100mm f/3.5")); - choices.insert(p_t(137, "Cosina 70-210mm f/2.8-4 AF")); - choices.insert(p_t(138, "Soligor 19-35mm f/3.5-4.5")); - choices.insert(p_t(139, "Tokina AF 28-300mm f/4-6.3")); - choices.insert(p_t(142, "Voigtlander 70-300mm f/4.5-5.6")); - choices.insert(p_t(146, "Voigtlander Macro APO-Lanthar 125mm f/2.5 SL")); - choices.insert(p_t(194, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical [IF]")); - choices.insert(p_t(203, "Tamron SP 70-200mm f/2.8 Di USD")); - choices.insert(p_t(204, "Tamron SP 24-70mm f/2.8 Di USD")); - choices.insert(p_t(213, "Tamron 16-300mm f/3.5-6.3 Di II PZD")); - choices.insert(p_t(214, "Tamron SP 150-600mm f/5-6.3 Di USD")); - choices.insert(p_t(224, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD")); - choices.insert(p_t(255, "Tamron Lens (255)")); - choices.insert(p_t(255, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical")); - choices.insert(p_t(255, "Tamron AF 18-250mm f/3.5-6.3 XR Di II LD")); - choices.insert(p_t(255, "Tamron AF 55-200mm f/4-5.6 Di II LD Macro")); - choices.insert(p_t(255, "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2")); - choices.insert(p_t(255, "Tamron SP AF 200-500mm f/5.0-6.3 Di LD IF")); - choices.insert(p_t(255, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical IF")); - choices.insert(p_t(255, "Tamron SP AF 70-200mm f/2.8 Di LD IF Macro")); - choices.insert(p_t(255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical IF")); - choices.insert(p_t(255, "Tamron AF 90-300mm f/4.5-5.6 Telemacro")); - choices.insert(p_t(1868, "Sigma MC-11 Adapter")); - choices.insert(p_t(2550, "Minolta AF 50mm f/1.7")); - choices.insert(p_t(2551, "Minolta AF 35-70mm f/4 or Other Lens")); - choices.insert(p_t(2551, "Sigma UC AF 28-70mm f/3.5-4.5")); - choices.insert(p_t(2551, "Sigma AF 28-70mm f/2.8")); - choices.insert(p_t(2551, "Sigma M-AF 70-200mm f/2.8 EX Aspherical")); - choices.insert(p_t(2551, "Quantaray M-AF 35-80mm f/4-5.6")); - choices.insert(p_t(2551, "Tokina 28-70mm f/2.8-4.5 AF")); - choices.insert(p_t(2552, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens")); - choices.insert(p_t(2552, "Tokina 19-35mm f/3.5-4.5")); - choices.insert(p_t(2552, "Tokina 28-70mm f/2.8 AT-X")); - choices.insert(p_t(2552, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840")); - choices.insert(p_t(2552, "Tokina AF PRO 28-80mm f/2.8 AT-X 280")); - choices.insert(p_t(2552, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270")); - choices.insert(p_t(2552, "Tamron AF 19-35mm f/3.5-4.5")); - choices.insert(p_t(2552, "Angenieux AF 28-70mm f/2.6")); - choices.insert(p_t(2552, "Tokina AT-X 17 AF 17mm f/3.5")); - choices.insert(p_t(2552, "Tokina 20-35mm f/3.5-4.5 II AF")); - choices.insert(p_t(2553, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens")); - choices.insert(p_t(2553, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5")); - choices.insert(p_t(2553, "Sigma 28-105mm f/2.8-4 Aspherical")); - choices.insert(p_t(2553, "Sigma 28-105mm f/4-5.6 UC")); - choices.insert(p_t(2554, "Minolta AF 35-105mm f/3.5-4.5")); - choices.insert(p_t(2555, "Minolta AF 70-210mm f/4 Macro or Sigma Lens")); - choices.insert(p_t(2555, "Sigma 70-210mm f/4-5.6 APO")); - choices.insert(p_t(2555, "Sigma M-AF 70-200mm f/2.8 EX APO")); - choices.insert(p_t(2555, "Sigma 75-200mm f/2.8-3.5")); - choices.insert(p_t(2556, "Minolta AF 135mm f/2.8")); - choices.insert(p_t(2557, "Minolta/Sony AF 28mm f/2.8")); - choices.insert(p_t(2558, "Minolta AF 24-50mm f/4")); - choices.insert(p_t(2560, "Minolta AF 100-200mm f/4.5")); - choices.insert(p_t(2561, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens")); - choices.insert(p_t(2561, "Sigma 70-300mm f/4-5.6 DL Macro")); - choices.insert(p_t(2561, "Sigma 300mm f/4 APO Macro")); - choices.insert(p_t(2561, "Sigma AF 500mm f/4.5 APO")); - choices.insert(p_t(2561, "Sigma AF 170-500mm f/5-6.3 APO Aspherical")); - choices.insert(p_t(2561, "Tokina AT-X AF 300mm f/4")); - choices.insert(p_t(2561, "Tokina AT-X AF 400mm f/5.6 SD")); - choices.insert(p_t(2561, "Tokina AF 730 II 75-300mm f/4.5-5.6")); - choices.insert(p_t(2561, "Sigma 800mm f/5.6 APO")); - choices.insert(p_t(2561, "Sigma AF 400mm f/5.6 APO Macro")); - choices.insert(p_t(2562, "Minolta AF 50mm f/1.4 [New]")); - choices.insert(p_t(2563, "Minolta AF 300mm f/2.8 APO or Sigma Lens")); - choices.insert(p_t(2563, "Sigma AF 50-500mm f/4-6.3 EX DG APO")); - choices.insert(p_t(2563, "Sigma AF 170-500mm f/5-6.3 APO Aspherical")); - choices.insert(p_t(2563, "Sigma AF 500mm f/4.5 EX DG APO")); - choices.insert(p_t(2563, "Sigma 400mm f/5.6 APO")); - choices.insert(p_t(2564, "Minolta AF 50mm f/2.8 Macro or Sigma Lens")); - choices.insert(p_t(2564, "Sigma 50mm f/2.8 EX Macro")); - choices.insert(p_t(2565, "Minolta AF 600mm f/4 APO")); - choices.insert(p_t(2566, "Minolta AF 24mm f/2.8 or Sigma Lens")); - choices.insert(p_t(2566, "Sigma 17-35mm f/2.8-4 EX Aspherical")); - choices.insert(p_t(2572, "Minolta/Sony AF 500mm f/8 Reflex")); - choices.insert(p_t(2578, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens")); - choices.insert(p_t(2578, "Sigma 8mm f/4 EX [DG] Fisheye")); - choices.insert(p_t(2578, "Sigma 14mm f/3.5")); - choices.insert(p_t(2578, "Sigma 15mm f/2.8 Fisheye")); - choices.insert(p_t(2579, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens")); - choices.insert(p_t(2579, "Tokina AT-X Pro DX 11-16mm f/2.8")); - choices.insert(p_t(2581, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens")); - choices.insert(p_t(2581, "Sigma AF 90mm f/2.8 Macro")); - choices.insert(p_t(2581, "Sigma AF 105mm f/2.8 EX [DG] Macro")); - choices.insert(p_t(2581, "Sigma 180mm f/5.6 Macro")); - choices.insert(p_t(2581, "Sigma 180mm f/3.5 EX DG Macro")); - choices.insert(p_t(2581, "Tamron 90mm f/2.8 Macro")); - choices.insert(p_t(2585, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens")); - choices.insert(p_t(2585, "Beroflex 35-135mm f/3.5-4.5")); - choices.insert(p_t(2585, "Tamron 24-135mm f/3.5-5.6")); - choices.insert(p_t(2588, "Minolta AF 70-210mm f/3.5-4.5")); - choices.insert(p_t(2589, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens")); - choices.insert(p_t(2589, "Tokina 80-200mm f/2.8")); - choices.insert(p_t(2590, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x")); - choices.insert(p_t(2590, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO")); - choices.insert(p_t(2591, "Minolta AF 35mm f/1.4")); - choices.insert(p_t(2592, "Minolta AF 85mm f/1.4 G (D)")); - choices.insert(p_t(2593, "Minolta AF 200mm f/2.8 APO")); - choices.insert(p_t(2594, "Minolta AF 3x-1x f/1.7-2.8 Macro")); - choices.insert(p_t(2596, "Minolta AF 28mm f/2")); - choices.insert(p_t(2597, "Minolta AF 35mm f/2 [New]")); - choices.insert(p_t(2598, "Minolta AF 100mm f/2")); - choices.insert(p_t(2601, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x")); - choices.insert(p_t(2601, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO")); - choices.insert(p_t(2604, "Minolta AF 80-200mm f/4.5-5.6")); - choices.insert(p_t(2605, "Minolta AF 35-80mm f/4-5.6")); - choices.insert(p_t(2606, "Minolta AF 100-300mm f/4.5-5.6")); - choices.insert(p_t(2607, "Minolta AF 35-80mm f/4-5.6")); - choices.insert(p_t(2608, "Minolta AF 300mm f/2.8 HS-APO G")); - choices.insert(p_t(2609, "Minolta AF 600mm f/4 HS-APO G")); - choices.insert(p_t(2612, "Minolta AF 200mm f/2.8 HS-APO G")); - choices.insert(p_t(2613, "Minolta AF 50mm f/1.7 New")); - choices.insert(p_t(2615, "Minolta AF 28-105mm f/3.5-4.5 xi")); - choices.insert(p_t(2616, "Minolta AF 35-200mm f/4.5-5.6 xi")); - choices.insert(p_t(2618, "Minolta AF 28-80mm f/4-5.6 xi")); - choices.insert(p_t(2619, "Minolta AF 80-200mm f/4.5-5.6 xi")); - choices.insert(p_t(2620, "Minolta AF 28-70mm f/2.8 G")); - choices.insert(p_t(2621, "Minolta AF 100-300mm f/4.5-5.6 xi")); - choices.insert(p_t(2624, "Minolta AF 35-80mm f/4-5.6 Power Zoom")); - choices.insert(p_t(2628, "Minolta AF 80-200mm f/2.8 HS-APO G")); - choices.insert(p_t(2629, "Minolta AF 85mm f/1.4 New")); - choices.insert(p_t(2631, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO")); - choices.insert(p_t(2632, "Minolta AF 24-50mm f/4 New")); - choices.insert(p_t(2638, "Minolta AF 50mm f/2.8 Macro New")); - choices.insert(p_t(2639, "Minolta AF 100mm f/2.8 Macro")); - choices.insert(p_t(2641, "Minolta/Sony AF 20mm f/2.8 New")); - choices.insert(p_t(2642, "Minolta AF 24mm f/2.8 New")); - choices.insert(p_t(2644, "Minolta AF 100-400mm f/4.5-6.7 APO")); - choices.insert(p_t(2662, "Minolta AF 50mm f/1.4 New")); - choices.insert(p_t(2667, "Minolta AF 35mm f/2 New")); - choices.insert(p_t(2668, "Minolta AF 28mm f/2 New")); - choices.insert(p_t(2672, "Minolta AF 24-105mm f/3.5-4.5 (D)")); - choices.insert(p_t(3046, "Metabones Canon EF Speed Booster")); - choices.insert(p_t(4567, "Tokina 70-210mm f/4-5.6")); - choices.insert(p_t(4571, "Vivitar 70-210mm f/4.5-5.6")); - choices.insert(p_t(4574, "2x Teleconverter or Tamron or Tokina Lens")); - choices.insert(p_t(4574, "Tamron SP AF 90mm f/2.5")); - choices.insert(p_t(4574, "Tokina RF 500mm f/8.0 x2")); - choices.insert(p_t(4574, "Tokina 300mm f/2.8 x2")); - choices.insert(p_t(4575, "1.4x Teleconverter")); - choices.insert(p_t(4585, "Tamron SP AF 300mm f/2.8 LD IF")); - choices.insert(p_t(4586, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF")); - choices.insert(p_t(4587, "Tamron AF 70-210mm f/2.8 SP LD")); - choices.insert(p_t(4812, "Metabones Canon EF Speed Booster Ultra")); - choices.insert(p_t(6118, "Canon EF Adapter")); - choices.insert(p_t(6553, "E-Mount, T-Mount, Other Lens or no lens")); - choices.insert(p_t(6553, "Sony E 16mm f/2.8")); - choices.insert(p_t(6553, "Sony E 18-55mm f/3.5-5.6 OSS")); - choices.insert(p_t(6553, "Sony E 55-210mm f/4.5-6.3 OSS")); - choices.insert(p_t(6553, "Sony E 18-200mm f/3.5-6.3 OSS")); - choices.insert(p_t(6553, "Sony E 30mm f/3.5 Macro")); - choices.insert(p_t(6553, "Sony E 24mm f/1.8 ZA")); - choices.insert(p_t(6553, "Sony E 50mm f/1.8 OSS")); - choices.insert(p_t(6553, "Sony E 16-70mm f/4 ZA OSS")); - choices.insert(p_t(6553, "Sony E 10-18mm f/4 OSS")); - choices.insert(p_t(6553, "Sony E PZ 16-50mm f/3.5-5.6 OSS")); - choices.insert(p_t(6553, "Sony FE 35mm f/2.8 ZA")); - choices.insert(p_t(6553, "Sony FE 24-70mm f/4 ZA OSS")); - choices.insert(p_t(6553, "Sony E 18-200mm f/3.5-6.3 OSS LE")); - choices.insert(p_t(6553, "Sony E 20mm f/2.8")); - choices.insert(p_t(6553, "Sony E 35mm f/1.8 OSS")); - choices.insert(p_t(6553, "Sony E PZ 18-105mm f/4 G OSS")); - choices.insert(p_t(6553, "Sony FE 90mm f/2.8 Macro G OSS")); - choices.insert(p_t(6553, "Sony E 18-50mm f/4-5.6")); - choices.insert(p_t(6553, "Sony E PZ 18-200mm f/3.5-6.3 OSS")); - choices.insert(p_t(6553, "Sony FE 55mm f/1.8 ZA")); - choices.insert(p_t(6553, "Sony FE 70-200mm f/4 G OSS")); - choices.insert(p_t(6553, "Sony FE 16-35mm f/4 ZA OSS")); - choices.insert(p_t(6553, "Sony FE 28-70mm f/3.5-5.6 OSS")); - choices.insert(p_t(6553, "Sony FE 35mm f/1.4 ZA")); - choices.insert(p_t(6553, "Sony FE 24-240mm f/3.5-6.3 OSS")); - choices.insert(p_t(6553, "Sony FE 28mm f/2")); - choices.insert(p_t(6553, "Sony FE PZ 28-135mm f/4 G OSS")); - choices.insert(p_t(6553, "Sony FE 24-70mm f/2.8 GM")); - choices.insert(p_t(6553, "Sony FE 85mm f/1.4 GM")); - choices.insert(p_t(6553, "Sony FE 50mm f/1.8")); - choices.insert(p_t(6553, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)")); - choices.insert(p_t(6553, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)")); - choices.insert(p_t(6553, "Sony FE 70-300mm f/4.5-5.6 G OSS")); - choices.insert(p_t(6553, "Sony FE 70-200mm f/2.8 GM OSS")); - choices.insert(p_t(6553, "Sigma 19mm f/2.8 [EX] DN")); - choices.insert(p_t(6553, "Sigma 30mm f/2.8 [EX] DN")); - choices.insert(p_t(6553, "Sigma 60mm f/2.8 DN")); - choices.insert(p_t(6553, "Sigma 30mm f/1.4 DC DN | C")); - choices.insert(p_t(6553, "Tamron 18-200mm f/3.5-6.3 Di III VC")); - choices.insert(p_t(6553, "Zeiss Batis 25mm f/2")); - choices.insert(p_t(6553, "Zeiss Batis 85mm f/1.8")); - choices.insert(p_t(6553, "Zeiss Batis 18mm f/2.8")); - choices.insert(p_t(6553, "Zeiss Loxia 21mm f/2.8")); - choices.insert(p_t(6553, "Zeiss Loxia 35mm f/2")); - choices.insert(p_t(6553, "Zeiss Loxia 50mm f/2")); - choices.insert(p_t(6553, "Zeiss Touit 12mm f/2.8")); - choices.insert(p_t(6553, "Zeiss Touit 32mm f/1.8")); - choices.insert(p_t(6553, "Zeiss Touit 50mm f/2.8 Macro")); - choices.insert(p_t(6553, "Arax MC 35mm f/2.8 Tilt+Shift")); - choices.insert(p_t(6553, "Arax MC 80mm f/2.8 Tilt+Shift")); - choices.insert(p_t(6553, "Zenitar MF 16mm f/2.8 Fisheye M42")); - choices.insert(p_t(6553, "Samyang 500mm Mirror f/8.0")); - choices.insert(p_t(6553, "Pentacon Auto 135mm f/2.8")); - choices.insert(p_t(6553, "Pentacon Auto 29mm f/2.8")); - choices.insert(p_t(6553, "Helios 44-2 58mm f/2.0")); - choices.insert(p_t(18688, "Sigma MC-11 Adapter")); - choices.insert(p_t(25501, "Minolta AF 50mm f/1.7")); - choices.insert(p_t(25511, "Minolta AF 35-70mm f/4 or Other Lens")); - choices.insert(p_t(25511, "Sigma UC AF 28-70mm f/3.5-4.5")); - choices.insert(p_t(25511, "Sigma AF 28-70mm f/2.8")); - choices.insert(p_t(25511, "Sigma M-AF 70-200mm f/2.8 EX Aspherical")); - choices.insert(p_t(25511, "Quantaray M-AF 35-80mm f/4-5.6")); - choices.insert(p_t(25511, "Tokina 28-70mm f/2.8-4.5 AF")); - choices.insert(p_t(25521, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens")); - choices.insert(p_t(25521, "Tokina 19-35mm f/3.5-4.5")); - choices.insert(p_t(25521, "Tokina 28-70mm f/2.8 AT-X")); - choices.insert(p_t(25521, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840")); - choices.insert(p_t(25521, "Tokina AF PRO 28-80mm f/2.8 AT-X 280")); - choices.insert(p_t(25521, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270")); - choices.insert(p_t(25521, "Tamron AF 19-35mm f/3.5-4.5")); - choices.insert(p_t(25521, "Angenieux AF 28-70mm f/2.6")); - choices.insert(p_t(25521, "Tokina AT-X 17 AF 17mm f/3.5")); - choices.insert(p_t(25521, "Tokina 20-35mm f/3.5-4.5 II AF")); - choices.insert(p_t(25531, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens")); - choices.insert(p_t(25531, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5")); - choices.insert(p_t(25531, "Sigma 28-105mm f/2.8-4 Aspherical")); - choices.insert(p_t(25531, "Sigma 28-105mm f/4-5.6 UC")); - choices.insert(p_t(25541, "Minolta AF 35-105mm f/3.5-4.5")); - choices.insert(p_t(25551, "Minolta AF 70-210mm f/4 Macro or Sigma Lens")); - choices.insert(p_t(25551, "Sigma 70-210mm f/4-5.6 APO")); - choices.insert(p_t(25551, "Sigma M-AF 70-200mm f/2.8 EX APO")); - choices.insert(p_t(25551, "Sigma 75-200mm f/2.8-3.5")); - choices.insert(p_t(25561, "Minolta AF 135mm f/2.8")); - choices.insert(p_t(25571, "Minolta/Sony AF 28mm f/2.8")); - choices.insert(p_t(25581, "Minolta AF 24-50mm f/4")); - choices.insert(p_t(25601, "Minolta AF 100-200mm f/4.5")); - choices.insert(p_t(25611, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens")); - choices.insert(p_t(25611, "Sigma 70-300mm f/4-5.6 DL Macro")); - choices.insert(p_t(25611, "Sigma 300mm f/4 APO Macro")); - choices.insert(p_t(25611, "Sigma AF 500mm f/4.5 APO")); - choices.insert(p_t(25611, "Sigma AF 170-500mm f/5-6.3 APO Aspherical")); - choices.insert(p_t(25611, "Tokina AT-X AF 300mm f/4")); - choices.insert(p_t(25611, "Tokina AT-X AF 400mm f/5.6 SD")); - choices.insert(p_t(25611, "Tokina AF 730 II 75-300mm f/4.5-5.6")); - choices.insert(p_t(25611, "Sigma 800mm f/5.6 APO")); - choices.insert(p_t(25611, "Sigma AF 400mm f/5.6 APO Macro")); - choices.insert(p_t(25621, "Minolta AF 50mm f/1.4 [New]")); - choices.insert(p_t(25631, "Minolta AF 300mm f/2.8 APO or Sigma Lens")); - choices.insert(p_t(25631, "Sigma AF 50-500mm f/4-6.3 EX DG APO")); - choices.insert(p_t(25631, "Sigma AF 170-500mm f/5-6.3 APO Aspherical")); - choices.insert(p_t(25631, "Sigma AF 500mm f/4.5 EX DG APO")); - choices.insert(p_t(25631, "Sigma 400mm f/5.6 APO")); - choices.insert(p_t(25641, "Minolta AF 50mm f/2.8 Macro or Sigma Lens")); - choices.insert(p_t(25641, "Sigma 50mm f/2.8 EX Macro")); - choices.insert(p_t(25651, "Minolta AF 600mm f/4 APO")); - choices.insert(p_t(25661, "Minolta AF 24mm f/2.8 or Sigma Lens")); - choices.insert(p_t(25661, "Sigma 17-35mm f/2.8-4 EX Aspherical")); - choices.insert(p_t(25721, "Minolta/Sony AF 500mm f/8 Reflex")); - choices.insert(p_t(25781, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens")); - choices.insert(p_t(25781, "Sigma 8mm f/4 EX [DG] Fisheye")); - choices.insert(p_t(25781, "Sigma 14mm f/3.5")); - choices.insert(p_t(25781, "Sigma 15mm f/2.8 Fisheye")); - choices.insert(p_t(25791, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens")); - choices.insert(p_t(25791, "Tokina AT-X Pro DX 11-16mm f/2.8")); - choices.insert(p_t(25811, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens")); - choices.insert(p_t(25811, "Sigma AF 90mm f/2.8 Macro")); - choices.insert(p_t(25811, "Sigma AF 105mm f/2.8 EX [DG] Macro")); - choices.insert(p_t(25811, "Sigma 180mm f/5.6 Macro")); - choices.insert(p_t(25811, "Sigma 180mm f/3.5 EX DG Macro")); - choices.insert(p_t(25811, "Tamron 90mm f/2.8 Macro")); - choices.insert(p_t(25851, "Beroflex 35-135mm f/3.5-4.5")); - choices.insert(p_t(25858, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens")); - choices.insert(p_t(25858, "Tamron 24-135mm f/3.5-5.6")); - choices.insert(p_t(25881, "Minolta AF 70-210mm f/3.5-4.5")); - choices.insert(p_t(25891, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens")); - choices.insert(p_t(25891, "Tokina 80-200mm f/2.8")); - choices.insert(p_t(25901, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x")); - choices.insert(p_t(25901, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO")); - choices.insert(p_t(25911, "Minolta AF 35mm f/1.4")); - choices.insert(p_t(25921, "Minolta AF 85mm f/1.4 G (D)")); - choices.insert(p_t(25931, "Minolta AF 200mm f/2.8 APO")); - choices.insert(p_t(25941, "Minolta AF 3x-1x f/1.7-2.8 Macro")); - choices.insert(p_t(25961, "Minolta AF 28mm f/2")); - choices.insert(p_t(25971, "Minolta AF 35mm f/2 [New]")); - choices.insert(p_t(25981, "Minolta AF 100mm f/2")); - choices.insert(p_t(26011, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x")); - choices.insert(p_t(26011, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO")); - choices.insert(p_t(26041, "Minolta AF 80-200mm f/4.5-5.6")); - choices.insert(p_t(26051, "Minolta AF 35-80mm f/4-5.6")); - choices.insert(p_t(26061, "Minolta AF 100-300mm f/4.5-5.6")); - choices.insert(p_t(26071, "Minolta AF 35-80mm f/4-5.6")); - choices.insert(p_t(26081, "Minolta AF 300mm f/2.8 HS-APO G")); - choices.insert(p_t(26091, "Minolta AF 600mm f/4 HS-APO G")); - choices.insert(p_t(26121, "Minolta AF 200mm f/2.8 HS-APO G")); - choices.insert(p_t(26131, "Minolta AF 50mm f/1.7 New")); - choices.insert(p_t(26151, "Minolta AF 28-105mm f/3.5-4.5 xi")); - choices.insert(p_t(26161, "Minolta AF 35-200mm f/4.5-5.6 xi")); - choices.insert(p_t(26181, "Minolta AF 28-80mm f/4-5.6 xi")); - choices.insert(p_t(26191, "Minolta AF 80-200mm f/4.5-5.6 xi")); - choices.insert(p_t(26201, "Minolta AF 28-70mm f/2.8 G")); - choices.insert(p_t(26211, "Minolta AF 100-300mm f/4.5-5.6 xi")); - choices.insert(p_t(26241, "Minolta AF 35-80mm f/4-5.6 Power Zoom")); - choices.insert(p_t(26281, "Minolta AF 80-200mm f/2.8 HS-APO G")); - choices.insert(p_t(26291, "Minolta AF 85mm f/1.4 New")); - choices.insert(p_t(26311, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO")); - choices.insert(p_t(26321, "Minolta AF 24-50mm f/4 New")); - choices.insert(p_t(26381, "Minolta AF 50mm f/2.8 Macro New")); - choices.insert(p_t(26391, "Minolta AF 100mm f/2.8 Macro")); - choices.insert(p_t(26411, "Minolta/Sony AF 20mm f/2.8 New")); - choices.insert(p_t(26421, "Minolta AF 24mm f/2.8 New")); - choices.insert(p_t(26441, "Minolta AF 100-400mm f/4.5-6.7 APO")); - choices.insert(p_t(26621, "Minolta AF 50mm f/1.4 New")); - choices.insert(p_t(26671, "Minolta AF 35mm f/2 New")); - choices.insert(p_t(26681, "Minolta AF 28mm f/2 New")); - choices.insert(p_t(26721, "Minolta AF 24-105mm f/3.5-4.5 (D)")); - choices.insert(p_t(30464, "Metabones Canon EF Speed Booster")); - choices.insert(p_t(45671, "Tokina 70-210mm f/4-5.6")); - choices.insert(p_t(45711, "Vivitar 70-210mm f/4.5-5.6")); - choices.insert(p_t(45741, "2x Teleconverter or Tamron or Tokina Lens")); - choices.insert(p_t(45741, "Tamron SP AF 90mm f/2.5")); - choices.insert(p_t(45741, "Tokina RF 500mm f/8.0 x2")); - choices.insert(p_t(45741, "Tokina 300mm f/2.8 x2")); - choices.insert(p_t(45751, "1.4x Teleconverter")); - choices.insert(p_t(45851, "Tamron SP AF 300mm f/2.8 LD IF")); - choices.insert(p_t(45861, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF")); - choices.insert(p_t(45871, "Tamron AF 70-210mm f/2.8 SP LD")); - choices.insert(p_t(48128, "Metabones Canon EF Speed Booster Ultra")); - choices.insert(p_t(61184, "Canon EF Adapter")); - choices.insert(p_t(65535, "E-Mount, T-Mount, Other Lens or no lens")); - choices.insert(p_t(65535, "Sony E 16mm f/2.8")); - choices.insert(p_t(65535, "Sony E 18-55mm f/3.5-5.6 OSS")); - choices.insert(p_t(65535, "Sony E 55-210mm f/4.5-6.3 OSS")); - choices.insert(p_t(65535, "Sony E 18-200mm f/3.5-6.3 OSS")); - choices.insert(p_t(65535, "Sony E 30mm f/3.5 Macro")); - choices.insert(p_t(65535, "Sony E 24mm f/1.8 ZA")); - choices.insert(p_t(65535, "Sony E 50mm f/1.8 OSS")); - choices.insert(p_t(65535, "Sony E 16-70mm f/4 ZA OSS")); - choices.insert(p_t(65535, "Sony E 10-18mm f/4 OSS")); - choices.insert(p_t(65535, "Sony E PZ 16-50mm f/3.5-5.6 OSS")); - choices.insert(p_t(65535, "Sony FE 35mm f/2.8 ZA")); - choices.insert(p_t(65535, "Sony FE 24-70mm f/4 ZA OSS")); - choices.insert(p_t(65535, "Sony E 18-200mm f/3.5-6.3 OSS LE")); - choices.insert(p_t(65535, "Sony E 20mm f/2.8")); - choices.insert(p_t(65535, "Sony E 35mm f/1.8 OSS")); - choices.insert(p_t(65535, "Sony E PZ 18-105mm f/4 G OSS")); - choices.insert(p_t(65535, "Sony FE 90mm f/2.8 Macro G OSS")); - choices.insert(p_t(65535, "Sony E 18-50mm f/4-5.6")); - choices.insert(p_t(65535, "Sony E PZ 18-200mm f/3.5-6.3 OSS")); - choices.insert(p_t(65535, "Sony FE 55mm f/1.8 ZA")); - choices.insert(p_t(65535, "Sony FE 70-200mm f/4 G OSS")); - choices.insert(p_t(65535, "Sony FE 16-35mm f/4 ZA OSS")); - choices.insert(p_t(65535, "Sony FE 28-70mm f/3.5-5.6 OSS")); - choices.insert(p_t(65535, "Sony FE 35mm f/1.4 ZA")); - choices.insert(p_t(65535, "Sony FE 24-240mm f/3.5-6.3 OSS")); - choices.insert(p_t(65535, "Sony FE 28mm f/2")); - choices.insert(p_t(65535, "Sony FE PZ 28-135mm f/4 G OSS")); - choices.insert(p_t(65535, "Sony FE 24-70mm f/2.8 GM")); - choices.insert(p_t(65535, "Sony FE 85mm f/1.4 GM")); - choices.insert(p_t(65535, "Sony FE 50mm f/1.8")); - choices.insert(p_t(65535, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)")); - choices.insert(p_t(65535, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)")); - choices.insert(p_t(65535, "Sony FE 70-300mm f/4.5-5.6 G OSS")); - choices.insert(p_t(65535, "Sony FE 70-200mm f/2.8 GM OSS")); - choices.insert(p_t(65535, "Sigma 19mm f/2.8 [EX] DN")); - choices.insert(p_t(65535, "Sigma 30mm f/2.8 [EX] DN")); - choices.insert(p_t(65535, "Sigma 60mm f/2.8 DN")); - choices.insert(p_t(65535, "Sigma 30mm f/1.4 DC DN | C")); - choices.insert(p_t(65535, "Tamron 18-200mm f/3.5-6.3 Di III VC")); - choices.insert(p_t(65535, "Zeiss Batis 25mm f/2")); - choices.insert(p_t(65535, "Zeiss Batis 85mm f/1.8")); - choices.insert(p_t(65535, "Zeiss Batis 18mm f/2.8")); - choices.insert(p_t(65535, "Zeiss Loxia 21mm f/2.8")); - choices.insert(p_t(65535, "Zeiss Loxia 35mm f/2")); - choices.insert(p_t(65535, "Zeiss Loxia 50mm f/2")); - choices.insert(p_t(65535, "Zeiss Touit 12mm f/2.8")); - choices.insert(p_t(65535, "Zeiss Touit 32mm f/1.8")); - choices.insert(p_t(65535, "Zeiss Touit 50mm f/2.8 Macro")); - choices.insert(p_t(65535, "Arax MC 35mm f/2.8 Tilt+Shift")); - choices.insert(p_t(65535, "Arax MC 80mm f/2.8 Tilt+Shift")); - choices.insert(p_t(65535, "Zenitar MF 16mm f/2.8 Fisheye M42")); - choices.insert(p_t(65535, "Samyang 500mm Mirror f/8.0")); - choices.insert(p_t(65535, "Pentacon Auto 135mm f/2.8")); - choices.insert(p_t(65535, "Pentacon Auto 29mm f/2.8")); - choices.insert(p_t(65535, "Helios 44-2 58mm f/2.0")); + choices = { + {0, "Minolta AF 28-85mm f/3.5-4.5 New"}, + {1, "Minolta AF 80-200mm f/2.8 HS-APO G"}, + {2, "Minolta AF 28-70mm f/2.8 G"}, + {3, "Minolta AF 28-80mm f/4-5.6"}, + {4, "Minolta AF 85mm f/1.4G"}, + {5, "Minolta AF 35-70mm f/3.5-4.5 [II]"}, + {6, "Minolta AF 24-85mm f/3.5-4.5 [New]"}, + {7, "Minolta AF 100-300mm f/4.5-5.6 APO [New] or 100-400mm or Sigma Lens"}, + {7, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {7, "Sigma AF 100-300mm f/4 EX DG IF"}, + {8, "Minolta AF 70-210mm f/4.5-5.6 [II]"}, + {9, "Minolta AF 50mm f/3.5 Macro"}, + {10, "Minolta AF 28-105mm f/3.5-4.5 [New]"}, + {11, "Minolta AF 300mm f/4 HS-APO G"}, + {12, "Minolta AF 100mm f/2.8 Soft Focus"}, + {13, "Minolta AF 75-300mm f/4.5-5.6 (New or II)"}, + {14, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {15, "Minolta AF 400mm f/4.5 HS-APO G"}, + {16, "Minolta AF 17-35mm f/3.5 G"}, + {17, "Minolta AF 20-35mm f/3.5-4.5"}, + {18, "Minolta AF 28-80mm f/3.5-5.6 II"}, + {19, "Minolta AF 35mm f/1.4 G"}, + {20, "Minolta/Sony 135mm f/2.8 [T4.5] STF"}, + {22, "Minolta AF 35-80mm f/4-5.6 II"}, + {23, "Minolta AF 200mm f/4 Macro APO G"}, + {24, "Minolta/Sony AF 24-105mm f/3.5-4.5 (D) or Sigma or Tamron Lens"}, + {24, "Sigma 18-50mm f/2.8"}, + {24, "Sigma 17-70mm f/2.8-4.5 (D)"}, + {24, "Sigma 20-40mm f/2.8 EX DG Aspherical IF"}, + {24, "Sigma 18-200mm f/3.5-6.3 DC"}, + {24, "Sigma DC 18-125mm f/4-5,6 D"}, + {24, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"}, + {25, "Minolta AF 100-300mm f/4.5-5.6 APO (D) or Sigma Lens"}, + {25, "Sigma 100-300mm f/4 EX (APO (D) or D IF)"}, + {25, "Sigma 70mm f/2.8 EX DG Macro"}, + {25, "Sigma 20mm f/1.8 EX DG Aspherical RF"}, + {25, "Sigma 30mm f/1.4 EX DC"}, + {25, "Sigma 24mm f/1.8 EX DG ASP Macro"}, + {27, "Minolta AF 85mm f/1.4 G (D)"}, + {28, "Minolta/Sony AF 100mm f/2.8 Macro (D) or Tamron Lens"}, + {28, "Tamron SP AF 90mm f/2.8 Di Macro"}, + {28, "Tamron SP AF 180mm f/3.5 Di LD [IF] Macro"}, + {29, "Minolta/Sony AF 75-300mm f/4.5-5.6 (D)"}, + {30, "Minolta AF 28-80mm f/3.5-5.6 (D) or Sigma Lens"}, + {30, "Sigma AF 10-20mm f/4-5.6 EX DC"}, + {30, "Sigma AF 12-24mm f/4.5-5.6 EX DG"}, + {30, "Sigma 28-70mm EX DG f/2.8"}, + {30, "Sigma 55-200mm f/4-5.6 DC"}, + {31, "Minolta/Sony AF 50mm f/2.8 Macro (D) or f/3.5"}, + {31, "Minolta/Sony AF 50mm f/3.5 Macro"}, + {32, "Minolta/Sony AF 300mm f/2.8 G or 1.5x Teleconverter"}, + {33, "Minolta/Sony AF 70-200mm f/2.8 G"}, + {35, "Minolta AF 85mm f/1.4 G (D) Limited"}, + {36, "Minolta AF 28-100mm f/3.5-5.6 (D)"}, + {38, "Minolta AF 17-35mm f/2.8-4 (D)"}, + {39, "Minolta AF 28-75mm f/2.8 (D)"}, + {40, "Minolta/Sony AF DT 18-70mm f/3.5-5.6 (D)"}, + {41, "Minolta/Sony AF DT 11-18mm f/4.5-5.6 (D) or Tamron Lens"}, + {41, "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical IF"}, + {42, "Minolta/Sony AF DT 18-200mm f/3.5-6.3 (D)"}, + {43, "Sony 35mm f/1.4 G (SAL35F14G)"}, + {44, "Sony 50mm f/1.4 (SAL50F14)"}, + {45, "Carl Zeiss Planar T* 85mm f/1.4 ZA (SAL85F14Z)"}, + {46, "Carl Zeiss Vario-Sonnar T* DT 16-80mm f/3.5-4.5 ZA (SAL1680Z)"}, + {47, "Carl Zeiss Sonnar T* 135mm f/1.8 ZA (SAL135F18Z)"}, + {48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM (SAL2470Z) or ZA SSM II"}, + {48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM II (SAL2470Z2)"}, + {49, "Sony DT 55-200mm f/4-5.6 (SAL55200)"}, + {50, "Sony DT 18-250mm f/3.5-6.3 (SAL18250)"}, + {51, "Sony DT 16-105mm f/3.5-5.6 (SAL16105)"}, + {52, "Sony 70-300mm f/4.5-5.6 G SSM (SAL70300G) or G SSM II or Tamron Lens"}, + {52, "Sony 70-300mm f/4.5-5.6 G SSM II (SAL70300G2)"}, + {52, "Tamron SP 70-300mm f/4-5.6 Di USD"}, + {53, "Sony 70-400mm f/4-5.6 G SSM (SAL70400G)"}, + {54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM (SAL1635Z) or ZA SSM II"}, + {54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM II (SAL1635Z2)"}, + {55, "Sony DT 18-55mm f/3.5-5.6 SAM (SAL1855) or SAM II"}, + {55, "Sony DT 18-55mm f/3.5-5.6 SAM II (SAL18552)"}, + {56, "Sony DT 55-200mm f/4-5.6 SAM (SAL55200-2)"}, + {57, "Sony DT 50mm f/1.8 SAM (SAL50F18) or Tamron Lens or Commlite CM-EF-NEX adapter"}, + {57, "Tamron SP AF 60mm f/2 Di II LD [IF] Macro 1:1"}, + {57, "Tamron 18-270mm f/3.5-6.3 Di II PZD"}, + {58, "Sony DT 30mm f/2.8 Macro SAM (SAL30M28)"}, + {59, "Sony 28-75mm f/2.8 SAM (SAL2875)"}, + {60, "Carl Zeiss Distagon T* 24mm f/2 ZA SSM (SAL24F20Z)"}, + {61, "Sony 85mm f/2.8 SAM (SAL85F28)"}, + {62, "Sony DT 35mm f/1.8 SAM (SAL35F18)"}, + {63, "Sony DT 16-50mm f/2.8 SSM (SAL1650)"}, + {64, "Sony 500mm f/4 G SSM (SAL500F40G)"}, + {65, "Sony DT 18-135mm f/3.5-5.6 SAM (SAL18135)"}, + {66, "Sony 300mm f/2.8 G SSM II (SAL300F28G2)"}, + {67, "Sony 70-200mm f/2.8 G SSM II (SAL70200G2)"}, + {68, "Sony DT 55-300mm f/4.5-5.6 SAM (SAL55300)"}, + {69, "Sony 70-400mm f/4-5.6 G SSM II (SAL70400G2)"}, + {70, "Carl Zeiss Planar T* 50mm f/1.4 ZA SSM (SAL50F14Z)"}, + {128, "Tamron or Sigma Lens (128)"}, + {128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro"}, + {128, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro"}, + {128, "Tamron 80-300mm f/3.5-6.3"}, + {128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical [IF] Macro"}, + {128, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF"}, + {128, "Sigma AF 50-150mm f/2.8 EX DC APO HSM II"}, + {128, "Sigma 10-20mm f/3.5 EX DC HSM"}, + {128, "Sigma 70-200mm f/2.8 II EX DG APO MACRO HSM"}, + {128, "Sigma 10mm f/2.8 EX DC HSM Fisheye"}, + {128, "Sigma 50mm f/1.4 EX DG HSM"}, + {128, "Sigma 85mm f/1.4 EX DG HSM"}, + {128, "Sigma 24-70mm f/2.8 IF EX DG HSM"}, + {128, "Sigma 18-250mm f/3.5-6.3 DC OS HSM"}, + {128, "Sigma 17-50mm f/2.8 EX DC HSM"}, + {128, "Sigma 17-70mm f/2.8-4 DC Macro HSM"}, + {128, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro"}, + {128, "Sigma 150-500mm f/5-6.3 APO DG OS HSM"}, + {128, "Tamron AF 28-105mm f/4-5.6 [IF]"}, + {128, "Sigma 35mm f/1.4 DG HSM"}, + {128, "Sigma 18-35mm f/1.8 DC HSM"}, + {128, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM"}, + {129, "Tamron Lens (129)"}, + {129, "Tamron 200-400mm f/5.6 LD"}, + {129, "Tamron 70-300mm f/4-5.6 LD"}, + {131, "Tamron 20-40mm f/2.7-3.5 SP Aspherical IF"}, + {135, "Vivitar 28-210mm f/3.5-5.6"}, + {136, "Tokina EMZ M100 AF 100mm f/3.5"}, + {137, "Cosina 70-210mm f/2.8-4 AF"}, + {138, "Soligor 19-35mm f/3.5-4.5"}, + {139, "Tokina AF 28-300mm f/4-6.3"}, + {142, "Voigtlander 70-300mm f/4.5-5.6"}, + {146, "Voigtlander Macro APO-Lanthar 125mm f/2.5 SL"}, + {194, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical [IF]"}, + {203, "Tamron SP 70-200mm f/2.8 Di USD"}, + {204, "Tamron SP 24-70mm f/2.8 Di USD"}, + {213, "Tamron 16-300mm f/3.5-6.3 Di II PZD"}, + {214, "Tamron SP 150-600mm f/5-6.3 Di USD"}, + {224, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD"}, + {255, "Tamron Lens (255)"}, + {255, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical"}, + {255, "Tamron AF 18-250mm f/3.5-6.3 XR Di II LD"}, + {255, "Tamron AF 55-200mm f/4-5.6 Di II LD Macro"}, + {255, "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2"}, + {255, "Tamron SP AF 200-500mm f/5.0-6.3 Di LD IF"}, + {255, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical IF"}, + {255, "Tamron SP AF 70-200mm f/2.8 Di LD IF Macro"}, + {255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical IF"}, + {255, "Tamron AF 90-300mm f/4.5-5.6 Telemacro"}, + {1868, "Sigma MC-11 Adapter"}, + {2550, "Minolta AF 50mm f/1.7"}, + {2551, "Minolta AF 35-70mm f/4 or Other Lens"}, + {2551, "Sigma UC AF 28-70mm f/3.5-4.5"}, + {2551, "Sigma AF 28-70mm f/2.8"}, + {2551, "Sigma M-AF 70-200mm f/2.8 EX Aspherical"}, + {2551, "Quantaray M-AF 35-80mm f/4-5.6"}, + {2551, "Tokina 28-70mm f/2.8-4.5 AF"}, + {2552, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens"}, + {2552, "Tokina 19-35mm f/3.5-4.5"}, + {2552, "Tokina 28-70mm f/2.8 AT-X"}, + {2552, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840"}, + {2552, "Tokina AF PRO 28-80mm f/2.8 AT-X 280"}, + {2552, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270"}, + {2552, "Tamron AF 19-35mm f/3.5-4.5"}, + {2552, "Angenieux AF 28-70mm f/2.6"}, + {2552, "Tokina AT-X 17 AF 17mm f/3.5"}, + {2552, "Tokina 20-35mm f/3.5-4.5 II AF"}, + {2553, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"}, + {2553, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"}, + {2553, "Sigma 28-105mm f/2.8-4 Aspherical"}, + {2553, "Sigma 28-105mm f/4-5.6 UC"}, + {2554, "Minolta AF 35-105mm f/3.5-4.5"}, + {2555, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"}, + {2555, "Sigma 70-210mm f/4-5.6 APO"}, + {2555, "Sigma M-AF 70-200mm f/2.8 EX APO"}, + {2555, "Sigma 75-200mm f/2.8-3.5"}, + {2556, "Minolta AF 135mm f/2.8"}, + {2557, "Minolta/Sony AF 28mm f/2.8"}, + {2558, "Minolta AF 24-50mm f/4"}, + {2560, "Minolta AF 100-200mm f/4.5"}, + {2561, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens"}, + {2561, "Sigma 70-300mm f/4-5.6 DL Macro"}, + {2561, "Sigma 300mm f/4 APO Macro"}, + {2561, "Sigma AF 500mm f/4.5 APO"}, + {2561, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {2561, "Tokina AT-X AF 300mm f/4"}, + {2561, "Tokina AT-X AF 400mm f/5.6 SD"}, + {2561, "Tokina AF 730 II 75-300mm f/4.5-5.6"}, + {2561, "Sigma 800mm f/5.6 APO"}, + {2561, "Sigma AF 400mm f/5.6 APO Macro"}, + {2562, "Minolta AF 50mm f/1.4 [New]"}, + {2563, "Minolta AF 300mm f/2.8 APO or Sigma Lens"}, + {2563, "Sigma AF 50-500mm f/4-6.3 EX DG APO"}, + {2563, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {2563, "Sigma AF 500mm f/4.5 EX DG APO"}, + {2563, "Sigma 400mm f/5.6 APO"}, + {2564, "Minolta AF 50mm f/2.8 Macro or Sigma Lens"}, + {2564, "Sigma 50mm f/2.8 EX Macro"}, + {2565, "Minolta AF 600mm f/4 APO"}, + {2566, "Minolta AF 24mm f/2.8 or Sigma Lens"}, + {2566, "Sigma 17-35mm f/2.8-4 EX Aspherical"}, + {2572, "Minolta/Sony AF 500mm f/8 Reflex"}, + {2578, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens"}, + {2578, "Sigma 8mm f/4 EX [DG] Fisheye"}, + {2578, "Sigma 14mm f/3.5"}, + {2578, "Sigma 15mm f/2.8 Fisheye"}, + {2579, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens"}, + {2579, "Tokina AT-X Pro DX 11-16mm f/2.8"}, + {2581, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens"}, + {2581, "Sigma AF 90mm f/2.8 Macro"}, + {2581, "Sigma AF 105mm f/2.8 EX [DG] Macro"}, + {2581, "Sigma 180mm f/5.6 Macro"}, + {2581, "Sigma 180mm f/3.5 EX DG Macro"}, + {2581, "Tamron 90mm f/2.8 Macro"}, + {2585, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens"}, + {2585, "Beroflex 35-135mm f/3.5-4.5"}, + {2585, "Tamron 24-135mm f/3.5-5.6"}, + {2588, "Minolta AF 70-210mm f/3.5-4.5"}, + {2589, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens"}, + {2589, "Tokina 80-200mm f/2.8"}, + {2590, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x"}, + {2590, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO"}, + {2591, "Minolta AF 35mm f/1.4"}, + {2592, "Minolta AF 85mm f/1.4 G (D)"}, + {2593, "Minolta AF 200mm f/2.8 APO"}, + {2594, "Minolta AF 3x-1x f/1.7-2.8 Macro"}, + {2596, "Minolta AF 28mm f/2"}, + {2597, "Minolta AF 35mm f/2 [New]"}, + {2598, "Minolta AF 100mm f/2"}, + {2601, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x"}, + {2601, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO"}, + {2604, "Minolta AF 80-200mm f/4.5-5.6"}, + {2605, "Minolta AF 35-80mm f/4-5.6"}, + {2606, "Minolta AF 100-300mm f/4.5-5.6"}, + {2607, "Minolta AF 35-80mm f/4-5.6"}, + {2608, "Minolta AF 300mm f/2.8 HS-APO G"}, + {2609, "Minolta AF 600mm f/4 HS-APO G"}, + {2612, "Minolta AF 200mm f/2.8 HS-APO G"}, + {2613, "Minolta AF 50mm f/1.7 New"}, + {2615, "Minolta AF 28-105mm f/3.5-4.5 xi"}, + {2616, "Minolta AF 35-200mm f/4.5-5.6 xi"}, + {2618, "Minolta AF 28-80mm f/4-5.6 xi"}, + {2619, "Minolta AF 80-200mm f/4.5-5.6 xi"}, + {2620, "Minolta AF 28-70mm f/2.8 G"}, + {2621, "Minolta AF 100-300mm f/4.5-5.6 xi"}, + {2624, "Minolta AF 35-80mm f/4-5.6 Power Zoom"}, + {2628, "Minolta AF 80-200mm f/2.8 HS-APO G"}, + {2629, "Minolta AF 85mm f/1.4 New"}, + {2631, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO"}, + {2632, "Minolta AF 24-50mm f/4 New"}, + {2638, "Minolta AF 50mm f/2.8 Macro New"}, + {2639, "Minolta AF 100mm f/2.8 Macro"}, + {2641, "Minolta/Sony AF 20mm f/2.8 New"}, + {2642, "Minolta AF 24mm f/2.8 New"}, + {2644, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {2662, "Minolta AF 50mm f/1.4 New"}, + {2667, "Minolta AF 35mm f/2 New"}, + {2668, "Minolta AF 28mm f/2 New"}, + {2672, "Minolta AF 24-105mm f/3.5-4.5 (D)"}, + {3046, "Metabones Canon EF Speed Booster"}, + {4567, "Tokina 70-210mm f/4-5.6"}, + {4571, "Vivitar 70-210mm f/4.5-5.6"}, + {4574, "2x Teleconverter or Tamron or Tokina Lens"}, + {4574, "Tamron SP AF 90mm f/2.5"}, + {4574, "Tokina RF 500mm f/8.0 x2"}, + {4574, "Tokina 300mm f/2.8 x2"}, + {4575, "1.4x Teleconverter"}, + {4585, "Tamron SP AF 300mm f/2.8 LD IF"}, + {4586, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF"}, + {4587, "Tamron AF 70-210mm f/2.8 SP LD"}, + {4812, "Metabones Canon EF Speed Booster Ultra"}, + {6118, "Canon EF Adapter"}, + {6553, "E-Mount, T-Mount, Other Lens or no lens"}, + {6553, "Sony E 16mm f/2.8"}, + {6553, "Sony E 18-55mm f/3.5-5.6 OSS"}, + {6553, "Sony E 55-210mm f/4.5-6.3 OSS"}, + {6553, "Sony E 18-200mm f/3.5-6.3 OSS"}, + {6553, "Sony E 30mm f/3.5 Macro"}, + {6553, "Sony E 24mm f/1.8 ZA"}, + {6553, "Sony E 50mm f/1.8 OSS"}, + {6553, "Sony E 16-70mm f/4 ZA OSS"}, + {6553, "Sony E 10-18mm f/4 OSS"}, + {6553, "Sony E PZ 16-50mm f/3.5-5.6 OSS"}, + {6553, "Sony FE 35mm f/2.8 ZA"}, + {6553, "Sony FE 24-70mm f/4 ZA OSS"}, + {6553, "Sony E 18-200mm f/3.5-6.3 OSS LE"}, + {6553, "Sony E 20mm f/2.8"}, + {6553, "Sony E 35mm f/1.8 OSS"}, + {6553, "Sony E PZ 18-105mm f/4 G OSS"}, + {6553, "Sony FE 90mm f/2.8 Macro G OSS"}, + {6553, "Sony E 18-50mm f/4-5.6"}, + {6553, "Sony E PZ 18-200mm f/3.5-6.3 OSS"}, + {6553, "Sony FE 55mm f/1.8 ZA"}, + {6553, "Sony FE 70-200mm f/4 G OSS"}, + {6553, "Sony FE 16-35mm f/4 ZA OSS"}, + {6553, "Sony FE 28-70mm f/3.5-5.6 OSS"}, + {6553, "Sony FE 35mm f/1.4 ZA"}, + {6553, "Sony FE 24-240mm f/3.5-6.3 OSS"}, + {6553, "Sony FE 28mm f/2"}, + {6553, "Sony FE PZ 28-135mm f/4 G OSS"}, + {6553, "Sony FE 24-70mm f/2.8 GM"}, + {6553, "Sony FE 85mm f/1.4 GM"}, + {6553, "Sony FE 50mm f/1.8"}, + {6553, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, + {6553, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, + {6553, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, + {6553, "Sony FE 70-200mm f/2.8 GM OSS"}, + {6553, "Sigma 19mm f/2.8 [EX] DN"}, + {6553, "Sigma 30mm f/2.8 [EX] DN"}, + {6553, "Sigma 60mm f/2.8 DN"}, + {6553, "Sigma 30mm f/1.4 DC DN | C"}, + {6553, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, + {6553, "Zeiss Batis 25mm f/2"}, + {6553, "Zeiss Batis 85mm f/1.8"}, + {6553, "Zeiss Batis 18mm f/2.8"}, + {6553, "Zeiss Loxia 21mm f/2.8"}, + {6553, "Zeiss Loxia 35mm f/2"}, + {6553, "Zeiss Loxia 50mm f/2"}, + {6553, "Zeiss Touit 12mm f/2.8"}, + {6553, "Zeiss Touit 32mm f/1.8"}, + {6553, "Zeiss Touit 50mm f/2.8 Macro"}, + {6553, "Arax MC 35mm f/2.8 Tilt+Shift"}, + {6553, "Arax MC 80mm f/2.8 Tilt+Shift"}, + {6553, "Zenitar MF 16mm f/2.8 Fisheye M42"}, + {6553, "Samyang 500mm Mirror f/8.0"}, + {6553, "Pentacon Auto 135mm f/2.8"}, + {6553, "Pentacon Auto 29mm f/2.8"}, + {6553, "Helios 44-2 58mm f/2.0"}, + {18688, "Sigma MC-11 Adapter"}, + {25501, "Minolta AF 50mm f/1.7"}, + {25511, "Minolta AF 35-70mm f/4 or Other Lens"}, + {25511, "Sigma UC AF 28-70mm f/3.5-4.5"}, + {25511, "Sigma AF 28-70mm f/2.8"}, + {25511, "Sigma M-AF 70-200mm f/2.8 EX Aspherical"}, + {25511, "Quantaray M-AF 35-80mm f/4-5.6"}, + {25511, "Tokina 28-70mm f/2.8-4.5 AF"}, + {25521, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens"}, + {25521, "Tokina 19-35mm f/3.5-4.5"}, + {25521, "Tokina 28-70mm f/2.8 AT-X"}, + {25521, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840"}, + {25521, "Tokina AF PRO 28-80mm f/2.8 AT-X 280"}, + {25521, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270"}, + {25521, "Tamron AF 19-35mm f/3.5-4.5"}, + {25521, "Angenieux AF 28-70mm f/2.6"}, + {25521, "Tokina AT-X 17 AF 17mm f/3.5"}, + {25521, "Tokina 20-35mm f/3.5-4.5 II AF"}, + {25531, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"}, + {25531, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"}, + {25531, "Sigma 28-105mm f/2.8-4 Aspherical"}, + {25531, "Sigma 28-105mm f/4-5.6 UC"}, + {25541, "Minolta AF 35-105mm f/3.5-4.5"}, + {25551, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"}, + {25551, "Sigma 70-210mm f/4-5.6 APO"}, + {25551, "Sigma M-AF 70-200mm f/2.8 EX APO"}, + {25551, "Sigma 75-200mm f/2.8-3.5"}, + {25561, "Minolta AF 135mm f/2.8"}, + {25571, "Minolta/Sony AF 28mm f/2.8"}, + {25581, "Minolta AF 24-50mm f/4"}, + {25601, "Minolta AF 100-200mm f/4.5"}, + {25611, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens"}, + {25611, "Sigma 70-300mm f/4-5.6 DL Macro"}, + {25611, "Sigma 300mm f/4 APO Macro"}, + {25611, "Sigma AF 500mm f/4.5 APO"}, + {25611, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {25611, "Tokina AT-X AF 300mm f/4"}, + {25611, "Tokina AT-X AF 400mm f/5.6 SD"}, + {25611, "Tokina AF 730 II 75-300mm f/4.5-5.6"}, + {25611, "Sigma 800mm f/5.6 APO"}, + {25611, "Sigma AF 400mm f/5.6 APO Macro"}, + {25621, "Minolta AF 50mm f/1.4 [New]"}, + {25631, "Minolta AF 300mm f/2.8 APO or Sigma Lens"}, + {25631, "Sigma AF 50-500mm f/4-6.3 EX DG APO"}, + {25631, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {25631, "Sigma AF 500mm f/4.5 EX DG APO"}, + {25631, "Sigma 400mm f/5.6 APO"}, + {25641, "Minolta AF 50mm f/2.8 Macro or Sigma Lens"}, + {25641, "Sigma 50mm f/2.8 EX Macro"}, + {25651, "Minolta AF 600mm f/4 APO"}, + {25661, "Minolta AF 24mm f/2.8 or Sigma Lens"}, + {25661, "Sigma 17-35mm f/2.8-4 EX Aspherical"}, + {25721, "Minolta/Sony AF 500mm f/8 Reflex"}, + {25781, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens"}, + {25781, "Sigma 8mm f/4 EX [DG] Fisheye"}, + {25781, "Sigma 14mm f/3.5"}, + {25781, "Sigma 15mm f/2.8 Fisheye"}, + {25791, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens"}, + {25791, "Tokina AT-X Pro DX 11-16mm f/2.8"}, + {25811, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens"}, + {25811, "Sigma AF 90mm f/2.8 Macro"}, + {25811, "Sigma AF 105mm f/2.8 EX [DG] Macro"}, + {25811, "Sigma 180mm f/5.6 Macro"}, + {25811, "Sigma 180mm f/3.5 EX DG Macro"}, + {25811, "Tamron 90mm f/2.8 Macro"}, + {25851, "Beroflex 35-135mm f/3.5-4.5"}, + {25858, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens"}, + {25858, "Tamron 24-135mm f/3.5-5.6"}, + {25881, "Minolta AF 70-210mm f/3.5-4.5"}, + {25891, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens"}, + {25891, "Tokina 80-200mm f/2.8"}, + {25901, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x"}, + {25901, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO"}, + {25911, "Minolta AF 35mm f/1.4"}, + {25921, "Minolta AF 85mm f/1.4 G (D)"}, + {25931, "Minolta AF 200mm f/2.8 APO"}, + {25941, "Minolta AF 3x-1x f/1.7-2.8 Macro"}, + {25961, "Minolta AF 28mm f/2"}, + {25971, "Minolta AF 35mm f/2 [New]"}, + {25981, "Minolta AF 100mm f/2"}, + {26011, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x"}, + {26011, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO"}, + {26041, "Minolta AF 80-200mm f/4.5-5.6"}, + {26051, "Minolta AF 35-80mm f/4-5.6"}, + {26061, "Minolta AF 100-300mm f/4.5-5.6"}, + {26071, "Minolta AF 35-80mm f/4-5.6"}, + {26081, "Minolta AF 300mm f/2.8 HS-APO G"}, + {26091, "Minolta AF 600mm f/4 HS-APO G"}, + {26121, "Minolta AF 200mm f/2.8 HS-APO G"}, + {26131, "Minolta AF 50mm f/1.7 New"}, + {26151, "Minolta AF 28-105mm f/3.5-4.5 xi"}, + {26161, "Minolta AF 35-200mm f/4.5-5.6 xi"}, + {26181, "Minolta AF 28-80mm f/4-5.6 xi"}, + {26191, "Minolta AF 80-200mm f/4.5-5.6 xi"}, + {26201, "Minolta AF 28-70mm f/2.8 G"}, + {26211, "Minolta AF 100-300mm f/4.5-5.6 xi"}, + {26241, "Minolta AF 35-80mm f/4-5.6 Power Zoom"}, + {26281, "Minolta AF 80-200mm f/2.8 HS-APO G"}, + {26291, "Minolta AF 85mm f/1.4 New"}, + {26311, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO"}, + {26321, "Minolta AF 24-50mm f/4 New"}, + {26381, "Minolta AF 50mm f/2.8 Macro New"}, + {26391, "Minolta AF 100mm f/2.8 Macro"}, + {26411, "Minolta/Sony AF 20mm f/2.8 New"}, + {26421, "Minolta AF 24mm f/2.8 New"}, + {26441, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {26621, "Minolta AF 50mm f/1.4 New"}, + {26671, "Minolta AF 35mm f/2 New"}, + {26681, "Minolta AF 28mm f/2 New"}, + {26721, "Minolta AF 24-105mm f/3.5-4.5 (D)"}, + {30464, "Metabones Canon EF Speed Booster"}, + {45671, "Tokina 70-210mm f/4-5.6"}, + {45711, "Vivitar 70-210mm f/4.5-5.6"}, + {45741, "2x Teleconverter or Tamron or Tokina Lens"}, + {45741, "Tamron SP AF 90mm f/2.5"}, + {45741, "Tokina RF 500mm f/8.0 x2"}, + {45741, "Tokina 300mm f/2.8 x2"}, + {45751, "1.4x Teleconverter"}, + {45851, "Tamron SP AF 300mm f/2.8 LD IF"}, + {45861, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF"}, + {45871, "Tamron AF 70-210mm f/2.8 SP LD"}, + {48128, "Metabones Canon EF Speed Booster Ultra"}, + {61184, "Canon EF Adapter"}, + {65535, "E-Mount, T-Mount, Other Lens or no lens"}, + {65535, "Sony E 16mm f/2.8"}, + {65535, "Sony E 18-55mm f/3.5-5.6 OSS"}, + {65535, "Sony E 55-210mm f/4.5-6.3 OSS"}, + {65535, "Sony E 18-200mm f/3.5-6.3 OSS"}, + {65535, "Sony E 30mm f/3.5 Macro"}, + {65535, "Sony E 24mm f/1.8 ZA"}, + {65535, "Sony E 50mm f/1.8 OSS"}, + {65535, "Sony E 16-70mm f/4 ZA OSS"}, + {65535, "Sony E 10-18mm f/4 OSS"}, + {65535, "Sony E PZ 16-50mm f/3.5-5.6 OSS"}, + {65535, "Sony FE 35mm f/2.8 ZA"}, + {65535, "Sony FE 24-70mm f/4 ZA OSS"}, + {65535, "Sony E 18-200mm f/3.5-6.3 OSS LE"}, + {65535, "Sony E 20mm f/2.8"}, + {65535, "Sony E 35mm f/1.8 OSS"}, + {65535, "Sony E PZ 18-105mm f/4 G OSS"}, + {65535, "Sony FE 90mm f/2.8 Macro G OSS"}, + {65535, "Sony E 18-50mm f/4-5.6"}, + {65535, "Sony E PZ 18-200mm f/3.5-6.3 OSS"}, + {65535, "Sony FE 55mm f/1.8 ZA"}, + {65535, "Sony FE 70-200mm f/4 G OSS"}, + {65535, "Sony FE 16-35mm f/4 ZA OSS"}, + {65535, "Sony FE 28-70mm f/3.5-5.6 OSS"}, + {65535, "Sony FE 35mm f/1.4 ZA"}, + {65535, "Sony FE 24-240mm f/3.5-6.3 OSS"}, + {65535, "Sony FE 28mm f/2"}, + {65535, "Sony FE PZ 28-135mm f/4 G OSS"}, + {65535, "Sony FE 24-70mm f/2.8 GM"}, + {65535, "Sony FE 85mm f/1.4 GM"}, + {65535, "Sony FE 50mm f/1.8"}, + {65535, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, + {65535, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, + {65535, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, + {65535, "Sony FE 70-200mm f/2.8 GM OSS"}, + {65535, "Sigma 19mm f/2.8 [EX] DN"}, + {65535, "Sigma 30mm f/2.8 [EX] DN"}, + {65535, "Sigma 60mm f/2.8 DN"}, + {65535, "Sigma 30mm f/1.4 DC DN | C"}, + {65535, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, + {65535, "Zeiss Batis 25mm f/2"}, + {65535, "Zeiss Batis 85mm f/1.8"}, + {65535, "Zeiss Batis 18mm f/2.8"}, + {65535, "Zeiss Loxia 21mm f/2.8"}, + {65535, "Zeiss Loxia 35mm f/2"}, + {65535, "Zeiss Loxia 50mm f/2"}, + {65535, "Zeiss Touit 12mm f/2.8"}, + {65535, "Zeiss Touit 32mm f/1.8"}, + {65535, "Zeiss Touit 50mm f/2.8 Macro"}, + {65535, "Arax MC 35mm f/2.8 Tilt+Shift"}, + {65535, "Arax MC 80mm f/2.8 Tilt+Shift"}, + {65535, "Zenitar MF 16mm f/2.8 Fisheye M42"}, + {65535, "Samyang 500mm Mirror f/8.0"}, + {65535, "Pentacon Auto 135mm f/2.8"}, + {65535, "Pentacon Auto 29mm f/2.8"}, + {65535, "Helios 44-2 58mm f/2.0"} + }; } virtual std::string toString (Tag* t) From e5dba2e890bb922308af55ae012361892675e096 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Fri, 16 Dec 2016 11:38:26 +0100 Subject: [PATCH 106/115] Remove intrusive tooltips, issue #3537 (#3538) * Remove intrusive tooltips - TP_SHARPENING_TOOLTIP * Remove TP_SHARPENING_TOOLTIP from default --- rtdata/languages/default | 1 - rtgui/defringe.cc | 2 -- rtgui/dirpyrequalizer.cc | 2 -- rtgui/sharpening.cc | 2 -- rtgui/sharpenmicro.cc | 2 -- 5 files changed, 9 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index df9aaec7c..5a9f1dd3c 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1784,7 +1784,6 @@ TP_SHARPENING_RLD_AMOUNT;Amount TP_SHARPENING_RLD_DAMPING;Damping TP_SHARPENING_RLD_ITERATIONS;Iterations TP_SHARPENING_THRESHOLD;Threshold -TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. TP_SHARPENING_USM;Unsharp Mask TP_SHARPENMICRO_AMOUNT;Quantity TP_SHARPENMICRO_LABEL;Microcontrast diff --git a/rtgui/defringe.cc b/rtgui/defringe.cc index 5da21185c..8d7287ac1 100644 --- a/rtgui/defringe.cc +++ b/rtgui/defringe.cc @@ -35,8 +35,6 @@ Defringe::Defringe () : FoldableToolPanel(this, "defringe", M("TP_DEFRINGE_LABEL bottomMilestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) ); } - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - curveEditorPF = new CurveEditorGroup (options.lastPFCurvesDir); curveEditorPF->setCurveListener (this); chshape = static_cast(curveEditorPF->addCurve(CT_Flat, M("TP_PFCURVE_CURVEEDITOR_CH"))); diff --git a/rtgui/dirpyrequalizer.cc b/rtgui/dirpyrequalizer.cc index 53b4805ff..262f0f448 100644 --- a/rtgui/dirpyrequalizer.cc +++ b/rtgui/dirpyrequalizer.cc @@ -69,8 +69,6 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", cbVBox->pack_start(*cdbox); pack_start(*cbVBox); - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - Gtk::HBox * buttonBox1 = Gtk::manage (new Gtk::HBox(true, 10)); pack_start(*buttonBox1); diff --git a/rtgui/sharpening.cc b/rtgui/sharpening.cc index 6af30c68b..b83b2c6d9 100644 --- a/rtgui/sharpening.cc +++ b/rtgui/sharpening.cc @@ -25,8 +25,6 @@ using namespace rtengine::procparams; Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENING_LABEL"), true, true) { - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); hb->set_border_width (4); hb->show (); diff --git a/rtgui/sharpenmicro.cc b/rtgui/sharpenmicro.cc index 2ca0ddf44..62e982436 100644 --- a/rtgui/sharpenmicro.cc +++ b/rtgui/sharpenmicro.cc @@ -28,8 +28,6 @@ using namespace rtengine::procparams; SharpenMicro::SharpenMicro () : FoldableToolPanel(this, "sharpenmicro", M("TP_SHARPENMICRO_LABEL"), true, true) { - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - amount = Gtk::manage(new Adjuster (M("TP_SHARPENMICRO_AMOUNT"), 0, 100, 1, 20)); amount->setAdjusterListener (this); From 653f252b9c0bac8366e18e7cb2ebf345d0817d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Fri, 16 Dec 2016 18:14:01 +0100 Subject: [PATCH 107/115] Constify `Wavelet` (#3543) --- rtgui/wavelet.cc | 437 +++++++++++++++++++++++------------------------ rtgui/wavelet.h | 381 +++++++++++++++++++---------------------- 2 files changed, 392 insertions(+), 426 deletions(-) diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index 892d8b8a0..638f4df03 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -27,100 +27,185 @@ using namespace rtengine; using namespace rtengine::procparams; extern Options options; -Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), true, true) +namespace +{ + + GradientMilestone makeHsvGm(double position, float h, float s, float v) + { + float r; + float g; + float b; + Color::hsv2rgb01(h, s, v, r, g, b); + return GradientMilestone(position, r, g, b); + } + + std::vector makeWholeHueRange() + { + std::vector res; + res.reserve(7); + + for (int i = 0; i < 7; ++i) { + const float x = static_cast(i) / 6.0f; + res.push_back(makeHsvGm(x, x, 0.5f, 0.5f)); + } + + return res; + } + +} + +Wavelet::Wavelet() : + FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), true, true), + curveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CONTEDIT"))), + CCWcurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CCURVE"))), + curveEditorRES(new CurveEditorGroup(options.lastWaveletCurvesDir)), + curveEditorGAM(new CurveEditorGroup(options.lastWaveletCurvesDir)), + separatorNeutral(Gtk::manage(new Gtk::HSeparator())), + separatoredge(Gtk::manage(new Gtk::HSeparator())), + opaCurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_COLORT"))), + opacityCurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITY"))), + opacityCurveEditorW(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYW"))), + opacityCurveEditorWL(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYWL"))), + median(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_MEDI")))), + medianlev(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_MEDILEV")))), + linkedg(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_LINKEDG")))), + cbenab(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_CBENAB")))), + lipst(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_LIPST")))), + avoid(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_AVOID")))), + tmr(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_BALCHRO")))), + neutralchButton(Gtk::manage(new Gtk::Button(M("TP_WAVELET_NEUTRAL")))), + rescon(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCON"), -100, 100, 1, 0))), + resconH(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCONH"), -100, 100, 1, 0))), + reschro(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCHRO"), -100, 100, 1, 0))), + tmrs(Gtk::manage(new Adjuster(M("TP_WAVELET_TMSTRENGTH"), -1.0, 2.0, 0.01, 0.0))), + gamma(Gtk::manage(new Adjuster(M("TP_WAVELET_COMPGAMMA"), 0.4, 2.0, 0.01, 1.0))), + sup(Gtk::manage(new Adjuster(M("TP_WAVELET_SUPE"), -100, 350, 1, 0))), + sky(Gtk::manage(new Adjuster(M("TP_WAVELET_SKY"), -100., 100.0, 1., 0.))), + thres(Gtk::manage(new Adjuster(M("TP_WAVELET_LEVELS"), 4, 9, 1, 7))),//3 + chroma(Gtk::manage(new Adjuster(M("TP_WAVELET_CHRO"), 1, 9, 1, 5))), + chro(Gtk::manage(new Adjuster(M("TP_WAVELET_CHR"), 0., 100., 1., 0.))), + contrast(Gtk::manage(new Adjuster(M("TP_WAVELET_CONTRA"), -100, 100, 1, 0))), + thr(Gtk::manage(new Adjuster(M("TP_WAVELET_THR"), 0, 100, 1, 35))), + thrH(Gtk::manage(new Adjuster(M("TP_WAVELET_THRH"), 0, 100, 1, 65))), + skinprotect(Gtk::manage( new Adjuster(M("TP_WAVELET_SKIN"), -100, 100, 1, 0.) )), + edgrad(Gtk::manage( new Adjuster(M("TP_WAVELET_EDRAD"), 0, 100, 1, 15) )), + edgval(Gtk::manage( new Adjuster(M("TP_WAVELET_EDVAL"), 0, 100, 1, 0) )), + edgthresh(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGTHRESH"), -50, 100, 1, 10 ))), + strength(Gtk::manage(new Adjuster(M("TP_WAVELET_STRENGTH"), 0, 100, 1, 100))), + balance(Gtk::manage(new Adjuster(M("TP_WAVELET_BALANCE"), -30, 100, 1, 0))), + iter(Gtk::manage(new Adjuster(M("TP_WAVELET_ITER"), -3, 3, 1, 0))), + hueskin(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HUESKIN"), -314., 314., -5., 25., 170., 120., 0, false))), + hueskin2(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HUESKY"), -314., 314., -260., -250, -130., -140., 0, false))), + hllev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HIGHLIGHT"), 0., 100., 50., 75., 100., 98., 0, false))), + bllev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LOWLIGHT"), 0., 100., 0., 2., 50., 25., 0, false))), + pastlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_PASTEL"), 0., 70., 0., 2., 30., 20., 0, false))), + satlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_SAT"), 0., 130., 30., 45., 130., 100., 0, false))), + edgcont(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_EDGCONT"), 0., 100., bl, tl, br, tr, 0., false))), + level0noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + level1noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + level2noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + level3noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + threshold(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD"), 1, 9, 1, 5))), + threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 4))), + edgedetect(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECT"), 0, 100, 1, 90))), + edgedetectthr(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR"), 0, 100, 1, 20))), + edgedetectthr2(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR2"), -10, 100, 1, 0))), + edgesensi(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGESENSI"), 0, 100, 1, 60))), + edgeampli(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEAMPLI"), 0, 100, 1, 10))), + Lmethod(Gtk::manage(new MyComboBoxText())), + CHmethod(Gtk::manage(new MyComboBoxText())), + CHSLmethod(Gtk::manage(new MyComboBoxText())), + EDmethod(Gtk::manage(new MyComboBoxText())), + BAmethod(Gtk::manage(new MyComboBoxText())), + NPmethod(Gtk::manage(new MyComboBoxText())), + TMmethod(Gtk::manage(new MyComboBoxText())), + HSmethod(Gtk::manage(new MyComboBoxText())), + CLmethod(Gtk::manage(new MyComboBoxText())), + Backmethod(Gtk::manage(new MyComboBoxText())), + Tilesmethod(Gtk::manage(new MyComboBoxText())), + daubcoeffmethod(Gtk::manage(new MyComboBoxText())), + Dirmethod(Gtk::manage(new MyComboBoxText())), + Medgreinf(Gtk::manage(new MyComboBoxText())), + contrastSHFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_APPLYTO")))), + chanMixerHLFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_HIGHLIGHT")))), + chanMixerMidFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_MIDTONES")))), + chanMixerShadowsFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_SHADOWS")))), + wavLabels(Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER))), + daubcoeffLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUB") + ":"))), + labmC(Gtk::manage(new Gtk::Label(M("TP_WAVELET_CTYPE") + ":"))), + labmch(Gtk::manage(new Gtk::Label(M("TP_WAVELET_CHTYPE") + ":"))), + labmED(Gtk::manage(new Gtk::Label(M("TP_WAVELET_EDTYPE") + ":"))), + labmTM(Gtk::manage(new Gtk::Label(M("TP_WAVELET_TMTYPE") + ":"))), + labmBA(Gtk::manage(new Gtk::Label(M("TP_WAVELET_BATYPE") + ":"))), + labmNP(Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":"))), + labmedgr(Gtk::manage(new Gtk::Label(M("TP_WAVELET_MEDGREINF") + ":"))), + expchroma(new MyExpander(true, M("TP_WAVELET_LEVCH"))), + expcontrast(new MyExpander(true, M("TP_WAVELET_LEVF"))), + expedge(new MyExpander(true, M("TP_WAVELET_EDGE"))), + expfinal(new MyExpander(true, M("TP_WAVELET_FINAL"))), + expgamut(new MyExpander(false, M("TP_WAVELET_CONTR"))), + expnoise(new MyExpander(true, M("TP_WAVELET_NOISE"))), + expresid(new MyExpander(true, M("TP_WAVELET_RESID"))), + expsettings(new MyExpander(false, M("TP_WAVELET_SETTINGS"))), + exptoning(new MyExpander(true, M("TP_WAVELET_TON"))), + ctboxCH(Gtk::manage(new Gtk::HBox())), + ctboxED(Gtk::manage(new Gtk::HBox())), + ctboxTM(Gtk::manage(new Gtk::HBox())), + backgroundHBox(Gtk::manage(new Gtk::HBox())), + daubcoeffHBox(Gtk::manage(new Gtk::HBox())), + levdirMainHBox(Gtk::manage(new Gtk::HBox())), + levdirSubHBox(Gtk::manage(new Gtk::HBox())), + tilesizeHBox(Gtk::manage(new Gtk::HBox())), + ctboxFI(Gtk::manage(new Gtk::HBox())), + ctboxNP(Gtk::manage(new Gtk::HBox())), + ctboxch(Gtk::manage(new Gtk::HBox())), + edbox(Gtk::manage(new Gtk::HBox())), + eddebox(Gtk::manage(new Gtk::HBox())), + settingsVBox(Gtk::manage(new Gtk::VBox())), + contrastSHVBox(Gtk::manage(new Gtk::VBox)), + tilesizeLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_TILESIZE") + ":"))), + levdirMainLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_PROC") + ":"))), + backgroundLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_BACKGROUND") + ":"))), + neutral(Gtk::manage(new Gtk::Button(M("TP_COLORTONING_NEUTRAL")))), + neutrHBox(Gtk::manage(new Gtk::HBox())) { - std::vector milestones; CurveListener::setMulti(true); nextnlevel = 7.; - float r, g, b; - //from -PI to +PI (radians) convert to hsv and draw bottombar - Color::hsv2rgb01(0.4199, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.0 , r, g, b) ); // hsv: 0.4199 rad: -3.14 - Color::hsv2rgb01(0.5000, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.054 , r, g, b) ); // hsv: 0.5 rad: -2.8 - Color::hsv2rgb01(0.6000, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.1336, r, g, b) ); // hsv: 0.60 rad: -2.3 - Color::hsv2rgb01(0.7500, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.3567, r, g, b) ); // hsv: 0.75 rad: -0.9 - Color::hsv2rgb01(0.8560, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.4363, r, g, b) ); // hsv: 0.856 rad: -0.4 - Color::hsv2rgb01(0.9200, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.4841, r, g, b) ); // hsv: 0.92 rad: -0.1 - Color::hsv2rgb01(0.9300, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.5000, r, g, b) ); // hsv: 0.93 rad: 0 - Color::hsv2rgb01(0.9600, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.5366, r, g, b) ); // hsv: 0.96 rad: 0.25 - Color::hsv2rgb01(1.0000, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.5955, r, g, b) ); // hsv: 1. rad: 0.6 - Color::hsv2rgb01(0.0675, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.6911, r, g, b) ); // hsv: 0.0675 rad: 1.2 - Color::hsv2rgb01(0.0900, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.7229, r, g, b) ); // hsv: 0.09 rad: 1.4 - Color::hsv2rgb01(0.1700, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.7707, r, g, b) ); // hsv: 0.17 rad: 1.7 - Color::hsv2rgb01(0.2650, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.8503, r, g, b) ); // hsv: 0.265 rad: 2.1 - Color::hsv2rgb01(0.3240, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.8981, r, g, b) ); // hsv: 0.324 rad: 2.5 - Color::hsv2rgb01(0.4197, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(1. , r, g, b) ); // hsv: 0.419 rad: 3.14 - std::vector milestones2; - milestones2.push_back( GradientMilestone(0.0, 0.0, 0.0, 0.0) ); - milestones2.push_back( GradientMilestone(1.0, 1.0, 1.0, 1.0) ); - - std::vector defaultCurve; - - expsettings = new MyExpander (false, M("TP_WAVELET_SETTINGS")); expsettings->signal_button_release_event().connect_notify( sigc::bind( sigc::mem_fun(this, &Wavelet::foldAllButMe), expsettings) ); - expcontrast = new MyExpander (true, M("TP_WAVELET_LEVF")); expcontrast->signal_button_release_event().connect_notify( sigc::bind( sigc::mem_fun(this, &Wavelet::foldAllButMe), expcontrast) ); enableContrastConn = expcontrast->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expcontrast) ); - expchroma = new MyExpander (true, M("TP_WAVELET_LEVCH")); expchroma->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expchroma) ); enableChromaConn = expchroma->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expchroma) ); - exptoning = new MyExpander (true, M("TP_WAVELET_TON")); exptoning->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), exptoning) ); enableToningConn = exptoning->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), exptoning) ); - expnoise = new MyExpander (true, M("TP_WAVELET_NOISE")); expnoise->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expnoise) ); enableNoiseConn = expnoise->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expnoise) ); - expedge = new MyExpander (true, M("TP_WAVELET_EDGE")); expedge->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expedge) ); enableEdgeConn = expedge->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expedge) ); - expgamut = new MyExpander (false, M("TP_WAVELET_CONTR")); expgamut->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expgamut) ); - expresid = new MyExpander (true, M("TP_WAVELET_RESID")); expresid->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expresid) ); enableResidConn = expresid->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expresid) ); - expfinal = new MyExpander (true, M("TP_WAVELET_FINAL")); expfinal->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expfinal) ); enableFinalConn = expfinal->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expfinal) ); // Wavelet Settings - settingsVBox = Gtk::manage (new Gtk::VBox()); settingsVBox->set_border_width(4); settingsVBox->set_spacing(2); - strength = Gtk::manage (new Adjuster (M("TP_WAVELET_STRENGTH"), 0, 100, 1, 100)); strength->setAdjusterListener (this); - thres = Gtk::manage (new Adjuster (M("TP_WAVELET_LEVELS"), 4, 9, 1, 7));//3 thres->set_tooltip_text (M("TP_WAVELET_LEVELS_TOOLTIP")); thres->setAdjusterListener (this); - tilesizeHBox = Gtk::manage (new Gtk::HBox()); - tilesizeLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_TILESIZE") + ":")); - //tilesizeLabel->set_alignment(Gtk::ALIGN_START); - Tilesmethod = Gtk::manage (new MyComboBoxText ()); Tilesmethod->append_text (M("TP_WAVELET_TILESFULL")); Tilesmethod->append_text (M("TP_WAVELET_TILESBIG")); Tilesmethod->append_text (M("TP_WAVELET_TILESLIT")); @@ -129,9 +214,6 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), tilesizeHBox->pack_start(*tilesizeLabel, Gtk::PACK_SHRINK, 4); tilesizeHBox->pack_start(*Tilesmethod); - daubcoeffHBox = Gtk::manage (new Gtk::HBox()); - daubcoeffLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_DAUB") + ":")); - daubcoeffmethod = Gtk::manage (new MyComboBoxText ()); daubcoeffmethod->set_sensitive(true); daubcoeffmethod->append_text (M("TP_WAVELET_DAUB2")); daubcoeffmethod->append_text (M("TP_WAVELET_DAUB4")); @@ -143,29 +225,21 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), daubcoeffHBox->pack_start(*daubcoeffLabel, Gtk::PACK_SHRINK, 4); daubcoeffHBox->pack_start(*daubcoeffmethod); - backgroundHBox = Gtk::manage (new Gtk::HBox()); - Backmethod = Gtk::manage (new MyComboBoxText ()); Backmethod->append_text (M("TP_WAVELET_B0")); Backmethod->append_text (M("TP_WAVELET_B1")); Backmethod->append_text (M("TP_WAVELET_B2")); Backmethodconn = Backmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::BackmethodChanged) ); - backgroundLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_BACKGROUND") + ":")); backgroundHBox->pack_start(*backgroundLabel, Gtk::PACK_SHRINK, 4); backgroundHBox->pack_start(*Backmethod); - levdirMainHBox = Gtk::manage (new Gtk::HBox()); - CLmethod = Gtk::manage (new MyComboBoxText ()); CLmethod->append_text (M("TP_WAVELET_LEVDIR_ONE")); CLmethod->append_text (M("TP_WAVELET_LEVDIR_INF")); CLmethod->append_text (M("TP_WAVELET_LEVDIR_SUP")); CLmethod->append_text (M("TP_WAVELET_LEVDIR_ALL")); CLmethodconn = CLmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CLmethodChanged) ); - levdirMainLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_PROC") + ":")); levdirMainHBox->pack_start(*levdirMainLabel, Gtk::PACK_SHRINK, 4); levdirMainHBox->pack_start(*CLmethod); //same - levdirSubHBox = Gtk::manage (new Gtk::HBox()); - Lmethod = Gtk::manage (new MyComboBoxText ()); Lmethod->set_sensitive(false); Lmethod->set_sensitive(false); Lmethod->append_text (M("TP_WAVELET_1")); @@ -180,7 +254,6 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), Lmethod->append_text (M("TP_WAVELET_SUPE")); Lmethod->append_text (M("TP_WAVELET_RESID")); Lmethod->set_active(0); - Dirmethod = Gtk::manage (new MyComboBoxText ()); Dirmethod->set_sensitive(false); Dirmethod->append_text (M("TP_WAVELET_DONE")); Dirmethod->append_text (M("TP_WAVELET_DTWO")); @@ -200,24 +273,23 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), settingsVBox->pack_start(*levdirSubHBox); // Contrast - Gtk::VBox * levBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const levBox = Gtk::manage (new Gtk::VBox()); levBox->set_border_width(4); levBox->set_spacing(2); - Gtk::HBox * buttonBox = Gtk::manage (new Gtk::HBox(true, 10)); - wavLabels = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER)); + Gtk::HBox* const buttonBox = Gtk::manage (new Gtk::HBox(true, 10)); levBox->pack_start(*buttonBox, Gtk::PACK_SHRINK, 2); - Gtk::Button * contrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_MINUS"))); + Gtk::Button* const contrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_MINUS"))); buttonBox->pack_start(*contrastMinusButton); contrastMinusPressedConn = contrastMinusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastMinusPressed)); - Gtk::Button * neutralButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL"))); + Gtk::Button* const neutralButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL"))); buttonBox->pack_start(*neutralButton); neutralPressedConn = neutralButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutralPressed)); - Gtk::Button * contrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_PLUS"))); + Gtk::Button* const contrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_PLUS"))); buttonBox->pack_start(*contrastPlusButton); contrastPlusPressedConn = contrastPlusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastPlusPressed)); @@ -244,35 +316,32 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), levBox->pack_start(*correction[i]); } - sup = Gtk::manage (new Adjuster (M("TP_WAVELET_SUPE"), -100, 350, 1, 0)); levBox->pack_start(*sup); sup->setAdjusterListener (this); wavLabels->show(); levBox->pack_start (*wavLabels); - contrastSHFrame = Gtk::manage (new Gtk::Frame (M("TP_WAVELET_APPLYTO"))); - contrastSHVBox = Gtk::manage (new Gtk::VBox); contrastSHVBox->set_border_width(4); contrastSHVBox->set_spacing(2); - HSmethod = Gtk::manage (new MyComboBoxText ()); HSmethod->append_text (M("TP_WAVELET_HS1")); HSmethod->append_text (M("TP_WAVELET_HS2")); HSmethodconn = HSmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::HSmethodChanged) ); - hllev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_HIGHLIGHT"), 0., 100., 50., 75., 100., 98., 0, false)); + const std::vector milestones2 = { + GradientMilestone(0.0, 0.0, 0.0, 0.0), + GradientMilestone(1.0, 1.0, 1.0, 1.0) + }; + hllev->setAdjusterListener (this); hllev->setBgGradient(milestones2); - threshold = Gtk::manage (new Adjuster (M("TP_WAVELET_THRESHOLD"), 1, 9, 1, 5)); threshold->setAdjusterListener (this); threshold->set_tooltip_text (M("TP_WAVELET_THRESHOLD_TOOLTIP")); - bllev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LOWLIGHT"), 0., 100., 0., 2., 50., 25., 0, false)); bllev->setAdjusterListener (this); bllev->setBgGradient(milestones2); - threshold2 = Gtk::manage (new Adjuster (M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 4)); threshold2->setAdjusterListener (this); threshold2->set_tooltip_text (M("TP_WAVELET_THRESHOLD2_TOOLTIP")); @@ -285,15 +354,12 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), levBox->pack_start(*contrastSHFrame); // Chromaticity - Gtk::VBox * chBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chBox = Gtk::manage (new Gtk::VBox()); chBox->set_border_width(4); chBox->set_spacing(2); - ctboxch = Gtk::manage (new Gtk::HBox ()); - labmch = Gtk::manage (new Gtk::Label (M("TP_WAVELET_CHTYPE") + ":")); ctboxch->pack_start (*labmch, Gtk::PACK_SHRINK, 1); - CHmethod = Gtk::manage (new MyComboBoxText ()); CHmethod->append_text (M("TP_WAVELET_CH1")); CHmethod->append_text (M("TP_WAVELET_CH2")); CHmethod->append_text (M("TP_WAVELET_CH3")); @@ -301,44 +367,35 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), ctboxch->pack_start(*CHmethod); chBox->pack_start(*ctboxch); - ctboxCH = Gtk::manage (new Gtk::HBox ()); - labmC = Gtk::manage (new Gtk::Label (M("TP_WAVELET_CTYPE") + ":")); ctboxCH->pack_start (*labmC, Gtk::PACK_SHRINK, 1); - CHSLmethod = Gtk::manage (new MyComboBoxText ()); CHSLmethod->append_text (M("TP_WAVELET_CHSL")); CHSLmethod->append_text (M("TP_WAVELET_CHCU")); CHSLmethodconn = CHSLmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CHSLmethodChanged) ); ctboxCH->pack_start(*CHSLmethod); - Gtk::HSeparator *separatorChromaMethod = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorChromaMethod = Gtk::manage (new Gtk::HSeparator()); chBox->pack_start(*separatorChromaMethod, Gtk::PACK_SHRINK, 2); - chroma = Gtk::manage (new Adjuster (M("TP_WAVELET_CHRO"), 1, 9, 1, 5)); chroma->set_tooltip_text (M("TP_WAVELET_CHRO_TOOLTIP")); chBox->pack_start(*chroma); chroma->setAdjusterListener (this); - satlev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_SAT"), 0., 130., 30., 45., 130., 100., 0, false)); satlev->setAdjusterListener (this); satlev->setBgGradient(milestones2); - pastlev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_PASTEL"), 0., 70., 0., 2., 30., 20., 0, false)); pastlev->setAdjusterListener (this); pastlev->setBgGradient(milestones2); chBox->pack_start(*pastlev); chBox->pack_start(*satlev); - chro = Gtk::manage (new Adjuster (M("TP_WAVELET_CHR"), 0., 100., 1., 0.)); chro->set_tooltip_text (M("TP_WAVELET_CHR_TOOLTIP")); chBox->pack_start(*chro); chro->setAdjusterListener (this); - Gtk::HBox * buttonchBox = Gtk::manage (new Gtk::HBox(true, 10)); - neutralchButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL"))); + Gtk::HBox* const buttonchBox = Gtk::manage (new Gtk::HBox(true, 10)); neutralchPressedConn = neutralchButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutralchPressed)); - separatorNeutral = Gtk::manage (new Gtk::HSeparator()); chBox->pack_start(*separatorNeutral, Gtk::PACK_SHRINK, 2); buttonchBox->pack_start(*neutralchButton); buttonchBox->show_all_children(); @@ -366,13 +423,14 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), } // Toning - Gtk::VBox * tonBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const tonBox = Gtk::manage (new Gtk::VBox()); tonBox->set_border_width(4); tonBox->set_spacing(2); - opaCurveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_COLORT")); opaCurveEditorG->setCurveListener (this); + std::vector defaultCurve; + rtengine::WaveletParams::getDefaultOpacityCurveRG(defaultCurve); opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); opacityShapeRG->setIdentityValue(0.); @@ -383,7 +441,6 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), tonBox->pack_start( *opaCurveEditorG, Gtk::PACK_SHRINK, 2); - opacityCurveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITY")); opacityCurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveBY(defaultCurve); @@ -397,28 +454,23 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), tonBox->pack_start( *opacityCurveEditorG, Gtk::PACK_SHRINK, 2); // Denoise and Refine - Gtk::VBox * noiseBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const noiseBox = Gtk::manage (new Gtk::VBox()); noiseBox->set_border_width(4); noiseBox->set_spacing(2); - linkedg = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_LINKEDG"))); linkedg->set_active (true); linkedgConn = linkedg->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::linkedgToggled) ); noiseBox->pack_start(*linkedg); - level0noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level0noise->setAdjusterListener (this); level0noise->setUpdatePolicy(RTUP_DYNAMIC); - level1noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level1noise->setAdjusterListener (this); level1noise->setUpdatePolicy(RTUP_DYNAMIC); - level2noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level2noise->setAdjusterListener (this); level2noise->setUpdatePolicy(RTUP_DYNAMIC); - level3noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false)); level3noise->setAdjusterListener (this); level3noise->setUpdatePolicy(RTUP_DYNAMIC); @@ -428,29 +480,23 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), noiseBox->pack_start( *level3noise, Gtk::PACK_SHRINK, 0); // Edge Sharpness - Gtk::VBox * edgBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const edgBox = Gtk::manage (new Gtk::VBox()); edgBox->set_border_width(4); edgBox->set_spacing(2); - edgval = Gtk::manage ( new Adjuster (M("TP_WAVELET_EDVAL"), 0, 100, 1, 0) ); edgval->setAdjusterListener(this); edgBox->pack_start(*edgval); - edgrad = Gtk::manage ( new Adjuster (M("TP_WAVELET_EDRAD"), 0, 100, 1, 15) ); edgrad->setAdjusterListener(this); edgBox->pack_start(*edgrad); edgrad->set_tooltip_markup (M("TP_WAVELET_EDRAD_TOOLTIP")); - edgthresh = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGTHRESH"), -50, 100, 1, 10 )); edgthresh->setAdjusterListener (this); edgthresh->set_tooltip_markup (M("TP_WAVELET_EDGTHRESH_TOOLTIP")); edgBox->pack_start (*edgthresh); - edbox = Gtk::manage (new Gtk::HBox ()); - labmedgr = Gtk::manage (new Gtk::Label (M("TP_WAVELET_MEDGREINF") + ":")); edbox->pack_start (*labmedgr, Gtk::PACK_SHRINK, 1); - Medgreinf = Gtk::manage (new MyComboBoxText ()); Medgreinf->append_text (M("TP_WAVELET_RE1")); Medgreinf->append_text (M("TP_WAVELET_RE2")); Medgreinf->append_text (M("TP_WAVELET_RE3")); @@ -459,14 +505,11 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), edbox->pack_start(*Medgreinf); edgBox->pack_start(*edbox); - Gtk::HSeparator *separatorlc = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorlc = Gtk::manage (new Gtk::HSeparator()); edgBox->pack_start(*separatorlc, Gtk::PACK_SHRINK, 2); - ctboxED = Gtk::manage (new Gtk::HBox ()); - labmED = Gtk::manage (new Gtk::Label (M("TP_WAVELET_EDTYPE") + ":")); ctboxED->pack_start (*labmED, Gtk::PACK_SHRINK, 1); - EDmethod = Gtk::manage (new MyComboBoxText ()); EDmethod->append_text (M("TP_WAVELET_EDSL")); EDmethod->append_text (M("TP_WAVELET_EDCU")); EDmethodconn = EDmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::EDmethodChanged) ); @@ -477,13 +520,11 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), tl = options.rtSettings.top_left; bl = options.rtSettings.bot_left; - edgcont = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_EDGCONT"), 0., 100., bl, tl, br, tr, 0., false)); edgcont->setAdjusterListener (this); edgcont->setBgGradient(milestones2); edgcont->set_tooltip_markup (M("TP_WAVELET_EDGCONT_TOOLTIP")); // <-- Edge Sharpness Local Contrast curve - CCWcurveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_CCURVE")); CCWcurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultCCWCurve(defaultCurve); @@ -500,66 +541,51 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), edgBox->pack_start (*edgcont); edgBox->pack_start(*CCWcurveEditorG, Gtk::PACK_SHRINK, 4); - medianlev = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_MEDILEV"))); medianlev->set_active (true); medianlevConn = medianlev->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::medianlevToggled) ); medianlev->set_tooltip_text (M("TP_WAVELET_MEDILEV_TOOLTIP")); - Gtk::HSeparator *separatored1 = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatored1 = Gtk::manage (new Gtk::HSeparator()); edgBox->pack_start(*separatored1, Gtk::PACK_SHRINK, 2); - eddebox = Gtk::manage (new Gtk::HBox ()); - edgBox->pack_start (*eddebox); edgBox->pack_start(*medianlev); - edgedetect = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEDETECT"), 0, 100, 1, 90)); edgedetect->setAdjusterListener (this); edgedetect->set_tooltip_text (M("TP_WAVELET_EDGEDETECT_TOOLTIP")); edgBox->pack_start(*edgedetect); - edgedetectthr = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEDETECTTHR"), 0, 100, 1, 20)); edgedetectthr->setAdjusterListener (this); edgedetectthr->set_tooltip_text (M("TP_WAVELET_EDGEDETECTTHR_TOOLTIP")); edgBox->pack_start(*edgedetectthr); - edgedetectthr2 = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEDETECTTHR2"), -10, 100, 1, 0)); edgedetectthr2->setAdjusterListener (this); edgBox->pack_start(*edgedetectthr2); - separatoredge = Gtk::manage (new Gtk::HSeparator()); - edgBox->pack_start(*separatoredge, Gtk::PACK_SHRINK, 2); - lipst = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_LIPST"))); lipst->set_active (true); lipstConn = lipst->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::lipstToggled) ); // lipst->set_tooltip_text (M("TP_WAVELET_LIPST_TOOLTIP")); edgBox->pack_start(*lipst); - edgesensi = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGESENSI"), 0, 100, 1, 60)); edgesensi->setAdjusterListener (this); edgBox->pack_start(*edgesensi); - edgeampli = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEAMPLI"), 0, 100, 1, 10)); edgeampli->setAdjusterListener (this); edgBox->pack_start(*edgeampli); - Gtk::VBox * ctboxES = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const ctboxES = Gtk::manage (new Gtk::VBox()); ctboxES->set_border_width(4); ctboxES->set_spacing(2); - ctboxNP = Gtk::manage (new Gtk::HBox()); - - labmNP = Gtk::manage (new Gtk::Label (M("TP_WAVELET_NPTYPE") + ":")); ctboxNP->pack_start (*labmNP, Gtk::PACK_SHRINK, 1); - NPmethod = Gtk::manage (new MyComboBoxText ()); NPmethod->append_text (M("TP_WAVELET_NPNONE")); NPmethod->append_text (M("TP_WAVELET_NPLOW")); NPmethod->append_text (M("TP_WAVELET_NPHIGH")); @@ -572,28 +598,43 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), edgBox->pack_start(*ctboxES); // Gamut - Gtk::VBox * conBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const conBox = Gtk::manage (new Gtk::VBox()); conBox->set_border_width(4); conBox->set_spacing(2); - median = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_MEDI"))); median->set_active (true); medianConn = median->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::medianToggled) ); conBox->pack_start(*median); - hueskin = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_HUESKIN"), -314., 314., -5., 25., 170., 120., 0, false)); hueskin->set_tooltip_markup (M("TP_WAVELET_HUESKIN_TOOLTIP")); + //from -PI to +PI (radians) convert to hsv and draw bottombar + const std::vector milestones = { + makeHsvGm(0.0000, 0.4199f, 0.5f, 0.5f), // hsv: 0.4199 rad: -3.14 + makeHsvGm(0.0540, 0.5000f, 0.5f, 0.5f), // hsv: 0.5 rad: -2.8 + makeHsvGm(0.1336, 0.6000f, 0.5f, 0.5f), // hsv: 0.60 rad: -2.3 + makeHsvGm(0.3567, 0.7500f, 0.5f, 0.5f), // hsv: 0.75 rad: -0.9 + makeHsvGm(0.4363, 0.8560f, 0.5f, 0.5f), // hsv: 0.856 rad: -0.4 + makeHsvGm(0.4841, 0.9200f, 0.5f, 0.5f), // hsv: 0.92 rad: -0.1 + makeHsvGm(0.5000, 0.9300f, 0.5f, 0.5f), // hsv: 0.93 rad: 0 + makeHsvGm(0.5366, 0.9600f, 0.5f, 0.5f), // hsv: 0.96 rad: 0.25 + makeHsvGm(0.5955, 1.0000f, 0.5f, 0.5f), // hsv: 1. rad: 0.6 + makeHsvGm(0.6911, 0.0675f, 0.5f, 0.5f), // hsv: 0.0675 rad: 1.2 + makeHsvGm(0.7229, 0.0900f, 0.5f, 0.5f), // hsv: 0.09 rad: 1.4 + makeHsvGm(0.7707, 0.1700f, 0.5f, 0.5f), // hsv: 0.17 rad: 1.7 + makeHsvGm(0.8503, 0.2650f, 0.5f, 0.5f), // hsv: 0.265 rad: 2.1 + makeHsvGm(0.8981, 0.3240f, 0.5f, 0.5f), // hsv: 0.324 rad: 2.5 + makeHsvGm(1.0000, 0.4197f, 0.5f, 0.5f) // hsv: 0.419 rad: 3.14 + }; + hueskin->setBgGradient(milestones); conBox->pack_start(*hueskin); hueskin->setAdjusterListener (this); - skinprotect = Gtk::manage ( new Adjuster (M("TP_WAVELET_SKIN"), -100, 100, 1, 0.) ); skinprotect->setAdjusterListener(this); conBox->pack_start(*skinprotect); skinprotect->set_tooltip_markup (M("TP_WAVELET_SKIN_TOOLTIP")); - curveEditorGAM = new CurveEditorGroup (options.lastWaveletCurvesDir); curveEditorGAM->setCurveListener (this); Chshape = static_cast(curveEditorGAM->addCurve(CT_Flat, M("TP_WAVELET_CURVEEDITOR_CH"))); @@ -604,138 +645,113 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), conBox->pack_start (*curveEditorGAM, Gtk::PACK_SHRINK, 4); - avoid = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_AVOID"))); avoid->set_active (true); avoidConn = avoid->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::avoidToggled) ); conBox->pack_start(*avoid); // Residual Image - Gtk::VBox * resBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const resBox = Gtk::manage (new Gtk::VBox()); resBox->set_border_width(4); resBox->set_spacing(2); - rescon = Gtk::manage (new Adjuster (M("TP_WAVELET_RESCON"), -100, 100, 1, 0)); rescon->setAdjusterListener (this); resBox->pack_start(*rescon, Gtk::PACK_SHRINK); - thr = Gtk::manage (new Adjuster (M("TP_WAVELET_THR"), 0, 100, 1, 35)); resBox->pack_start(*thr); thr->setAdjusterListener (this); - resconH = Gtk::manage (new Adjuster (M("TP_WAVELET_RESCONH"), -100, 100, 1, 0)); resconH->setAdjusterListener (this); resBox->pack_start(*resconH, Gtk::PACK_SHRINK); - thrH = Gtk::manage (new Adjuster (M("TP_WAVELET_THRH"), 0, 100, 1, 65)); thrH->setAdjusterListener (this); resBox->pack_start(*thrH, Gtk::PACK_SHRINK); - contrast = Gtk::manage (new Adjuster (M("TP_WAVELET_CONTRA"), -100, 100, 1, 0)); contrast->set_tooltip_text (M("TP_WAVELET_CONTRA_TOOLTIP")); contrast->setAdjusterListener (this); resBox->pack_start(*contrast); //keep the possibility to reinstall - reschro = Gtk::manage (new Adjuster (M("TP_WAVELET_RESCHRO"), -100, 100, 1, 0)); reschro->setAdjusterListener (this); resBox->pack_start(*reschro); - ctboxTM = Gtk::manage (new Gtk::HBox ()); - labmTM = Gtk::manage (new Gtk::Label (M("TP_WAVELET_TMTYPE") + ":")); ctboxTM->pack_start (*labmTM, Gtk::PACK_SHRINK, 1); - Gtk::HSeparator *separatorR0 = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorR0 = Gtk::manage (new Gtk::HSeparator()); resBox->pack_start(*separatorR0, Gtk::PACK_SHRINK, 2); - TMmethod = Gtk::manage (new MyComboBoxText ()); TMmethod->append_text (M("TP_WAVELET_COMPCONT")); TMmethod->append_text (M("TP_WAVELET_COMPTM")); TMmethodconn = TMmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::TMmethodChanged) ); ctboxTM->pack_start(*TMmethod); resBox->pack_start (*ctboxTM); - tmrs = Gtk::manage(new Adjuster (M("TP_WAVELET_TMSTRENGTH"), -1.0, 2.0, 0.01, 0.0)); tmrs->set_tooltip_text (M("TP_WAVELET_TMSTRENGTH_TOOLTIP")); resBox->pack_start(*tmrs); tmrs->setAdjusterListener (this); - gamma = Gtk::manage(new Adjuster (M("TP_WAVELET_COMPGAMMA"), 0.4, 2.0, 0.01, 1.0)); gamma->set_tooltip_text (M("TP_WAVELET_COMPGAMMA_TOOLTIP")); resBox->pack_start(*gamma); gamma->setAdjusterListener (this); - Gtk::HSeparator *separatorR1 = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorR1 = Gtk::manage (new Gtk::HSeparator()); resBox->pack_start(*separatorR1, Gtk::PACK_SHRINK, 2); - hueskin2 = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_HUESKY"), -314., 314., -260., -250, -130., -140., 0, false)); hueskin2->set_tooltip_markup (M("TP_WAVELET_HUESKY_TOOLTIP")); hueskin2->setBgGradient(milestones); resBox->pack_start(*hueskin2); hueskin2->setAdjusterListener (this); - sky = Gtk::manage (new Adjuster (M("TP_WAVELET_SKY"), -100., 100.0, 1., 0.)); sky->set_tooltip_text (M("TP_WAVELET_SKY_TOOLTIP")); sky->setAdjusterListener (this); resBox->pack_start(*sky); // whole hue range - milestones.clear(); + const std::vector milestones3 = makeWholeHueRange(); - for (int i = 0; i < 7; i++) { - float R, G, B; - float x = float(i) * (1.0f / 6.0); - Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B); - milestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) ); - } - - curveEditorRES = new CurveEditorGroup (options.lastWaveletCurvesDir); curveEditorRES->setCurveListener (this); hhshape = static_cast(curveEditorRES->addCurve(CT_Flat, M("TP_WAVELET_CURVEEDITOR_HH"))); hhshape->setTooltip(M("TP_WAVELET_CURVEEDITOR_HH_TOOLTIP")); hhshape->setCurveColorProvider(this, 5); curveEditorRES->curveListComplete(); - hhshape->setBottomBarBgGradient(milestones); + hhshape->setBottomBarBgGradient(milestones3); resBox->pack_start (*curveEditorRES, Gtk::PACK_SHRINK, 4); // Toning and Color Balance - Gtk::HSeparator *separatorCB = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorCB = Gtk::manage (new Gtk::HSeparator()); - Gtk::VBox *chanMixerHLBox = Gtk::manage (new Gtk::VBox()); - Gtk::VBox *chanMixerMidBox = Gtk::manage (new Gtk::VBox()); - Gtk::VBox *chanMixerShadowsBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chanMixerHLBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chanMixerMidBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chanMixerShadowsBox = Gtk::manage (new Gtk::VBox()); - cbenab = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_CBENAB"))); cbenab->set_active (true); cbenabConn = cbenab->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::cbenabToggled) ); cbenab->set_tooltip_text (M("TP_WAVELET_CB_TOOLTIP")); - Gtk::Image* iblueR = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* iyelL = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* imagL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + Gtk::Image* const iblueR = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* const iyelL = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* const imagL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* const igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - Gtk::Image* iblueRm = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* iyelLm = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* imagLm = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenRm = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + Gtk::Image* const iblueRm = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* const iyelLm = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* const imagLm = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* const igreenRm = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - Gtk::Image* iblueRh = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* iyelLh = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* imagLh = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenRh = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + Gtk::Image* const iblueRh = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* const iyelLh = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* const imagLh = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* const igreenRh = Gtk::manage (new RTImage ("ajd-wb-green2.png")); greenhigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenRh, imagLh)); - bluehigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueRh, iyelLh)); - - greenmed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenRm, imagLm)); - bluemed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0. , iblueRm , iyelLm)); - - greenlow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenR, imagL)); - bluelow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueR , iyelL)); + bluehigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueRh, iyelLh)); + greenmed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenRm, imagLm)); + bluemed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0. , iblueRm , iyelLm)); + greenlow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenR, imagL)); + bluelow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueR , iyelL)); chanMixerHLBox->pack_start (*greenhigh); chanMixerHLBox->pack_start (*bluehigh); @@ -753,10 +769,6 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), resBox->pack_start(*separatorCB, Gtk::PACK_SHRINK); - chanMixerHLFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_HIGHLIGHT"))); - chanMixerMidFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_MIDTONES"))); - chanMixerShadowsFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_SHADOWS"))); - chanMixerHLFrame->add(*chanMixerHLBox); chanMixerMidFrame->add(*chanMixerMidBox); chanMixerShadowsFrame->add(*chanMixerShadowsBox); @@ -767,10 +779,8 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), resBox->pack_start(*chanMixerShadowsFrame, Gtk::PACK_SHRINK); // Reset sliders - neutrHBox = Gtk::manage (new Gtk::HBox ()); neutrHBox->set_border_width (2); - neutral = Gtk::manage (new Gtk::Button (M("TP_COLORTONING_NEUTRAL"))); //RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); //neutral->set_image(*resetImg); neutral->set_tooltip_text (M("TP_COLORTONING_NEUTRAL_TIP")); @@ -781,19 +791,15 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), resBox->pack_start (*neutrHBox); // Final Touchup - Gtk::VBox * ctboxBA = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const ctboxBA = Gtk::manage (new Gtk::VBox()); ctboxBA->set_border_width(4); ctboxBA->set_spacing(2); //Gtk::HSeparator *separatorfin = Gtk::manage (new Gtk::HSeparator()); //ctboxBA->pack_start(*separatorfin, Gtk::PACK_SHRINK, 2); - ctboxFI = Gtk::manage (new Gtk::HBox()); - - labmBA = Gtk::manage (new Gtk::Label (M("TP_WAVELET_BATYPE") + ":")); ctboxFI->pack_start (*labmBA, Gtk::PACK_SHRINK, 1); - BAmethod = Gtk::manage (new MyComboBoxText ()); BAmethod->append_text (M("TP_WAVELET_BANONE")); BAmethod->append_text (M("TP_WAVELET_BASLI")); BAmethod->append_text (M("TP_WAVELET_BACUR")); @@ -801,35 +807,26 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), ctboxFI->pack_start(*BAmethod); ctboxBA->pack_start(*ctboxFI); - balance = Gtk::manage (new Adjuster (M("TP_WAVELET_BALANCE"), -30, 100, 1, 0)); balance->setAdjusterListener (this); balance->set_tooltip_text (M("TP_WAVELET_BALANCE_TOOLTIP")); - std::vector milestonesW; - milestonesW.clear(); - milestonesW.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestonesW.push_back( GradientMilestone(1., 1., 1., 1.) ); - - opacityCurveEditorW = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYW")); opacityCurveEditorW->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveW(defaultCurve); opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); - opacityShape->setBottomBarBgGradient(milestonesW); + opacityShape->setBottomBarBgGradient(milestones2); // This will add the reset button at the end of the curveType buttons opacityCurveEditorW->curveListComplete(); opacityCurveEditorW->show(); - iter = Gtk::manage (new Adjuster (M("TP_WAVELET_ITER"), -3, 3, 1, 0)); iter->setAdjusterListener (this); iter->set_tooltip_text (M("TP_WAVELET_ITER_TOOLTIP")); - Gtk::HSeparator *separatorbalend = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorbalend = Gtk::manage (new Gtk::HSeparator()); - opacityCurveEditorWL = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYWL")); opacityCurveEditorWL->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveWL(defaultCurve); @@ -842,26 +839,20 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorWL->curveListComplete(); opacityCurveEditorWL->show(); - curveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_CONTEDIT")); curveEditorG->setCurveListener (this); clshape = static_cast(curveEditorG->addCurve(CT_Diagonal, M("TP_WAVELET_CURVEEDITOR_CL"))); clshape->setTooltip(M("TP_WAVELET_CURVEEDITOR_CL_TOOLTIP")); - std::vector milestones22; - - milestones22.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones22.push_back( GradientMilestone(1., 1., 1., 1.) ); - clshape->setBottomBarBgGradient(milestones22); - clshape->setLeftBarBgGradient(milestones22); + clshape->setBottomBarBgGradient(milestones2); + clshape->setLeftBarBgGradient(milestones2); curveEditorG->curveListComplete(); - tmr = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_BALCHRO"))); tmr->set_active (true); tmr->set_tooltip_text (M("TP_WAVELET_BALCHRO_TOOLTIP")); tmrConn = tmr->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::tmrToggled) ); - Gtk::VBox * finalBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const finalBox = Gtk::manage (new Gtk::VBox()); finalBox->set_border_width(4); finalBox->set_spacing(2); diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index 554298e08..2bdd09c27 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -30,208 +30,15 @@ #include "guiutils.h" #include "options.h" -class Wavelet : public ToolParamBlock, public ThresholdAdjusterListener, public AdjusterListener, public CurveListener, public ColorProvider, public rtengine::WaveletListener, public FoldableToolPanel +class Wavelet : + public ToolParamBlock, + public ThresholdAdjusterListener, + public AdjusterListener, + public CurveListener, + public ColorProvider, + public rtengine::WaveletListener, + public FoldableToolPanel { -protected: - Glib::RefPtr bgTTips; - Glib::RefPtr srTTips; - Glib::RefPtr bgPixbuf; - Glib::RefPtr srPixbuf; - CurveEditorGroup* curveEditorG; - - CurveEditorGroup* CCWcurveEditorG; - CurveEditorGroup* curveEditorRES; - CurveEditorGroup* curveEditorGAM; - Gtk::HSeparator* colorSep; - Gtk::HSeparator* separator3; - Gtk::HSeparator* separatorCB; - Gtk::HSeparator* separatorNeutral; - Gtk::HSeparator* separatoredge; - - CurveEditorGroup* opaCurveEditorG; - FlatCurveEditor* opacityShapeRG; - CurveEditorGroup* opacityCurveEditorG; - FlatCurveEditor* opacityShapeBY; - CurveEditorGroup* opacityCurveEditorW; - CurveEditorGroup* opacityCurveEditorWL; - FlatCurveEditor* opacityShape; - FlatCurveEditor* opacityShapeWL; - FlatCurveEditor* hhshape; - FlatCurveEditor* Chshape; - DiagonalCurveEditor* clshape; - Gtk::VBox* chanMixerBox; - - FlatCurveEditor* ccshape; - Gtk::CheckButton * display; - Gtk::CheckButton * displaylevel; - Gtk::CheckButton * displaychro; - Gtk::CheckButton * displaygam; - Gtk::CheckButton * displayres; - Gtk::CheckButton * median; - Gtk::CheckButton * medianlev; - Gtk::CheckButton * linkedg; - Gtk::CheckButton * cbenab; - Gtk::CheckButton * lipst; - Gtk::CheckButton * avoid; - Gtk::CheckButton * tmr; - - Gtk::Button * neutralchButton; - Adjuster* correction[9]; - Adjuster* correctionch[9]; - Adjuster* rescon; - Adjuster* resconH; - Adjuster* reschro; - Adjuster* tmrs; - Adjuster* gamma; - Adjuster* sup; - Adjuster* sky; - Adjuster* thres; - Adjuster* chroma; - Adjuster* chro; - Adjuster* contrast; - Adjuster* thr; - Adjuster* thrH; - Adjuster* skinprotect; - Adjuster* edgrad; - Adjuster* edgval; - Adjuster* edgthresh; - Adjuster* strength; - Adjuster* balance; - Adjuster* iter; - Adjuster* greenlow; - Adjuster* bluelow; - Adjuster* greenmed; - Adjuster* bluemed; - Adjuster* greenhigh; - Adjuster* bluehigh; - - ThresholdAdjuster* hueskin; - ThresholdAdjuster* hueskin2; - ThresholdAdjuster* hllev; - ThresholdAdjuster* bllev; - ThresholdAdjuster* pastlev; - ThresholdAdjuster* satlev; - ThresholdAdjuster* edgcont; - ThresholdAdjuster* level0noise; - ThresholdAdjuster* level1noise; - ThresholdAdjuster* level2noise; - ThresholdAdjuster* level3noise; - - Adjuster* threshold; - Adjuster* threshold2; - Adjuster* edgedetect; - Adjuster* edgedetectthr; - Adjuster* edgedetectthr2; - Adjuster* edgesensi; - Adjuster* edgeampli; - MyComboBoxText* Lmethod; - sigc::connection Lmethodconn; - MyComboBoxText* CHmethod; - sigc::connection CHmethodconn; - MyComboBoxText* CHSLmethod; - sigc::connection CHSLmethodconn; - MyComboBoxText* EDmethod; - sigc::connection EDmethodconn; - MyComboBoxText* BAmethod; - sigc::connection BAmethodconn; - MyComboBoxText* NPmethod; - sigc::connection NPmethodconn; - MyComboBoxText* TMmethod; - sigc::connection TMmethodconn; - MyComboBoxText* HSmethod; - sigc::connection HSmethodconn; - MyComboBoxText* CLmethod; - sigc::connection CLmethodconn; - MyComboBoxText* Backmethod; - sigc::connection Backmethodconn; - MyComboBoxText* Tilesmethod; - sigc::connection Tilesmethodconn; - MyComboBoxText* daubcoeffmethod; - sigc::connection daubcoeffmethodconn; - MyComboBoxText* Dirmethod; - sigc::connection Dirmethodconn; - MyComboBoxText* Medgreinf; - sigc::connection MedgreinfConn; - Gtk::Frame* settingsFrame; - Gtk::Frame* toningFrame; - Gtk::Frame* residualFrame; - Gtk::Frame* dispFrame; - Gtk::Frame* levelFrame; - Gtk::Frame* chromaFrame; - Gtk::Frame* controlFrame; - Gtk::Frame* edgeFrame; - Gtk::Frame* noiseFrame; - Gtk::Frame* contrastSHFrame; - Gtk::Frame* finalFrame; - Gtk::Frame *chanMixerHLFrame; - Gtk::Frame *chanMixerMidFrame; - Gtk::Frame *chanMixerShadowsFrame; - Gtk::Frame *dFrame; - - Gtk::Label* colLabel; - Gtk::Label* interLabel; - Gtk::Label* wavLabels; - Gtk::Label* hsmethodLabel; - Gtk::Label* daubcoeffLabel; - Gtk::Label* ColorBalanceLabel; - Gtk::Label* labmC; - Gtk::Label* labmch; - Gtk::Label* labmED; - Gtk::Label* labmTM; - Gtk::Label* labmBA; - Gtk::Label* labmNP; - Gtk::Label* labmedgr; - Gtk::Label* labmednois; - MyExpander* expchroma; - MyExpander* expcontrast; - MyExpander* expedge; - MyExpander* expfinal; - MyExpander* expgamut; - MyExpander* expnoise; - MyExpander* expresid; - MyExpander* expsettings; - MyExpander* exptoning; - Gtk::HBox* ctboxCB; - Gtk::HBox* ctboxCH; - Gtk::HBox* ctboxED; - Gtk::HBox* ctboxTM; - Gtk::HBox* hbresid; - Gtk::HBox* backgroundHBox; - Gtk::HBox* daubcoeffHBox; - Gtk::HBox* hsmethodHBox; - Gtk::HBox* levdirMainHBox; - Gtk::HBox* levdirSubHBox; - Gtk::HBox* tilesizeHBox; - - Gtk::HBox* ctboxFI; - Gtk::HBox* ctboxNP; - Gtk::HBox* ctboxch; - Gtk::HBox* edbox; - Gtk::HBox* ednoisbox; - Gtk::HBox* eddebox; - Gtk::VBox* settingsVBox; - Gtk::VBox* contrastSHVBox; - Gtk::Label* tilesizeLabel; - Gtk::Label* levdirMainLabel; - Gtk::Label* backgroundLabel; - Gtk::Button* neutral; - Gtk::HBox* neutrHBox; - - sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enableFinalConn; - sigc::connection enableNoiseConn, enableResidConn, enableToningConn; - sigc::connection expConn, medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn; - sigc::connection neutralPressedConn; - sigc::connection contrastPlusPressedConn; - sigc::connection contrastMinusPressedConn; - sigc::connection neutralchPressedConn; - - bool lastdisplay, lastdisplaygam, lastdisplayres, lastdisplaychro, lastdisplaylevel, lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; - int nextnlevel; - double tr; - double br; - double tl; - double bl; - public: Wavelet (); virtual ~Wavelet (); @@ -251,7 +58,6 @@ public: void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void writeOptions (std::vector &tpOpen); - private: void foldAllButMe (GdkEventButton* event, MyExpander *expander); @@ -306,8 +112,177 @@ private: void cbenabUpdateUI (); void lipstUpdateUI (); - void enableToggled(MyExpander *expander); + + Glib::RefPtr bgTTips; + Glib::RefPtr srTTips; + Glib::RefPtr bgPixbuf; + Glib::RefPtr srPixbuf; + CurveEditorGroup* const curveEditorG; + + CurveEditorGroup* const CCWcurveEditorG; + CurveEditorGroup* const curveEditorRES; + CurveEditorGroup* const curveEditorGAM; + Gtk::HSeparator* const separatorNeutral; + Gtk::HSeparator* const separatoredge; + + CurveEditorGroup* const opaCurveEditorG; + FlatCurveEditor* opacityShapeRG; + CurveEditorGroup* const opacityCurveEditorG; + FlatCurveEditor* opacityShapeBY; + CurveEditorGroup* const opacityCurveEditorW; + CurveEditorGroup* const opacityCurveEditorWL; + FlatCurveEditor* opacityShape; + FlatCurveEditor* opacityShapeWL; + FlatCurveEditor* hhshape; + FlatCurveEditor* Chshape; + DiagonalCurveEditor* clshape; + + FlatCurveEditor* ccshape; + Gtk::CheckButton* const median; + Gtk::CheckButton* const medianlev; + Gtk::CheckButton* const linkedg; + Gtk::CheckButton* const cbenab; + Gtk::CheckButton* const lipst; + Gtk::CheckButton* const avoid; + Gtk::CheckButton* const tmr; + + Gtk::Button* const neutralchButton; + Adjuster* correction[9]; + Adjuster* correctionch[9]; + Adjuster* const rescon; + Adjuster* const resconH; + Adjuster* const reschro; + Adjuster* const tmrs; + Adjuster* const gamma; + Adjuster* const sup; + Adjuster* const sky; + Adjuster* const thres; + Adjuster* const chroma; + Adjuster* const chro; + Adjuster* const contrast; + Adjuster* const thr; + Adjuster* const thrH; + Adjuster* const skinprotect; + Adjuster* const edgrad; + Adjuster* const edgval; + Adjuster* const edgthresh; + Adjuster* const strength; + Adjuster* const balance; + Adjuster* const iter; + Adjuster* greenlow; + Adjuster* bluelow; + Adjuster* greenmed; + Adjuster* bluemed; + Adjuster* greenhigh; + Adjuster* bluehigh; + + ThresholdAdjuster* const hueskin; + ThresholdAdjuster* const hueskin2; + ThresholdAdjuster* const hllev; + ThresholdAdjuster* const bllev; + ThresholdAdjuster* const pastlev; + ThresholdAdjuster* const satlev; + ThresholdAdjuster* const edgcont; + ThresholdAdjuster* const level0noise; + ThresholdAdjuster* const level1noise; + ThresholdAdjuster* const level2noise; + ThresholdAdjuster* const level3noise; + + Adjuster* const threshold; + Adjuster* const threshold2; + Adjuster* const edgedetect; + Adjuster* const edgedetectthr; + Adjuster* const edgedetectthr2; + Adjuster* const edgesensi; + Adjuster* const edgeampli; + MyComboBoxText* const Lmethod; + sigc::connection Lmethodconn; + MyComboBoxText* const CHmethod; + sigc::connection CHmethodconn; + MyComboBoxText* const CHSLmethod; + sigc::connection CHSLmethodconn; + MyComboBoxText* const EDmethod; + sigc::connection EDmethodconn; + MyComboBoxText* const BAmethod; + sigc::connection BAmethodconn; + MyComboBoxText* const NPmethod; + sigc::connection NPmethodconn; + MyComboBoxText* const TMmethod; + sigc::connection TMmethodconn; + MyComboBoxText* const HSmethod; + sigc::connection HSmethodconn; + MyComboBoxText* const CLmethod; + sigc::connection CLmethodconn; + MyComboBoxText* const Backmethod; + sigc::connection Backmethodconn; + MyComboBoxText* const Tilesmethod; + sigc::connection Tilesmethodconn; + MyComboBoxText* const daubcoeffmethod; + sigc::connection daubcoeffmethodconn; + MyComboBoxText* const Dirmethod; + sigc::connection Dirmethodconn; + MyComboBoxText* const Medgreinf; + sigc::connection MedgreinfConn; + Gtk::Frame* const contrastSHFrame; + Gtk::Frame* const chanMixerHLFrame; + Gtk::Frame* const chanMixerMidFrame; + Gtk::Frame* const chanMixerShadowsFrame; + + Gtk::Label* const wavLabels; + Gtk::Label* const daubcoeffLabel; + Gtk::Label* const labmC; + Gtk::Label* const labmch; + Gtk::Label* const labmED; + Gtk::Label* const labmTM; + Gtk::Label* const labmBA; + Gtk::Label* const labmNP; + Gtk::Label* const labmedgr; + MyExpander* const expchroma; + MyExpander* const expcontrast; + MyExpander* const expedge; + MyExpander* const expfinal; + MyExpander* const expgamut; + MyExpander* const expnoise; + MyExpander* const expresid; + MyExpander* const expsettings; + MyExpander* const exptoning; + Gtk::HBox* const ctboxCH; + Gtk::HBox* const ctboxED; + Gtk::HBox* const ctboxTM; + Gtk::HBox* const backgroundHBox; + Gtk::HBox* const daubcoeffHBox; + Gtk::HBox* const levdirMainHBox; + Gtk::HBox* const levdirSubHBox; + Gtk::HBox* const tilesizeHBox; + + Gtk::HBox* const ctboxFI; + Gtk::HBox* const ctboxNP; + Gtk::HBox* const ctboxch; + Gtk::HBox* const edbox; + Gtk::HBox* const eddebox; + Gtk::VBox* const settingsVBox; + Gtk::VBox* const contrastSHVBox; + Gtk::Label* const tilesizeLabel; + Gtk::Label* const levdirMainLabel; + Gtk::Label* const backgroundLabel; + Gtk::Button* const neutral; + Gtk::HBox* const neutrHBox; + + sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enableFinalConn; + sigc::connection enableNoiseConn, enableResidConn, enableToningConn; + sigc::connection expConn, medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn; + sigc::connection neutralPressedConn; + sigc::connection contrastPlusPressedConn; + sigc::connection contrastMinusPressedConn; + sigc::connection neutralchPressedConn; + + bool lastdisplay, lastdisplaygam, lastdisplayres, lastdisplaychro, lastdisplaylevel, lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; + int nextnlevel; + double tr; + double br; + double tl; + double bl; }; #endif From d8fadb81bf466842f870fb55f29a6103bcc7d3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 18 Dec 2016 16:07:14 +0100 Subject: [PATCH 108/115] Prune unnecessary `Wavelet` members (#3543) --- rtgui/wavelet.cc | 58 ++++++++++++++++++++++-------------------------- rtgui/wavelet.h | 43 +++-------------------------------- 2 files changed, 30 insertions(+), 71 deletions(-) diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index 638f4df03..3e30ffe00 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -100,7 +100,7 @@ Wavelet::Wavelet() : bllev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LOWLIGHT"), 0., 100., 0., 2., 50., 25., 0, false))), pastlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_PASTEL"), 0., 70., 0., 2., 30., 20., 0, false))), satlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_SAT"), 0., 130., 30., 45., 130., 100., 0, false))), - edgcont(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_EDGCONT"), 0., 100., bl, tl, br, tr, 0., false))), + edgcont(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_EDGCONT"), 0., 100., options.rtSettings.bot_left, options.rtSettings.top_left, options.rtSettings.bot_right, options.rtSettings.top_right, 0., false))), level0noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), level1noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), level2noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), @@ -126,19 +126,12 @@ Wavelet::Wavelet() : daubcoeffmethod(Gtk::manage(new MyComboBoxText())), Dirmethod(Gtk::manage(new MyComboBoxText())), Medgreinf(Gtk::manage(new MyComboBoxText())), - contrastSHFrame(Gtk::manage(new Gtk::Frame(M("TP_WAVELET_APPLYTO")))), chanMixerHLFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_HIGHLIGHT")))), chanMixerMidFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_MIDTONES")))), chanMixerShadowsFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_SHADOWS")))), wavLabels(Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER))), - daubcoeffLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUB") + ":"))), labmC(Gtk::manage(new Gtk::Label(M("TP_WAVELET_CTYPE") + ":"))), - labmch(Gtk::manage(new Gtk::Label(M("TP_WAVELET_CHTYPE") + ":"))), - labmED(Gtk::manage(new Gtk::Label(M("TP_WAVELET_EDTYPE") + ":"))), - labmTM(Gtk::manage(new Gtk::Label(M("TP_WAVELET_TMTYPE") + ":"))), - labmBA(Gtk::manage(new Gtk::Label(M("TP_WAVELET_BATYPE") + ":"))), labmNP(Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":"))), - labmedgr(Gtk::manage(new Gtk::Label(M("TP_WAVELET_MEDGREINF") + ":"))), expchroma(new MyExpander(true, M("TP_WAVELET_LEVCH"))), expcontrast(new MyExpander(true, M("TP_WAVELET_LEVF"))), expedge(new MyExpander(true, M("TP_WAVELET_EDGE"))), @@ -148,25 +141,6 @@ Wavelet::Wavelet() : expresid(new MyExpander(true, M("TP_WAVELET_RESID"))), expsettings(new MyExpander(false, M("TP_WAVELET_SETTINGS"))), exptoning(new MyExpander(true, M("TP_WAVELET_TON"))), - ctboxCH(Gtk::manage(new Gtk::HBox())), - ctboxED(Gtk::manage(new Gtk::HBox())), - ctboxTM(Gtk::manage(new Gtk::HBox())), - backgroundHBox(Gtk::manage(new Gtk::HBox())), - daubcoeffHBox(Gtk::manage(new Gtk::HBox())), - levdirMainHBox(Gtk::manage(new Gtk::HBox())), - levdirSubHBox(Gtk::manage(new Gtk::HBox())), - tilesizeHBox(Gtk::manage(new Gtk::HBox())), - ctboxFI(Gtk::manage(new Gtk::HBox())), - ctboxNP(Gtk::manage(new Gtk::HBox())), - ctboxch(Gtk::manage(new Gtk::HBox())), - edbox(Gtk::manage(new Gtk::HBox())), - eddebox(Gtk::manage(new Gtk::HBox())), - settingsVBox(Gtk::manage(new Gtk::VBox())), - contrastSHVBox(Gtk::manage(new Gtk::VBox)), - tilesizeLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_TILESIZE") + ":"))), - levdirMainLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_PROC") + ":"))), - backgroundLabel(Gtk::manage(new Gtk::Label(M("TP_WAVELET_BACKGROUND") + ":"))), - neutral(Gtk::manage(new Gtk::Button(M("TP_COLORTONING_NEUTRAL")))), neutrHBox(Gtk::manage(new Gtk::HBox())) { CurveListener::setMulti(true); @@ -198,6 +172,7 @@ Wavelet::Wavelet() : enableFinalConn = expfinal->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expfinal) ); // Wavelet Settings + Gtk::VBox* const settingsVBox = Gtk::manage(new Gtk::VBox()); settingsVBox->set_border_width(4); settingsVBox->set_spacing(2); @@ -211,6 +186,8 @@ Wavelet::Wavelet() : Tilesmethod->append_text (M("TP_WAVELET_TILESLIT")); Tilesmethodconn = Tilesmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::TilesmethodChanged) ); Tilesmethod->set_tooltip_text (M("TP_WAVELET_TILES_TOOLTIP")); + Gtk::HBox* const tilesizeHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const tilesizeLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_TILESIZE") + ":")); tilesizeHBox->pack_start(*tilesizeLabel, Gtk::PACK_SHRINK, 4); tilesizeHBox->pack_start(*Tilesmethod); @@ -222,6 +199,8 @@ Wavelet::Wavelet() : daubcoeffmethod->append_text (M("TP_WAVELET_DAUB14")); daubcoeffmethodconn = daubcoeffmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::daubcoeffmethodChanged) ); daubcoeffmethod->set_tooltip_text (M("TP_WAVELET_DAUB_TOOLTIP")); + Gtk::Label* const daubcoeffLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUB") + ":")); + Gtk::HBox* const daubcoeffHBox = Gtk::manage(new Gtk::HBox()); daubcoeffHBox->pack_start(*daubcoeffLabel, Gtk::PACK_SHRINK, 4); daubcoeffHBox->pack_start(*daubcoeffmethod); @@ -229,6 +208,8 @@ Wavelet::Wavelet() : Backmethod->append_text (M("TP_WAVELET_B1")); Backmethod->append_text (M("TP_WAVELET_B2")); Backmethodconn = Backmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::BackmethodChanged) ); + Gtk::HBox* const backgroundHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const backgroundLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_BACKGROUND") + ":")); backgroundHBox->pack_start(*backgroundLabel, Gtk::PACK_SHRINK, 4); backgroundHBox->pack_start(*Backmethod); @@ -237,6 +218,8 @@ Wavelet::Wavelet() : CLmethod->append_text (M("TP_WAVELET_LEVDIR_SUP")); CLmethod->append_text (M("TP_WAVELET_LEVDIR_ALL")); CLmethodconn = CLmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CLmethodChanged) ); + Gtk::HBox* const levdirMainHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const levdirMainLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_PROC") + ":")); levdirMainHBox->pack_start(*levdirMainLabel, Gtk::PACK_SHRINK, 4); levdirMainHBox->pack_start(*CLmethod); //same @@ -261,6 +244,7 @@ Wavelet::Wavelet() : Dirmethod->append_text (M("TP_WAVELET_DALL")); Lmethodconn = Lmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::LmethodChanged) ); Dirmethodconn = Dirmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::DirmethodChanged) ); + Gtk::HBox* const levdirSubHBox = Gtk::manage(new Gtk::HBox()); levdirSubHBox->pack_start(*Lmethod); levdirSubHBox->pack_start(*Dirmethod, Gtk::PACK_EXPAND_WIDGET, 2); // same, but 2 not 4? @@ -321,6 +305,7 @@ Wavelet::Wavelet() : wavLabels->show(); levBox->pack_start (*wavLabels); + Gtk::VBox* const contrastSHVBox = Gtk::manage(new Gtk::VBox); contrastSHVBox->set_border_width(4); contrastSHVBox->set_spacing(2); @@ -350,6 +335,7 @@ Wavelet::Wavelet() : contrastSHVBox->pack_start(*threshold); contrastSHVBox->pack_start(*bllev); contrastSHVBox->pack_start(*threshold2); + Gtk::Frame* const contrastSHFrame = Gtk::manage(new Gtk::Frame(M("TP_WAVELET_APPLYTO"))); contrastSHFrame->add(*contrastSHVBox); levBox->pack_start(*contrastSHFrame); @@ -358,6 +344,8 @@ Wavelet::Wavelet() : chBox->set_border_width(4); chBox->set_spacing(2); + Gtk::Label* const labmch = Gtk::manage(new Gtk::Label(M("TP_WAVELET_CHTYPE") + ":")); + Gtk::HBox* const ctboxch = Gtk::manage(new Gtk::HBox()); ctboxch->pack_start (*labmch, Gtk::PACK_SHRINK, 1); CHmethod->append_text (M("TP_WAVELET_CH1")); @@ -367,6 +355,7 @@ Wavelet::Wavelet() : ctboxch->pack_start(*CHmethod); chBox->pack_start(*ctboxch); + Gtk::HBox* const ctboxCH = Gtk::manage(new Gtk::HBox()); ctboxCH->pack_start (*labmC, Gtk::PACK_SHRINK, 1); CHSLmethod->append_text (M("TP_WAVELET_CHSL")); @@ -495,6 +484,8 @@ Wavelet::Wavelet() : edgthresh->set_tooltip_markup (M("TP_WAVELET_EDGTHRESH_TOOLTIP")); edgBox->pack_start (*edgthresh); + Gtk::Label* const labmedgr = Gtk::manage(new Gtk::Label(M("TP_WAVELET_MEDGREINF") + ":")); + Gtk::HBox* const edbox = Gtk::manage(new Gtk::HBox()); edbox->pack_start (*labmedgr, Gtk::PACK_SHRINK, 1); Medgreinf->append_text (M("TP_WAVELET_RE1")); @@ -508,6 +499,8 @@ Wavelet::Wavelet() : Gtk::HSeparator* const separatorlc = Gtk::manage (new Gtk::HSeparator()); edgBox->pack_start(*separatorlc, Gtk::PACK_SHRINK, 2); + Gtk::Label* const labmED = Gtk::manage(new Gtk::Label(M("TP_WAVELET_EDTYPE") + ":")); + Gtk::HBox* const ctboxED = Gtk::manage(new Gtk::HBox()); ctboxED->pack_start (*labmED, Gtk::PACK_SHRINK, 1); EDmethod->append_text (M("TP_WAVELET_EDSL")); @@ -515,10 +508,6 @@ Wavelet::Wavelet() : EDmethodconn = EDmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::EDmethodChanged) ); ctboxED->pack_start(*EDmethod); edgBox->pack_start (*ctboxED); - tr = options.rtSettings.top_right; - br = options.rtSettings.bot_right; - tl = options.rtSettings.top_left; - bl = options.rtSettings.bot_left; edgcont->setAdjusterListener (this); edgcont->setBgGradient(milestones2); @@ -548,6 +537,7 @@ Wavelet::Wavelet() : Gtk::HSeparator* const separatored1 = Gtk::manage (new Gtk::HSeparator()); edgBox->pack_start(*separatored1, Gtk::PACK_SHRINK, 2); + Gtk::HBox* const eddebox = Gtk::manage(new Gtk::HBox()); edgBox->pack_start (*eddebox); edgBox->pack_start(*medianlev); @@ -584,6 +574,7 @@ Wavelet::Wavelet() : ctboxES->set_border_width(4); ctboxES->set_spacing(2); + Gtk::HBox* const ctboxNP = Gtk::manage(new Gtk::HBox()); ctboxNP->pack_start (*labmNP, Gtk::PACK_SHRINK, 1); NPmethod->append_text (M("TP_WAVELET_NPNONE")); @@ -674,6 +665,8 @@ Wavelet::Wavelet() : resBox->pack_start(*reschro); + Gtk::Label* const labmTM = Gtk::manage(new Gtk::Label(M("TP_WAVELET_TMTYPE") + ":")); + Gtk::HBox* const ctboxTM = Gtk::manage(new Gtk::HBox()); ctboxTM->pack_start (*labmTM, Gtk::PACK_SHRINK, 1); Gtk::HSeparator* const separatorR0 = Gtk::manage (new Gtk::HSeparator()); @@ -783,6 +776,7 @@ Wavelet::Wavelet() : //RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); //neutral->set_image(*resetImg); + Gtk::Button* const neutral = Gtk::manage(new Gtk::Button(M("TP_COLORTONING_NEUTRAL"))); neutral->set_tooltip_text (M("TP_COLORTONING_NEUTRAL_TIP")); neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutral_pressed) ); neutral->show(); @@ -798,6 +792,8 @@ Wavelet::Wavelet() : //Gtk::HSeparator *separatorfin = Gtk::manage (new Gtk::HSeparator()); //ctboxBA->pack_start(*separatorfin, Gtk::PACK_SHRINK, 2); + Gtk::Label* const labmBA = Gtk::manage(new Gtk::Label(M("TP_WAVELET_BATYPE") + ":")); + Gtk::HBox* const ctboxFI = Gtk::manage(new Gtk::HBox()); ctboxFI->pack_start (*labmBA, Gtk::PACK_SHRINK, 1); BAmethod->append_text (M("TP_WAVELET_BANONE")); diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index 2bdd09c27..ff0964731 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -17,8 +17,7 @@ * 2014 Jacques Desmis */ -#ifndef WAVELET_H_INCLUDED -#define WAVELET_H_INCLUDED +#pragma once #include #include "adjuster.h" @@ -114,10 +113,6 @@ private: void enableToggled(MyExpander *expander); - Glib::RefPtr bgTTips; - Glib::RefPtr srTTips; - Glib::RefPtr bgPixbuf; - Glib::RefPtr srPixbuf; CurveEditorGroup* const curveEditorG; CurveEditorGroup* const CCWcurveEditorG; @@ -224,20 +219,13 @@ private: sigc::connection Dirmethodconn; MyComboBoxText* const Medgreinf; sigc::connection MedgreinfConn; - Gtk::Frame* const contrastSHFrame; Gtk::Frame* const chanMixerHLFrame; Gtk::Frame* const chanMixerMidFrame; Gtk::Frame* const chanMixerShadowsFrame; Gtk::Label* const wavLabels; - Gtk::Label* const daubcoeffLabel; Gtk::Label* const labmC; - Gtk::Label* const labmch; - Gtk::Label* const labmED; - Gtk::Label* const labmTM; - Gtk::Label* const labmBA; Gtk::Label* const labmNP; - Gtk::Label* const labmedgr; MyExpander* const expchroma; MyExpander* const expcontrast; MyExpander* const expedge; @@ -247,42 +235,17 @@ private: MyExpander* const expresid; MyExpander* const expsettings; MyExpander* const exptoning; - Gtk::HBox* const ctboxCH; - Gtk::HBox* const ctboxED; - Gtk::HBox* const ctboxTM; - Gtk::HBox* const backgroundHBox; - Gtk::HBox* const daubcoeffHBox; - Gtk::HBox* const levdirMainHBox; - Gtk::HBox* const levdirSubHBox; - Gtk::HBox* const tilesizeHBox; - Gtk::HBox* const ctboxFI; - Gtk::HBox* const ctboxNP; - Gtk::HBox* const ctboxch; - Gtk::HBox* const edbox; - Gtk::HBox* const eddebox; - Gtk::VBox* const settingsVBox; - Gtk::VBox* const contrastSHVBox; - Gtk::Label* const tilesizeLabel; - Gtk::Label* const levdirMainLabel; - Gtk::Label* const backgroundLabel; - Gtk::Button* const neutral; Gtk::HBox* const neutrHBox; sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enableFinalConn; sigc::connection enableNoiseConn, enableResidConn, enableToningConn; - sigc::connection expConn, medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn; + sigc::connection medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn; sigc::connection neutralPressedConn; sigc::connection contrastPlusPressedConn; sigc::connection contrastMinusPressedConn; sigc::connection neutralchPressedConn; - bool lastdisplay, lastdisplaygam, lastdisplayres, lastdisplaychro, lastdisplaylevel, lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; + bool lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; int nextnlevel; - double tr; - double br; - double tl; - double bl; }; - -#endif From 7fdcc8f172ca7c898ae15f489f17322645393f7f Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sun, 18 Dec 2016 18:17:52 +0100 Subject: [PATCH 109/115] Review of thumb size defaults, closes #3535 --- rtdata/languages/default | 2 +- rtgui/options.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 5a9f1dd3c..dcc2272fc 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -957,7 +957,7 @@ PREFERENCES_FLUOF7;Fluorescent F7 PREFERENCES_FLUOF11;Fluorescent F11 PREFERENCES_FORIMAGE;For non-raw photos PREFERENCES_FORRAW;For raw photos -PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. PREFERENCES_GIMPPATH;GIMP installation directory PREFERENCES_GREY;Output device's Yb luminance (%) diff --git a/rtgui/options.cc b/rtgui/options.cc index 1b01a66db..1c29387ac 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -356,10 +356,10 @@ void Options::setDefaults () profilePath = "profiles"; loadSaveProfilePath = ""; // will be corrected in load as otherwise construction fails version = "0.0.0.0"; // temporary value; will be correctly set in RTWindow::on_realize - thumbSize = 240; - thumbSizeTab = 180; + thumbSize = 160; + thumbSizeTab = 160; thumbSizeQueue = 160; - sameThumbSize = true; // preferring speed of switch between file browser and single editor tab + sameThumbSize = false; // preferring speed of switch between file browser and single editor tab showHistory = true; showFilePanelState = 0; // Not used anymore ; was the thumb strip state showInfo = true; From 829ffc7e72671bad629a5593dcf6897719d9daa0 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 20 Dec 2016 21:52:54 +0100 Subject: [PATCH 110/115] Translation strings update. --- rtdata/languages/Catala | 3 +-- rtdata/languages/Chinese (Simplified) | 3 +-- rtdata/languages/Chinese (Traditional) | 3 +-- rtdata/languages/Dansk | 3 +-- rtdata/languages/English (UK) | 3 +-- rtdata/languages/English (US) | 3 +-- rtdata/languages/Espanol | 2 +- rtdata/languages/Euskara | 3 +-- rtdata/languages/Greek | 3 +-- rtdata/languages/Hebrew | 3 +-- rtdata/languages/Italiano | 2 +- rtdata/languages/Latvian | 3 +-- rtdata/languages/Magyar | 3 +-- rtdata/languages/Norsk BM | 3 +-- rtdata/languages/Polish | 2 +- rtdata/languages/Polish (Latin Characters) | 2 +- rtdata/languages/Portugues (Brasil) | 3 +-- rtdata/languages/Russian | 2 +- rtdata/languages/Serbian (Cyrilic Characters) | 2 +- rtdata/languages/Serbian (Latin Characters) | 2 +- rtdata/languages/Slovak | 3 +-- rtdata/languages/Suomi | 3 +-- rtdata/languages/Turkish | 3 +-- 23 files changed, 23 insertions(+), 39 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 3752bdd34..f73df46a7 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1381,7 +1381,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1863,7 +1863,6 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RGBCURVES_LUMAMODE_TOOLTIP;Luminosity mode allows to vary the contribution of R, G and B channels to the luminosity of the image, without altering image color. !TP_SAVEDIALOG_OK_TIP;Shortcut: Ctrl-Enter !TP_SHADOWSHLIGHTS_SHARPMASK;Sharp mask -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 81226c2bf..72753272c 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1319,7 +1319,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1829,7 +1829,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_VIEW_TRAN;Transmission - Auto !TP_RETINEX_VIEW_TRAN2;Transmission - Fixed !TP_RETINEX_VIEW_UNSHARP;Unsharp mask -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 !TP_SHARPENMICRO_UNIFORMITY;Uniformity diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index 49ef3bc77..a8101c373 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -1125,7 +1125,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1804,7 +1804,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 3a008127b..43f10eacd 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -1123,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1803,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index 4b7e2979f..083b4247e 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -1027,7 +1027,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_FLUOF11;Fluorescent F11 !PREFERENCES_FORIMAGE;For non-raw photos !PREFERENCES_FORRAW;For raw photos -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GIMPPATH;GIMP installation directory !PREFERENCES_GREY;Output device's Yb luminance (%) @@ -1794,7 +1794,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_SHARPENING_RLD_DAMPING;Damping !TP_SHARPENING_RLD_ITERATIONS;Iterations !TP_SHARPENING_THRESHOLD;Threshold -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENING_USM;Unsharp Mask !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 3691fc6d4..de97d7721 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -958,7 +958,7 @@ !PREFERENCES_FLUOF11;Fluorescent F11 !PREFERENCES_FORIMAGE;For non-raw photos !PREFERENCES_FORRAW;For raw photos -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GIMPPATH;GIMP installation directory !PREFERENCES_GREY;Output device's Yb luminance (%) @@ -1785,7 +1785,6 @@ !TP_SHARPENING_RLD_DAMPING;Damping !TP_SHARPENING_RLD_ITERATIONS;Iterations !TP_SHARPENING_THRESHOLD;Threshold -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENING_USM;Unsharp Mask !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 24bd6c21d..54a2fde5b 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1736,7 +1736,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 8399eb268..7ebb655f5 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -1123,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1803,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 5adbda9f6..4cb598b53 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -1122,7 +1122,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1802,7 +1802,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index a8a387782..89e7c0eae 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -1123,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1803,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index f6241e8dd..70739f62d 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1607,7 +1607,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index c756e6741..a3022fab7 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -1123,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1803,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 7d6f6be3a..c102d9423 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1317,7 +1317,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1856,7 +1856,6 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RGBCURVES_LUMAMODE_TOOLTIP;Luminosity mode allows to vary the contribution of R, G and B channels to the luminosity of the image, without altering image color. !TP_SAVEDIALOG_OK_TIP;Shortcut: Ctrl-Enter !TP_SHADOWSHLIGHTS_SHARPMASK;Sharp mask -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE1;Red/Purple diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 166edeff1..6b2901927 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -1122,7 +1122,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1802,7 +1802,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index e0bad2dff..0b3bbe5f0 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1684,7 +1684,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index a3675ab7b..e4bd5fc83 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1684,7 +1684,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index d7a4af77d..f12205c7e 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -1123,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1803,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index c42c45e44..139d87b49 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1561,7 +1561,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 4540da0b3..89707bca4 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1727,7 +1727,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index e469a3cd7..c40fb9577 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1727,7 +1727,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 98b726e42..fc119da9b 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -1173,7 +1173,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1811,7 +1811,6 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 6f5d0ed27..e86128dbd 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -1124,7 +1124,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1803,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index efb0a6d9f..3003f459f 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -1123,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1802,7 +1802,6 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 From 138d531edca4dc2478004a96cdc000691b47d06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Thu, 22 Dec 2016 18:23:25 +0100 Subject: [PATCH 111/115] Fix off-by-(-1) in checkRawImageThumb() (#3553) Kudos to @heckflosse! --- rtengine/rtthumbnail.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 77e260985..af42ce8b0 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -55,7 +55,7 @@ namespace ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 : raw_image.get_thumbLength(); - return raw_image.get_thumbOffset() + length < raw_image.get_file()->size; + return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; } } From 0b66f64a3bf539cc3d311c964509d6efa082a7c6 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sun, 25 Dec 2016 20:32:13 +0100 Subject: [PATCH 112/115] JPEG IJG add missing README, #3549 (#3555) * Move IJG jpeg file into own folder, include missing README, #3549 * Forgot to add README --- rtengine/CMakeLists.txt | 2 +- rtengine/jpeg_ijg/README | 375 +++++++++++++++++++++++++ rtengine/{ => jpeg_ijg}/jpeg_memsrc.cc | 2 +- 3 files changed, 377 insertions(+), 2 deletions(-) create mode 100644 rtengine/jpeg_ijg/README rename rtengine/{ => jpeg_ijg}/jpeg_memsrc.cc (99%) diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index 1f4f3375f..477ccecae 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -14,7 +14,7 @@ set (RTENGINESOURCEFILES colortemp.cc curves.cc flatcurves.cc diagonalcurves.cc stdimagesource.cc myfile.cc iccjpeg.cc improccoordinator.cc pipettebuffer.cc coord.cc processingjob.cc rtthumbnail.cc utils.cc labimage.cc slicer.cc cieimage.cc iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc ipvibrance.cc - imagedimensions.cc jpeg_memsrc.cc jdatasrc.cc iimage.cc + imagedimensions.cc jpeg_ijg/jpeg_memsrc.cc jdatasrc.cc iimage.cc EdgePreservingDecomposition.cc cplx_wavelet_dec.cc FTblockDN.cc PF_correct_RT.cc previewimage.cc ipwavelet.cc dirpyr_equalizer.cc diff --git a/rtengine/jpeg_ijg/README b/rtengine/jpeg_ijg/README new file mode 100644 index 000000000..4c8e82e9b --- /dev/null +++ b/rtengine/jpeg_ijg/README @@ -0,0 +1,375 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 9b of 17-Jan-2016 +==================================== + +This distribution contains the ninth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone, +Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson, +Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers, +and other members of the Independent JPEG Group. + +IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee +(previously known as JPEG, together with ITU-T SG16). + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +ACKNOWLEDGMENTS Special thanks. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.txt How to configure and install the IJG software. + usage.txt Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.txt). + wizard.txt Advanced usage instructions for JPEG wizards only. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.txt How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.txt Overview of the JPEG library's internal structure. + filelist.txt Road map of IJG files. + coderules.txt Coding style rules --- please read if you contribute code. + +Please read at least the files install.txt and usage.txt. Some information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image encoding, decoding, +and transcoding. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and grayscale images. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +We have made no provision for supporting the hierarchical or lossless +processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. + +We have also included "jpegtran", a utility for lossless transcoding between +different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple +applications for inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltmain.sh). Another support script, install-sh, is copyright by X Consortium +but is also freely distributable. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent (now expired), GIF reading +support has been removed altogether, and the GIF writer has been simplified +to produce "uncompressed GIFs". This technique does not use the LZW +algorithm; the resulting GIF files are larger than usual, but are readable +by all standard GIF decoders. + + +REFERENCES +========== + +We recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PDF file containing a revised version of Wallace's article is +available at http://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and IEEE, +and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by +M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides +good explanations and example C code for a multitude of compression methods +including JPEG. It is an excellent source if you are comfortable reading C +code but don't know much about data compression in general. The book's JPEG +sample code is far from industrial-strength, but when you are ready to look +at a full implementation, you've got one here... + +The best currently available description of JPEG is the textbook "JPEG Still +Image Data Compression Standard" by William B. Pennebaker and Joan L. +Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. +Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG +standards (DIS 10918-1 and draft DIS 10918-2). +Although this is by far the most detailed and comprehensive exposition of +JPEG publicly available, we point out that it is still missing an explanation +of the most essential properties and algorithms of the underlying DCT +technology. +If you think that you know about DCT-based JPEG after reading this book, +then you are in delusion. The real fundamentals and corresponding potential +of DCT-based JPEG are not publicly known so far, and that is the reason for +all the mistaken developments taking place in the image coding domain. + +The original JPEG standard is divided into two parts, Part 1 being the actual +specification, while Part 2 covers compliance testing methods. Part 1 is +titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. +IJG JPEG 8 introduced an implementation of the JPEG SmartScale extension +which is specified in two documents: A contributed document at ITU and ISO +with title "ITU-T JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced +Image Coding", April 2006, Geneva, Switzerland. The latest version of this +document is Revision 3. And a contributed document ISO/IEC JTC1/SC29/WG1 N +5799 with title "Evolution of JPEG", June/July 2011, Berlin, Germany. +IJG JPEG 9 introduces a reversible color transform for improved lossless +compression which is described in a contributed document ISO/IEC JTC1/SC29/ +WG1 N 6080 with title "JPEG 9 Lossless Coding", June/July 2012, Paris, +France. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, version 2. +JFIF version 1 has been adopted as Recommendation ITU-T T.871 (05/2011) : +Information technology - Digital compression and coding of continuous-tone +still images: JPEG File Interchange Format (JFIF). It is available as a +free download in PDF file format from http://www.itu.int/rec/T-REC-T.871. +A PDF file of the older JFIF document is available at +http://www.w3.org/Graphics/JPEG/jfif3.pdf. + +The TIFF 6.0 file format specification can be obtained by FTP from +ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from +http://www.ijg.org/files/. It is expected that the next revision +of the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is www.ijg.org. +The most recent released version can always be found there in +directory "files". This particular version will be archived as +http://www.ijg.org/files/jpegsrc.v9b.tar.gz, and in Windows-compatible +"zip" archive format as http://www.ijg.org/files/jpegsr9b.zip. + +The JPEG FAQ (Frequently Asked Questions) article is a source of some +general information about JPEG. +It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ +and other news.answers archive sites, including the official news.answers +archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. +If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +ACKNOWLEDGMENTS +=============== + +Thank to Juergen Bruder for providing me with a copy of the common DCT +algorithm article, only to find out that I had come to the same result +in a more direct and comprehensible way with a more generative approach. + +Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the +ITU JPEG (Study Group 16) meeting in Geneva, Switzerland. + +Thank to Thomas Wiegand and Gary Sullivan for inviting me to the +Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland. + +Thank to Thomas Richter and Daniel Lee for inviting me to the +ISO/IEC JTC1/SC29/WG1 (previously known as JPEG, together with ITU-T SG16) +meeting in Berlin, Germany. + +Thank to John Korejwa and Massimo Ballerini for inviting me to +fruitful consultations in Boston, MA and Milan, Italy. + +Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther +Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel +for corresponding business development. + +Thank to Nico Zschach and Dirk Stelling of the technical support team +at the Digital Images company in Halle for providing me with extra +equipment for configuration tests. + +Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful +communication about JPEG configuration in Sigma Photo Pro software. + +Thank to Andrew Finkenstadt for hosting the ijg.org site. + +Last but not least special thank to Thomas G. Lane for the original +design and development of this singular software package. + + +FILE FORMAT WARS +================ + +The ISO/IEC JTC1/SC29/WG1 standards committee (previously known as JPEG, +together with ITU-T SG16) currently promotes different formats containing +the name "JPEG" which is misleading because these formats are incompatible +with original DCT-based JPEG and are based on faulty technologies. +IJG therefore does not and will not support such momentary mistakes +(see REFERENCES). +There exist also distributions under the name "OpenJPEG" promoting such +kind of formats which is misleading because they don't support original +JPEG images. +We have no sympathy for the promotion of inferior formats. Indeed, one of +the original reasons for developing this free software was to help force +convergence on common, interoperable format standards for JPEG files. +Don't use an incompatible file format! +(In any case, our decoder will remain capable of reading existing JPEG +image files indefinitely.) + +The ISO committee pretends to be "responsible for the popular JPEG" in their +public reports which is not true because they don't respond to actual +requirements for the maintenance of the original JPEG specification. +Furthermore, the ISO committee pretends to "ensure interoperability" with +their standards which is not true because their "standards" support only +application-specific and proprietary use cases and contain mathematically +incorrect code. + +There are currently different distributions in circulation containing the +name "libjpeg" which is misleading because they don't have the features and +are incompatible with formats supported by actual IJG libjpeg distributions. +One of those fakes is released by members of the ISO committee and just uses +the name of libjpeg for misdirection of people, similar to the abuse of the +name JPEG as described above, while having nothing in common with actual IJG +libjpeg distributions and containing mathematically incorrect code. +The other one claims to be a "derivative" or "fork" of the original libjpeg, +but violates the license conditions as described under LEGAL ISSUES above +and violates basic C programming properties. +We have no sympathy for the release of misleading, incorrect and illegal +distributions derived from obsolete code bases. +Don't use an obsolete code base! + +According to the UCC (Uniform Commercial Code) law, IJG has the lawful and +legal right to foreclose on certain standardization bodies and other +institutions or corporations that knowingly perform substantial and +systematic deceptive acts and practices, fraud, theft, and damaging of the +value of the people of this planet without their knowing, willing and +intentional consent. +The titles, ownership, and rights of these institutions and all their assets +are now duly secured and held in trust for the free people of this planet. +People of the planet, on every country, may have a financial interest in +the assets of these former principals, agents, and beneficiaries of the +foreclosed institutions and corporations. +IJG asserts what is: that each man, woman, and child has unalienable value +and rights granted and deposited in them by the Creator and not any one of +the people is subordinate to any artificial principality, corporate fiction +or the special interest of another without their appropriate knowing, +willing and intentional consent made by contract or accommodation agreement. +IJG expresses that which already was. +The people have already determined and demanded that public administration +entities, national governments, and their supporting judicial systems must +be fully transparent, accountable, and liable. +IJG has secured the value for all concerned free people of the planet. + +A partial list of foreclosed institutions and corporations ("Hall of Shame") +is currently prepared and will be published later. + + +TO DO +===== + +Version 9 is the second release of a new generation JPEG standard +to overcome the limitations of the original JPEG specification, +and is the first true source reference JPEG codec. +More features are being prepared for coming releases... + +Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org. diff --git a/rtengine/jpeg_memsrc.cc b/rtengine/jpeg_ijg/jpeg_memsrc.cc similarity index 99% rename from rtengine/jpeg_memsrc.cc rename to rtengine/jpeg_ijg/jpeg_memsrc.cc index 5459af8b6..3e245b87e 100644 --- a/rtengine/jpeg_memsrc.cc +++ b/rtengine/jpeg_ijg/jpeg_memsrc.cc @@ -22,7 +22,7 @@ #include #include #include -#include "jpeg.h" +#include "../jpeg.h" /* Expanded data source object for memory input */ From c90b70199917893097eb6c60fea80f2e771c5137 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 25 Dec 2016 23:55:45 +0100 Subject: [PATCH 113/115] Backporting patch from issue #3446 This commit change the way that the Curve buttons and Accompanying object expands, and fix the alignment of the WB's buttons. --- rtgui/colortoning.cc | 8 ++++---- rtgui/curveeditor.cc | 1 + rtgui/curveeditor.h | 1 + rtgui/curveeditorgroup.cc | 15 +++++++++------ rtgui/curveeditorgroup.h | 2 +- rtgui/dirpyrdenoise.cc | 4 ++-- rtgui/retinex.cc | 4 ++-- rtgui/wavelet.cc | 10 +++++----- rtgui/whitebalance.cc | 16 +++++++++++----- 9 files changed, 36 insertions(+), 25 deletions(-) diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index e2122f79e..a4d28c104 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -40,7 +40,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR")); colorCurveEditorG->setCurveListener (this); - colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); colorShape->setCurveColorProvider(this, 1); std::vector milestones; @@ -89,7 +89,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR opacityCurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultOpacityCurve(defaultCurve); - opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShape->setBottomBarBgGradient(milestones); @@ -108,7 +108,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR clCurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultCLCurve(defaultCurve); - clshape = static_cast(clCurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_AB"), irg)); + clshape = static_cast(clCurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_AB"), irg, false)); clshape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve); clshape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP")); @@ -128,7 +128,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR cl2CurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultCL2Curve(defaultCurve); - cl2shape = static_cast(cl2CurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_BY"), iby)); + cl2shape = static_cast(cl2CurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_BY"), iby, false)); cl2shape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve); cl2shape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP")); diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc index 5428677c3..117051b2a 100644 --- a/rtgui/curveeditor.cc +++ b/rtgui/curveeditor.cc @@ -200,6 +200,7 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd leftBarCP = nullptr; curveCP = nullptr; relatedWidget = nullptr; + expandRelatedWidget = true; group = ceGroup; subGroup = ceSubGroup; diff --git a/rtgui/curveeditor.h b/rtgui/curveeditor.h index a3ba68436..3f279ff05 100644 --- a/rtgui/curveeditor.h +++ b/rtgui/curveeditor.h @@ -66,6 +66,7 @@ protected: CurveEditorGroup* group; CurveEditorSubGroup* subGroup; Gtk::Widget* relatedWidget; + bool expandRelatedWidget; std::vector tempCurve; sigc::connection typeconn; diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index ecb4c8542..aad30ac37 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -73,7 +73,7 @@ void CurveEditorGroup::hideCurrentCurve() * periodic: for FlatCurve only, ask the curve to be periodic (default: True) * */ -CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool periodic) +CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool expandRelatedWidget, bool periodic) { switch (cType) { case (CT_Diagonal): { @@ -84,6 +84,7 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe // We add it to the curve editor list DiagonalCurveEditor* newCE = diagonalSubGroup->addCurve(curveLabel); newCE->relatedWidget = relatedWidget; + newCE->expandRelatedWidget = expandRelatedWidget; curveEditors.push_back(newCE); return (newCE); } @@ -96,6 +97,7 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe // We add it to the curve editor list FlatCurveEditor* newCE = flatSubGroup->addCurve(curveLabel, periodic); newCE->relatedWidget = relatedWidget; + newCE->expandRelatedWidget = expandRelatedWidget; curveEditors.push_back(newCE); return (newCE); } @@ -131,20 +133,21 @@ void CurveEditorGroup::newLine() } int j = numberOfPackedCurve; - bool hasRelatedWidget = false; + + bool rwe = false; for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { - if (curveEditors[i]->relatedWidget != nullptr) { - hasRelatedWidget = true; + if (curveEditors[i]->relatedWidget != nullptr && curveEditors[i]->expandRelatedWidget) { + rwe = true; } } for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { if (curveEditors[i]->relatedWidget != nullptr) { - headerBox->pack_end (*curveEditors[i]->relatedWidget, Gtk::PACK_EXPAND_WIDGET, 2); + headerBox->pack_end (*curveEditors[i]->relatedWidget, curveEditors[i]->expandRelatedWidget ? Gtk::PACK_EXPAND_WIDGET : Gtk::PACK_SHRINK, 2); } - headerBox->pack_end (*curveEditors[i]->curveType->buttonGroup, hasRelatedWidget ? Gtk::PACK_SHRINK : Gtk::PACK_EXPAND_WIDGET, 2); + headerBox->pack_end (*curveEditors[i]->curveType->buttonGroup, rwe ? Gtk::PACK_SHRINK : Gtk::PACK_EXPAND_WIDGET, 2); numberOfPackedCurve++; } diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index caf08b4a4..097bfd3e3 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -85,7 +85,7 @@ public: return displayedCurve; } //void on_realize (); - CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool periodic = true); + CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool expandRelatedWidget = true, bool periodic = true); protected: //void curveTypeToggled (); diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index f4ad271b3..3cee199f8 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -64,7 +64,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP //curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir); NoiscurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultNoisCurve(defaultCurve); - lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); lshape->setIdentityValue(0.); lshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -154,7 +154,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP CCcurveEditorG = new CurveEditorGroup (options.lastDenoiseCurvesDir, M("TP_DIRPYRDENOISE_CCCURVE")); CCcurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultCCCurve(defaultCurve); - ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index dd5048320..61d9073ae 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -105,7 +105,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), std::vector defaultCurve; rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve); - transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); transmissionShape->setIdentityValue(0.); transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); transmissionShape->setBottomBarBgGradient(milestones); @@ -184,7 +184,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // std::vector defaultCurve; rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve); - gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false)); + gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false, false)); gaintransmissionShape->setIdentityValue(0.); gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); gaintransmissionShape->setBottomBarBgGradient(milestones); diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index 3e30ffe00..2d7f6dd2e 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -421,7 +421,7 @@ Wavelet::Wavelet() : std::vector defaultCurve; rtengine::WaveletParams::getDefaultOpacityCurveRG(defaultCurve); - opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); opacityShapeRG->setIdentityValue(0.); opacityShapeRG->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -433,7 +433,7 @@ Wavelet::Wavelet() : opacityCurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveBY(defaultCurve); - opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); opacityShapeBY->setIdentityValue(0.); opacityShapeBY->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -517,7 +517,7 @@ Wavelet::Wavelet() : CCWcurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultCCWCurve(defaultCurve); - ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", nullptr, false)); + ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -809,7 +809,7 @@ Wavelet::Wavelet() : opacityCurveEditorW->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveW(defaultCurve); - opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false)); + opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShape->setBottomBarBgGradient(milestones2); @@ -826,7 +826,7 @@ Wavelet::Wavelet() : opacityCurveEditorWL->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveWL(defaultCurve); - opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", nullptr, false)); + opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", nullptr, false, false)); opacityShapeWL->setIdentityValue(0.); opacityShapeWL->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP")); diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index 75873b680..e000e6738 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -151,6 +151,7 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB { Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); + hbox->set_spacing(4); hbox->show (); Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD"))); lab->show (); @@ -238,14 +239,19 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB method->pack_start(methodColumns.colIcon, false); method->pack_start(methodColumns.colLabel, true); + std::vector cells = method->get_cells(); + Gtk::CellRendererText* cellRenderer = dynamic_cast(cells.at(1)); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; + method->set_active (0); // Camera method->show (); - hbox->pack_start (*lab, Gtk::PACK_SHRINK, 4); + hbox->pack_start (*lab, Gtk::PACK_SHRINK, 0); hbox->pack_start (*method); - pack_start (*hbox, Gtk::PACK_SHRINK, 4); + pack_start (*hbox, Gtk::PACK_SHRINK, 0); opt = 0; Gtk::HBox* spotbox = Gtk::manage (new Gtk::HBox ()); + spotbox->set_spacing(4); spotbox->show (); spotbutton = Gtk::manage (new Gtk::Button (M("TP_WBALANCE_SPOTWB"))); @@ -291,10 +297,10 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB spotsize->set_active(4); } - spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 4); - spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 4); + spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 0); + spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 0); - pack_start (*spotbox, Gtk::PACK_SHRINK, 4); + pack_start (*spotbox, Gtk::PACK_SHRINK, 0); Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); From 95f0d67dfe0422e71fb97048e451c7e5062d182c Mon Sep 17 00:00:00 2001 From: Hombre Date: Tue, 27 Dec 2016 14:31:55 +0100 Subject: [PATCH 114/115] Fix issue #3532 + a memory leak --- rtgui/editorpanel.cc | 5 +++-- rtgui/preferences.cc | 3 +-- rtgui/rtwindow.cc | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 8dba7e38e..4ba581ddd 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -1639,8 +1639,7 @@ void EditorPanel::saveAsPressed () fnameOut = saveAsDialog->getFileName (); options.lastSaveAsPath = saveAsDialog->getDirectory (); - options.saveAsDialogWidth = saveAsDialog->get_width (); - options.saveAsDialogHeight = saveAsDialog->get_height (); + saveAsDialog->get_size(options.saveAsDialogWidth, options.saveAsDialogHeight); options.autoSuffix = saveAsDialog->getAutoSuffix (); options.saveMethodNum = saveAsDialog->getSaveMethodNum (); lastSaveAsFileName = Glib::path_get_basename (removeExtension (fnameOut)); @@ -1709,6 +1708,8 @@ void EditorPanel::saveAsPressed () } while (!fnameOK); saveAsDialog->hide(); + + delete saveAsDialog; } void EditorPanel::queueImgPressed () diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 748531f15..30d9d5ed2 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -105,8 +105,7 @@ Preferences::~Preferences () { profileStore.removeListener(this); - options.preferencesWidth = get_width(); - options.preferencesHeight = get_height(); + get_size(options.preferencesWidth, options.preferencesHeight); } Gtk::Widget* Preferences::getBatchProcPanel () diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index b9538ceca..de5bbee43 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -690,8 +690,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) ProfilePanel::cleanup(); if (!options.windowMaximized) { - options.windowWidth = get_width(); - options.windowHeight = get_height(); + get_size(options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } From cc8dae26ff6b81d810fd954828b65ff380652fff Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 27 Dec 2016 22:06:58 +0100 Subject: [PATCH 115/115] camconst.json updates by IliasG #3298 2016-12-26 --- rtengine/camconst.json | 180 ++++++++++++++++++++++++++++------------- 1 file changed, 126 insertions(+), 54 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index ed28618ab..7ddcefaba 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -364,14 +364,14 @@ Camera constants: { "iso": 100, "levels": 16350 }, // stdev 2.25 { "iso": [ 125, 160, 200, 250 ], "levels": 16340 }, // stdev 2.5 { "iso": [ 320, 400, 500 ], "levels": 16330 }, // stdev 2.95 - { "iso": [ 640, 800, 1000 ], "levels": 16320 },// stdev x, 4.0 , x - { "iso": [ 1250, 1600, 2000 ], "levels": 16300 },// stdev x, 6.0 , x + { "iso": [ 640, 800, 1000 ], "levels": 16320 }, // stdev x, 4.0 , x + { "iso": [ 1250, 1600, 2000 ], "levels": 16300 }, // stdev x, 6.0 , x { "iso": [ 2500, 3200, 4000 ], "levels": 16250 }, // STDEV x, 9.8 , x { "iso": [ 5000, 6400, 8000 ], "levels": 16150 }, // stdev x, 17, x - { "iso": [ 10000, 12800, 16000 ], "levels": 16100 },// stdev x, 34 , x - { "iso": [ 20000, 25600, 32000 ], "levels": 16000 },// stdev x, 68 , x - { "iso": [ 40000, 51200, 64000 ], "levels": 15700 },// stdev x, 125, x - { "iso": [ 80000, 102400 ], "levels": 15100 },// stdev x, 245 + { "iso": [ 10000, 12800, 16000 ], "levels": 16100 }, // stdev x, 34 , x + { "iso": [ 20000, 25600, 32000 ], "levels": 16000 }, // stdev x, 68 , x + { "iso": [ 40000, 51200, 64000 ], "levels": 15700 }, // stdev x, 125, x + { "iso": [ 80000, 102400 ], "levels": 15100 }, // stdev x, 245 { "iso": [ 204800 ], "levels": 14000 }, { "iso": [ 409600 ], "levels": 13000 } ], @@ -437,9 +437,9 @@ Camera constants: "white_max": 16383, "aperture_scaling": [ /* need more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.130 }, // - { "aperture": 1.6, "scale_factor": 1.100 }, // - { "aperture": 1.8, "scale_factor": 1.070 }, // + { "aperture": 1.4, "scale_factor": 1.160 }, // guessed + { "aperture": 1.6, "scale_factor": 1.120 }, // guessed + { "aperture": 1.8, "scale_factor": 1.080 }, // guessed { "aperture": 2.0, "scale_factor": 1.050 }, // 14171/13422=1.055 { "aperture": 2.2, "scale_factor": 1.035 }, // 13954/13422=1.039 { "aperture": 2.5, "scale_factor": 1.025 }, // 11400/11000=1.028 @@ -703,24 +703,27 @@ Camera constants: "masked_areas": [ 40, 96, 4000, 260 ], "ranges": { "white": [ - { "iso": [ 100, 125, 200, 250 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 + { "iso": [ 100 ], "levels": 16100 }, // nominal 16383, LENR blue 16243 + { "iso": [ 125, 200, 250, 400 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 { "iso": [ 160 ], "levels": 13000 }, // nominal 13097, - { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // G1,G2 13415 - { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 - { "iso": [ 6400, 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243, LENR B 16000 + { "iso": [ 320, 640, 1250 ], "levels": 13250 }, // G1,G2 13415 + { "iso": [ 500, 800, 1000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 + { "iso": [ 1600, 2000, 3200 ], "levels": 16100 }, // nominal 16383, LENR ISO3200 16150 + { "iso": [ 2500, 5000 ], "levels": 13150 }, // G1,G2 13415 + { "iso": [ 4000, 6400 ], "levels": 16050 }, // nominal 16383, LENR ISO6400 16050 + { "iso": [ 8000, 10000 ], "levels": 16000 }, // R,G1,G2 16383, B 16243, LENR B 16000 + { "iso": [ 12800, 16000, 25600 ], "levels": 15900 } // R,G1,G2 16383, B 16243, LENR BLUE 15750 ], "white_max": 16383, "aperture_scaling": [ // need for more data to properly fill all scale factors { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // + { "aperture": 1.6, "scale_factor": 1.130 }, // guessed + { "aperture": 1.8, "scale_factor": 1.090 }, // 14338/13097 = 1.094 + { "aperture": 2.0, "scale_factor": 1.060 }, // 13934/13097 = 1.063 + { "aperture": 2.2, "scale_factor": 1.025 }, // 13438/13097 = 1.026 + { "aperture": 2.5, "scale_factor": 1.005 }, // 13190/13097 = 1.007 + { "aperture": 2.8, "scale_factor": 1.000 } // 13097/13097 ] } }, @@ -954,6 +957,38 @@ Camera constants: } }, + { // Quality C, White Levels not properly indicated, aperture scaling..missing factors are guessed + "make_model": "Canon EOS M5", + "dcraw_matrix": [ 8532,-701,-1167,-4095,11879,2508,-797,2424,7010 ], // DNG_V9.8 D65 + "raw_crop": [ 264, 36, 6024, 4020 ], // full size 6288x4056, + //"raw_crop": [ 272, 44, 6008, 4008 ], // matched to official crop 276,48,6275,4047 - official jpeg 6000X4000 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100, 125, 200, 250 ], "levels": 15600 }, // nominal 15660-15800 + { "iso": [ 160 ], "levels": 13000 }, // guessed + { "iso": [ 320 ], "levels": 13200 }, // nominal green13528-14466-14380-14368 - blue13262-14186, + { "iso": [ 640, 1250 ], "levels": 13150 }, // iso 640 G1,G2 13260-13450 - blue13230-13430 -iso 1250 13430 + { "iso": [ 2500, 5000, 10000 ], "levels": 13100 }, // + { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400 ], "levels": 16100 }, // 16383 + { "iso": [ 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243 + ], + "white_max": 16383, + "aperture_scaling": [ + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // 31/25 + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.050 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // 15292/ 14916/ 320-14466/ 320-13528/ + { "aperture": 2.2, "scale_factor": 1.020 }, // guessed + { "aperture": 2.5, "scale_factor": 1.010 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + // Canon Powershot { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out @@ -977,10 +1012,10 @@ Camera constants: { // Quality A, changes for raw crop which is optimistic in dcraw "make_model": "Canon PowerShot G12", "dcraw_matrix": [ 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 ], - //"raw_crop": [ 62, 18, 3666, 2748 ],// max usable - "raw_crop": [ 68, 20, 3656, 2744 ],// equal to official Canon frame, 72,24,3719,2759 = 3648x2736 - "masked_areas": [ 24, 40, 2770, 44 ],// as declared in maker data - "ranges": { "white": 4080 } // + //"raw_crop": [ 62, 18, 3666, 2748 ], // max usable + "raw_crop": [ 68, 20, 3656, 2744 ], // equal to official Canon frame, 72,24,3719,2759 = 3648x2736 + "masked_areas": [ 24, 40, 2770, 44 ], // as declared in maker data + "ranges": { "white": 4080 } }, { // Quality B, needs a way to auto apply 3/2 or 4/3 crops (read Exif tags ..) to work better with auto distortion, @@ -1061,6 +1096,12 @@ Camera constants: "ranges": { "white": 4050 } }, + { // Quality B + "make_model": "FUJIFILM X-A3", + "dcraw_matrix": [ 12407,-5222,-1086,-2971,11116,2120,-294,1029,5284 ], // DNGv9.8 D65 + "ranges": { "white": 4050 } + }, + { // Quality B "make_model": [ "FUJIFILM X-T1", "FUJIFILM X-T10", "FUJIFILM X-E2" ], "dcraw_matrix": [ 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 ], // DNG D65 @@ -1228,8 +1269,8 @@ Camera constants: }, { // Quality B - "make_model": "Nikon D5500", - "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.0 d65 + "make_model": [ "Nikon D5500", "Nikon D5600" ], + "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.8 d65 "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, @@ -1239,8 +1280,8 @@ Camera constants: "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, }, - { // Quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction - // aperture scaling known to exist, but little to gain as the levels are so close to white_max + { // Quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction + // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D600", "dcraw_matrix": [ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 ], // dcp d65 //"raw_crop": [ 0, 0, 6034, 4028 ], // dcraw @@ -1332,9 +1373,10 @@ Camera constants: } }, - { // Quality C, 20Mp and 80Mp raw frames, Color matrix copied from EM5MKII which looks to be close. + { // Quality B, 20Mp and 80Mp raw frames, "make_model": "OLYMPUS E-M1MarkII", - "dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // E-M5II dng_v9.5 D65 + //"dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // E-M5II dng_v9.5 D65 + "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], // beta, dng_v9.8 D65 "raw_crop": [ 8, 8, -16, -8 ], // full raw 5240X3912, jpeg top12,left12,5184x3888, full hires 10400X7792, jpeg crop 8,8,10368x7776 "ranges": { "white": [ @@ -1367,8 +1409,8 @@ Camera constants: }, { // Quality B, with long exposure noise reduction White Level gets WL-BL = around 256_12-bit levels less - "make_model": "OLYMPUS E-PL7", - "dcraw_matrix": [ 9197,-3190,-659,-2606,10830,2039,-458,1250,5458 ], // DNG_V8.7 D65 + "make_model": [ "OLYMPUS E-PL7", "OLYMPUS E-PL8" ], + "dcraw_matrix": [ 9197,-3190,-659,-2606,10830,2039,-458,1250,5458 ], // DNG_v9.8 D65 "ranges": { "white": 4080 } // nominal 4093 }, @@ -1421,6 +1463,19 @@ Camera constants: } }, + { // Quality B, + "make_model": [ "Panasonic DMC-FZ2500", "Panasonic DMC-FZ2000", "Panasonic DMC-FZH1" ], + "dcraw_matrix": [ 7386,-2443,-743,-3437,11864,1757,-608,1660,4766 ], // dcp_v9.8 d65 + "ranges": { + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } + }, + { // Quality A, samples by helices at RT forums and Chris Power at github "make_model": [ "Panasonic DMC-ZS100", "Panasonic DMC-ZS110", "Panasonic DMC-TZ100", "Panasonic DMC-TZ101", "Panasonic DMC-TZ110", "Panasonic DMC-TX1" ], "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // dcp_v8.6 d65 @@ -1615,7 +1670,7 @@ Camera constants: { // Quality A "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70" ], - "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.1 D65 + "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], // DNG_v9.1 D65 "ranges": { "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset "white": [ @@ -1628,7 +1683,7 @@ Camera constants: { // Quality B "make_model": [ "Panasonic DMC-GX80", "Panasonic DMC-GX85", "Panasonic DMC-GX7MK2" ], - "dcraw_matrix": [ 7771,-3020,-629,-4029,11950,2345,-821,1977,6119 ],// DNG_v9.6 D65 + "dcraw_matrix": [ 7771,-3020,-629,-4029,11950,2345,-821,1977,6119 ], // DNG_v9.6 D65 "ranges": { "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset "white": [ @@ -1641,7 +1696,7 @@ Camera constants: { // Quality B, Same as Panasonic G7 "make_model": [ "Panasonic DMC-G8", "Panasonic DMC-G80", "Panasonic DMC-G81", "Panasonic DMC-G85" ], - "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.7 D65 + "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], // DNG_v9.7 D65 "ranges": { "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset "white": [ @@ -1665,22 +1720,29 @@ Camera constants: } }, - { // Quality B, uncertainty about ISO 100 WL + { // Quality B, samples by Ingo, missing some long exposure at high ISO samples with LENR ON "make_model": [ "Panasonic DMC-LX100", "Leica D-LUX (Typ 109)" ], "dcraw_matrix": [ 8844,-3538,-768,-3709,11762,2200,-698,1792,5220 ], // DNG_V8.7 d65 //"dcraw_matrix": [ 6538,-1614,-549,-5475,13096,2646,-1780,2799,5612 ], // calculated from DxO D50 "ranges": { "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset. "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2400-2700 Exif_linearitylimit 2111 - { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + { "iso": 100, "levels": 2400 }, // gaussian R,B 2450-2700 G1,G2 2550-2800 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3000 }, // gaussian R,B 3050-3350 G1,G2 3170-3480 Exif_linearitylimit 2626 + { "iso": 160, "levels": 3800 }, // gaussian R,B 3850-median 4020 G1,G2 3870-median 4050 Exif_linearitylimit 3277 + { "iso": [ 200, 250, 320, 400 ], "levels": 4080 }, // nominal 4095 + { "iso": [ 500, 640, 800, 1000, 1250, 1600 ], "levels": 4060 }, // nominal 4095 + { "iso": [ 2000, 2500 ], "levels": 4040 }, // nominal 4095 + { "iso": [ 3200, 4000, 5000 ], "levels": 3950 }, // nominal 4095 + { "iso": [ 6400, 8000, 10000 ], "levels": 4020 }, // nominal 4095 + { "iso": [ 12800, 16000, 20000, 25600 ], "levels": 4000 } // nominal 4095 ] } }, - { // Quality C, Color matrix guessed, Intemediate ISOs missing - "make_model": [ "Panasonic DMC-LX10", "Panasonic DMC-LX15" ], - "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], //copy from TZ100 dcp_v8.6 d65 + { // Quality B, Intermediate ISOs missing + "make_model": [ "Panasonic DMC-LX9", "Panasonic DMC-LX10", "Panasonic DMC-LX15" ], + "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // DNg_v9.8 d65 "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 Exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. "ranges": { "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset. @@ -1700,8 +1762,10 @@ Camera constants: { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid "make_model": [ "RICOH PENTAX K-70", "PENTAX K-70" ], - "dcraw_matrix": [ 8050,-2061,-1264,-4359,12953,1515,-1096,1965,6075 ], // PENTAX DNG D65 - "raw_crop": [ 58, 28, 6022, 4024 ], // full frame 6080x4064, cropped to official DNG raw_crop 28,58,6080,4052, official jpeg crop 6000x4000 + //"dcraw_matrix": [ 8050,-2061,-1264,-4359,12953,1515,-1096,1965,6075 ], // PENTAX DNG D65 + "dcraw_matrix": [ 8766,-3149,-747,-3976,11943,2292,-517,1259,5552 ], // Adobe DNGv9.8 D65 + "raw_crop": [ 58, 28, 6022, 4020 ], // full frame 6080x4064, usefull raw frame 56,28,6080,4049, official DNG raw_crop 58,28,6080,4052, official jpeg crop 58+8,28+4 6000x4000 + // "raw_crop": [ 62, 28, 6000, 4000 ], // matched to official jpeg crop 58+8,28+4 6000x4000 "ranges": { "white": [ { "iso": 100, "levels": 16300 }, // 16319-16377 @@ -1752,7 +1816,7 @@ Camera constants: { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX 645Z", "PENTAX 645Z" ], "dcraw_matrix": [ 9519,-3591,-664,-4074,11725,2671,-624,1501,6653 ], // adobe dcp d65 - "raw_crop": [ 48, 0, 8276, 6208 ],// full sensor 8384x6208 - official jpeg 8256x6192 + "raw_crop": [ 48, 0, 8276, 6208 ], // full sensor 8384x6208 - official jpeg 8256x6192 "ranges": { "white": [ { "iso": 100, "levels": 16310 }, // 16317 or 16350 @@ -1809,22 +1873,23 @@ Camera constants: { // Quality C, corrections for frame size, black and white levels not declared properly "make_model": "Sigma SD9", "dcraw_matrix": [ 14996,-3468,-1425,5576,3642,972,1761,3773,3720 ], // experimental calculated from sun0.icc data - "ranges": { "black": 0, "white": 16383 },// black is already subtracted by dcraw, white copied from x3dump data + "ranges": { "black": 0, "white": 16383 }, // black is already subtracted by dcraw, white copied from x3dump data "raw_crop": [ 20, 8, -18, -12 ] }, { // Quality C, corrections for frame size, black level not declared properly "make_model": "Sigma SD10", "dcraw_matrix": [ 12555,-1865,-1125,5093,4120,867,1929,3810,3507 ], // experimental calculated from .icc data - "ranges": { "black": 0, "white": 16383 },// black is already subtracted by dcraw, white copied from x3dump data + "ranges": { "black": 0, "white": 16383 }, // black is already subtracted by dcraw, white copied from x3dump data //"raw_crop": [ 0, 0, -0, -0 ] "raw_crop": [ 20, 8, -18, -12 ] }, + { // Quality C, corrections for frame size, black and white levels not declared properly "make_model": "Sigma SD14", "dcraw_matrix": [ 16411,-4764,-2383,8110,2603,-645,3135,3878,1984 ], // experimental inverted icc wp12 - build with BL=15 //"dcraw_matrix": [ 13804,-4156,-1896,6917,1909,-431,2768,2989,1741 ], // experimental inverted icc wp10 - build with BL=15 - "ranges": { "black": 0, "white": 16383 },// peripheral black stripes give BL around 37 + "ranges": { "black": 0, "white": 16383 }, // peripheral black stripes give BL around 37 "raw_crop": [ 0, 0, -0, -0 ] //"raw_crop": [ 18, 12, 2652, 1768 ] }, @@ -1832,7 +1897,7 @@ Camera constants: { // Quality C, correction for frame width "make_model": "Sigma SD1", "dcraw_matrix": [ 5270,42,-814,3737,5506,124,1112,9714,4510 ], // experimental from icm 1.04477,-0.74838,1.01617, -0.54028,2.52690,-3.83257, 0.54869,-0.69556,3.73746 - "ranges": { "black": 16, "white": 4070 },// BL is 16 or 31, should be measured at the horizontal black stripe at the top + "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the top "raw_crop": [ 12, 52, -110, -8 ] }, @@ -1883,6 +1948,13 @@ Camera constants: "ranges": { "black": 512, "white": 16300 } }, + { // Quality B, correction for frame width, crop modes covered + "make_model": "Sony ILCA-99M2", + "dcraw_matrix": [ 6660,-1918,-471,-4613,12398,2485,-649,1433,6447 ], // DNG_v9.8 D65 + "raw_crop": [ 0, 0, -36, 0 ], // full raw frame 8000x5320 - 36 rightmost columns are garbage + "ranges": { "black": 512, "white": 16300 } + }, + { // Quality A, correction for frame width "make_model": [ "Sony ILCE-3000", "Sony ILCE-3500", "Sony ILCE-5000", "Sony ILCE-QX1" ], "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 @@ -1905,8 +1977,8 @@ Camera constants: }, { // Quality A - "make_model": "Sony ILCE-6300", - "dcraw_matrix": [ 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 ], // DNG_v9.5 D65 + "make_model": [ "Sony ILCE-6300","Sony ILCE-6500" ], + "dcraw_matrix": [ 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 ], // DNG_v9.8 D65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, @@ -1939,8 +2011,8 @@ Camera constants: }, { // Quality A - "make_model": [ "Sony DSC-RX100M3", "Sony DSC-RX100M4", "Sony DSC-RX100M5" ], - "dcraw_matrix": [ 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 ], // DNG_v9.1.1 D65 + "make_model": [ "Sony DSC-RX100M2", "Sony DSC-RX100M3", "Sony DSC-RX100M4", "Sony DSC-RX100M5" ], + "dcraw_matrix": [ 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 ], // DNG_v9.8 D65 "ranges": { "black": 800, "white": 16300 } }, @@ -1950,7 +2022,7 @@ Camera constants: "ranges": { "black": 800, "white": 16300 } }, - { // Quality C, No proper color data, beta samples, frame set to official jpeg, WL corrections need adobe_coeff setting in dcraw.cc to become active + { // Quality C, No proper color data, beta samples, frame set to official jpeg, "make_model": "XIAOYI M1", "dcraw_matrix": [ 7158,-1911,-606,-3603,10669,2530,-659,1236,5530 ], // XIAO YI DNG D65 "raw_crop": [ 4, 3, 5192, 3896 ], // full raw 5200x3902, official jpeg 5184X3888