Some cleanups
This commit is contained in:
parent
f054ed00e8
commit
2a4891827d
@ -869,7 +869,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw
|
|||||||
mean = (sum / ((height) * width)) / 327.68f; //for Yb for all image...if one day "pipette" we can adapt Yb for each zone
|
mean = (sum / ((height) * width)) / 327.68f; //for Yb for all image...if one day "pipette" we can adapt Yb for each zone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef _OPENMP
|
||||||
|
static_cast<void>(numThreads); // to silence cppcheck warning
|
||||||
|
#endif
|
||||||
|
|
||||||
//evaluate lightness, contrast
|
//evaluate lightness, contrast
|
||||||
}
|
}
|
||||||
@ -1469,8 +1471,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int pW, int pw
|
|||||||
if (ciedata) { //only with improccoordinator
|
if (ciedata) { //only with improccoordinator
|
||||||
// Data for J Q M s and C histograms
|
// Data for J Q M s and C histograms
|
||||||
int posl, posc;
|
int posl, posc;
|
||||||
float brli = 327.f;
|
float brli;
|
||||||
float chsacol = 327.f;
|
float chsacol;
|
||||||
float libr;
|
float libr;
|
||||||
float colch;
|
float colch;
|
||||||
|
|
||||||
@ -2049,17 +2051,25 @@ filmlike_clip (float *r, float *g, float *b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve,
|
void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve,
|
||||||
int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve,
|
int sat, const LUTf& rCurve, const LUTf& gCurve, const LUTf& bCurve, float satLimit, float satLimitOpacity,
|
||||||
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 DCPProfileApplyState &asIn, LUTu &histToneCurve, size_t chunkSize, bool measure)
|
const ColorGradientCurve& ctColorCurve, const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clToningcurve, const 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 DCPProfileApplyState& asIn,
|
||||||
|
LUTu& histToneCurve, size_t chunkSize, bool measure)
|
||||||
{
|
{
|
||||||
rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, 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, chunkSize, measure);
|
rgbProc(working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, 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, chunkSize, measure);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process RGB image and convert to LAB space
|
// Process RGB image and convert to LAB space
|
||||||
void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve,
|
void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve,
|
||||||
int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve,
|
int sat, const LUTf& rCurve, const LUTf& gCurve, const LUTf& bCurve, float satLimit, float satLimitOpacity,
|
||||||
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 DCPProfileApplyState &asIn, LUTu &histToneCurve, size_t chunkSize, bool measure)
|
const ColorGradientCurve& ctColorCurve, const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clToningcurve, const 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 DCPProfileApplyState& asIn, LUTu& histToneCurve, size_t chunkSize, bool measure)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::unique_ptr<StopWatch> stop;
|
std::unique_ptr<StopWatch> stop;
|
||||||
@ -3758,10 +3768,9 @@ void ImProcFunctions::toningsmh(float r, float g, float b, float &ro, float &go,
|
|||||||
float rlo; //0.4 0.5
|
float rlo; //0.4 0.5
|
||||||
float rlm; //1.1
|
float rlm; //1.1
|
||||||
float rlh; //1.1
|
float rlh; //1.1
|
||||||
float rlob; //for BW old mode
|
|
||||||
|
|
||||||
if (mode == 0) { //colour
|
if (mode == 0) { //colour
|
||||||
rlo = rlob = strProtect; //0.5 ==> 0.75
|
rlo = strProtect; //0.5 ==> 0.75
|
||||||
rlh = 2.2f * strProtect;
|
rlh = 2.2f * strProtect;
|
||||||
rlm = 1.5f * strProtect;
|
rlm = 1.5f * strProtect;
|
||||||
constexpr float v0 = 0.15f;
|
constexpr float v0 = 0.15f;
|
||||||
@ -3778,7 +3787,6 @@ void ImProcFunctions::toningsmh(float r, float g, float b, float &ro, float &go,
|
|||||||
}
|
}
|
||||||
} else { //bw coefficient to preserve same results as before for satlimtopacity = 0.5 (default)
|
} else { //bw coefficient to preserve same results as before for satlimtopacity = 0.5 (default)
|
||||||
rlo = strProtect * 0.8f; //0.4
|
rlo = strProtect * 0.8f; //0.4
|
||||||
rlob = strProtect; //0.5
|
|
||||||
rlm = strProtect * 2.2f; //1.1
|
rlm = strProtect * 2.2f; //1.1
|
||||||
rlh = strProtect * 2.4f; //1.2
|
rlh = strProtect * 2.4f; //1.2
|
||||||
if (v > 0.15f) {
|
if (v > 0.15f) {
|
||||||
@ -4080,7 +4088,7 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g
|
|||||||
* @param iplow iphigh [0..1] luminance
|
* @param iplow iphigh [0..1] luminance
|
||||||
* @param wp wip 3x3 matrix and inverse conversion rgb XYZ
|
* @param wp wip 3x3 matrix and inverse conversion rgb XYZ
|
||||||
**/
|
**/
|
||||||
void ImProcFunctions::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 ImProcFunctions::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, const LUTf & clToningcurve, const LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] )
|
||||||
{
|
{
|
||||||
ro = CLIP(r);
|
ro = CLIP(r);
|
||||||
go = CLIP(g);
|
go = CLIP(g);
|
||||||
@ -4139,7 +4147,7 @@ void ImProcFunctions::labtoning (float r, float g, float b, float &ro, float &go
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ImProcFunctions::luminanceCurve (LabImage* lold, LabImage* lnew, LUTf & curve)
|
void ImProcFunctions::luminanceCurve (LabImage* lold, LabImage* lnew, const LUTf& curve)
|
||||||
{
|
{
|
||||||
|
|
||||||
int W = lold->W;
|
int W = lold->W;
|
||||||
@ -4159,7 +4167,7 @@ void ImProcFunctions::luminanceCurve (LabImage* lold, LabImage* lnew, LUTf & cur
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf & acurve, LUTf & bcurve, LUTf & satcurve, LUTf & lhskcurve, LUTf & clcurve, LUTf & curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLCurve)
|
void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, const LUTf& acurve, const LUTf& bcurve, const LUTf& satcurve, const LUTf& lhskcurve, const LUTf& clcurve, LUTf & curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLCurve)
|
||||||
{
|
{
|
||||||
|
|
||||||
int W = lold->W;
|
int W = lold->W;
|
||||||
@ -5353,7 +5361,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
|
|||||||
int imax = 65536 >> histcompr;
|
int imax = 65536 >> histcompr;
|
||||||
int overex = 0;
|
int overex = 0;
|
||||||
float sum = 0.f, hisum = 0.f, losum = 0.f;
|
float sum = 0.f, hisum = 0.f, losum = 0.f;
|
||||||
float ave = 0.f, hidev = 0.f, lodev = 0.f;
|
float ave = 0.f;
|
||||||
|
|
||||||
//find average luminance
|
//find average luminance
|
||||||
histogram.getSumAndAverage (sum, ave);
|
histogram.getSumAndAverage (sum, ave);
|
||||||
@ -5381,36 +5389,32 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double
|
|||||||
float octile[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, ospread = 0.f;
|
float octile[8] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}, ospread = 0.f;
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
int i = 0;
|
int j = 0;
|
||||||
|
|
||||||
for (; i < min ((int)ave, imax); i++) {
|
for (; j < min ((int)ave, imax); ++j) {
|
||||||
if (count < 8) {
|
if (count < 8) {
|
||||||
octile[count] += histogram[i];
|
octile[count] += histogram[j];
|
||||||
|
|
||||||
if (octile[count] > sum / 8.f || (count == 7 && octile[count] > sum / 16.f)) {
|
if (octile[count] > sum / 8.f || (count == 7 && octile[count] > sum / 16.f)) {
|
||||||
octile[count] = xlog (1. + (float)i) / log (2.f);
|
octile[count] = xlog (1. + (float)j) / log (2.f);
|
||||||
count++;// = min(count+1,7);
|
count++;// = min(count+1,7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//lodev += SQR(ave-i)*histogram[i];
|
losum += histogram[j];
|
||||||
lodev += (xlog (ave + 1.f) - xlog ((float)i + 1.)) * histogram[i];
|
|
||||||
losum += histogram[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; i < imax; i++) {
|
for (; j < imax; ++j) {
|
||||||
if (count < 8) {
|
if (count < 8) {
|
||||||
octile[count] += histogram[i];
|
octile[count] += histogram[j];
|
||||||
|
|
||||||
if (octile[count] > sum / 8.f || (count == 7 && octile[count] > sum / 16.f)) {
|
if (octile[count] > sum / 8.f || (count == 7 && octile[count] > sum / 16.f)) {
|
||||||
octile[count] = xlog (1. + (float)i) / log (2.f);
|
octile[count] = xlog (1. + (float)j) / log (2.f);
|
||||||
count++;// = min(count+1,7);
|
count++;// = min(count+1,7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//hidev += SQR(i-ave)*histogram[i];
|
hisum += histogram[j];
|
||||||
hidev += (xlog ((float)i + 1.) - xlog (ave + 1.f)) * histogram[i];
|
|
||||||
hisum += histogram[i];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,14 +124,19 @@ public:
|
|||||||
|
|
||||||
void firstAnalysis(const Imagefloat* const working, const procparams::ProcParams ¶ms, LUTu & vhist16);
|
void firstAnalysis(const Imagefloat* const working, const procparams::ProcParams ¶ms, LUTu & vhist16);
|
||||||
void updateColorProfiles(const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck);
|
void updateColorProfiles(const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck);
|
||||||
void rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve,
|
void rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve,
|
||||||
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,
|
int sat, const LUTf& rCurve, const LUTf& gCurve, const LUTf& bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve& ctColorCurve,
|
||||||
const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfileApplyState &asIn, LUTu &histToneCurve, size_t chunkSize = 1, bool measure = false);
|
const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clcurve, const LUTf& cl2curve, const ToneCurve& customToneCurve1,
|
||||||
void rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve,
|
const ToneCurve& customToneCurve2, const ToneCurve& customToneCurvebw1, const ToneCurve& customToneCurvebw2,
|
||||||
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,
|
double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf,
|
||||||
const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob,
|
const DCPProfileApplyState& asIn, LUTu& histToneCurve, size_t chunkSize = 1, bool measure = false);
|
||||||
double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfileApplyState &asIn, LUTu &histToneCurve, size_t chunkSize = 1, bool measure = false);
|
void rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve,
|
||||||
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]);
|
int sat, const LUTf& rCurve, const LUTf& gCurve, const LUTf& bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve& ctColorCurve,
|
||||||
|
const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clcurve, const 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 DCPProfileApplyState& asIn, LUTu& histToneCurve, size_t chunkSize = 1, bool measure = false);
|
||||||
|
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, const LUTf & clToningcurve, const 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 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, 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, float strProtect);
|
||||||
void toningsmh2(float r, float g, float b, float &ro, float &go, float &bo, float low[3], float satLow, float med[3], float satMed, float high[3], float satHigh, float reducac, int mode, int preser);
|
void toningsmh2(float r, float g, float b, float &ro, float &go, float &bo, float low[3], float satLow, float med[3], float satMed, float high[3], float satHigh, float reducac, int mode, int preser);
|
||||||
@ -141,12 +146,12 @@ public:
|
|||||||
void retreavergb(float &r, float &g, float &b);
|
void retreavergb(float &r, float &g, float &b);
|
||||||
void moyeqt(Imagefloat* working, float &moyS, float &eqty);
|
void moyeqt(Imagefloat* working, float &moyS, float &eqty);
|
||||||
|
|
||||||
void luminanceCurve(LabImage* lold, LabImage* lnew, LUTf &curve);
|
void luminanceCurve(LabImage* lold, LabImage* lnew, const LUTf &curve);
|
||||||
void ciecam_02float(CieImage* ncie, float adap, int pW, int pwb, LabImage* lab, const procparams::ProcParams* params,
|
void ciecam_02float(CieImage* ncie, float adap, int pW, int pwb, LabImage* lab, const procparams::ProcParams* params,
|
||||||
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3,
|
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3,
|
||||||
LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt,
|
LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt,
|
||||||
bool showSharpMask = false);
|
bool showSharpMask = false);
|
||||||
void chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve);
|
void chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, const LUTf& acurve, const LUTf& bcurve, const LUTf& satcurve, const LUTf& satclcurve, const LUTf& clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve);
|
||||||
void vibrance(LabImage* lab); //Jacques' vibrance
|
void vibrance(LabImage* lab); //Jacques' vibrance
|
||||||
// void colorCurve (LabImage* lold, LabImage* lnew);
|
// void colorCurve (LabImage* lold, LabImage* lnew);
|
||||||
void sharpening(LabImage* lab, const procparams::SharpeningParams &sharpenParam, bool showMask = false);
|
void sharpening(LabImage* lab, const procparams::SharpeningParams &sharpenParam, bool showMask = false);
|
||||||
|
@ -206,7 +206,7 @@ std::unique_ptr<RawImageSource::CFALineDenoiseRowBlender> PDAFLinesFilter::lineD
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int PDAFLinesFilter::markLine(array2D<float> &rawData, PixelsMap &bpMap, int y)
|
int PDAFLinesFilter::markLine(const array2D<float> &rawData, PixelsMap &bpMap, int y)
|
||||||
{
|
{
|
||||||
rowmap_.clear();
|
rowmap_.clear();
|
||||||
rowmap_.resize((W_+1)/2, false);
|
rowmap_.resize((W_+1)/2, false);
|
||||||
@ -258,7 +258,7 @@ int PDAFLinesFilter::markLine(array2D<float> &rawData, PixelsMap &bpMap, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int PDAFLinesFilter::mark(array2D<float> &rawData, PixelsMap &bpMap)
|
int PDAFLinesFilter::mark(const array2D<float> &rawData, PixelsMap &bpMap)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (pattern_.empty()) {
|
if (pattern_.empty()) {
|
||||||
|
@ -36,12 +36,12 @@ public:
|
|||||||
explicit PDAFLinesFilter(RawImage *ri);
|
explicit PDAFLinesFilter(RawImage *ri);
|
||||||
~PDAFLinesFilter();
|
~PDAFLinesFilter();
|
||||||
|
|
||||||
int mark(array2D<float> &rawData, PixelsMap &bpMap);
|
int mark(const array2D<float> &rawData, PixelsMap &bpMap);
|
||||||
RawImageSource::GreenEqulibrateThreshold &greenEqThreshold();
|
RawImageSource::GreenEqulibrateThreshold &greenEqThreshold();
|
||||||
std::unique_ptr<RawImageSource::CFALineDenoiseRowBlender> lineDenoiseRowBlender();
|
std::unique_ptr<RawImageSource::CFALineDenoiseRowBlender> lineDenoiseRowBlender();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int markLine(array2D<float> &rawData, PixelsMap &bpMap, int y);
|
int markLine(const array2D<float>& rawData, PixelsMap &bpMap, int y);
|
||||||
|
|
||||||
RawImage *ri_;
|
RawImage *ri_;
|
||||||
int W_;
|
int W_;
|
||||||
|
@ -802,17 +802,7 @@ private:
|
|||||||
|
|
||||||
void stage_denoise()
|
void stage_denoise()
|
||||||
{
|
{
|
||||||
procparams::ProcParams& params = job->pparams;
|
const procparams::ProcParams& params = job->pparams;
|
||||||
//ImProcFunctions ipf (¶ms, true);
|
|
||||||
ImProcFunctions &ipf = * (ipf_p.get());
|
|
||||||
|
|
||||||
// perform luma/chroma denoise
|
|
||||||
// CieImage *cieView;
|
|
||||||
// NoisCurve noiseLCurve;
|
|
||||||
// bool lldenoiseutili=false;
|
|
||||||
// Imagefloat *calclum ;
|
|
||||||
// params.dirpyrDenoise.getCurves(noiseLCurve, lldenoiseutili);
|
|
||||||
// if (params.dirpyrDenoise.enabled && lldenoiseutili) {
|
|
||||||
|
|
||||||
DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; // make a copy because we cheat here
|
DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; // make a copy because we cheat here
|
||||||
|
|
||||||
@ -845,9 +835,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (denoiseParams.enabled) {
|
if (denoiseParams.enabled) {
|
||||||
// CurveFactory::denoiseLL(lldenoiseutili, denoiseParams.lcurve, Noisecurve,1);
|
ImProcFunctions &ipf = * (ipf_p.get());
|
||||||
//denoiseParams.getCurves(noiseLCurve);
|
|
||||||
// ipf.RGB_denoise(baseImg, baseImg, calclum, imgsrc->isRAW(), denoiseParams, params.defringe, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, lldenoiseutili);
|
|
||||||
float nresi, highresi;
|
float nresi, highresi;
|
||||||
int kall = 2;
|
int kall = 2;
|
||||||
ipf.RGB_denoise (kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, nresi, highresi);
|
ipf.RGB_denoise (kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, nresi, highresi);
|
||||||
@ -869,7 +857,7 @@ private:
|
|||||||
|
|
||||||
void stage_transform()
|
void stage_transform()
|
||||||
{
|
{
|
||||||
procparams::ProcParams& params = job->pparams;
|
const procparams::ProcParams& params = job->pparams;
|
||||||
//ImProcFunctions ipf (¶ms, true);
|
//ImProcFunctions ipf (¶ms, true);
|
||||||
ImProcFunctions &ipf = * (ipf_p.get());
|
ImProcFunctions &ipf = * (ipf_p.get());
|
||||||
|
|
||||||
@ -1084,13 +1072,10 @@ private:
|
|||||||
ipf.vibrance (labView);
|
ipf.vibrance (labView);
|
||||||
ipf.labColorCorrectionRegions(labView);
|
ipf.labColorCorrectionRegions(labView);
|
||||||
|
|
||||||
if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) {
|
|
||||||
ipf.impulsedenoise (labView);
|
|
||||||
}
|
|
||||||
|
|
||||||
// for all treatments Defringe, Sharpening, Contrast detail ,Microcontrast they are activated if "CIECAM" function are disabled
|
// for all treatments Defringe, Sharpening, Contrast detail ,Microcontrast they are activated if "CIECAM" function are disabled
|
||||||
|
|
||||||
if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) {
|
if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) {
|
||||||
|
ipf.impulsedenoise (labView);
|
||||||
ipf.defringe (labView);
|
ipf.defringe (labView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ void Adjuster::autoToggled ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (adjusterListener != nullptr && !blocked) {
|
if (adjusterListener != nullptr && !blocked) {
|
||||||
adjusterListener->adjusterAutoToggled(this, automatic->get_active());
|
adjusterListener->adjusterAutoToggled(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ bool Adjuster::notifyListenerAutoToggled ()
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (adjusterListener != nullptr && !blocked) {
|
if (adjusterListener != nullptr && !blocked) {
|
||||||
adjusterListener->adjusterAutoToggled(this, automatic->get_active());
|
adjusterListener->adjusterAutoToggled(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -28,7 +28,7 @@ class AdjusterListener
|
|||||||
public:
|
public:
|
||||||
virtual ~AdjusterListener() = default;
|
virtual ~AdjusterListener() = default;
|
||||||
virtual void adjusterChanged (Adjuster* a, double newval) = 0;
|
virtual void adjusterChanged (Adjuster* a, double newval) = 0;
|
||||||
virtual void adjusterAutoToggled (Adjuster* a, bool newval) {}
|
virtual void adjusterAutoToggled (Adjuster* a) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef double(*double2double_fun)(double val);
|
typedef double(*double2double_fun)(double val);
|
||||||
|
@ -344,9 +344,8 @@ bool BatchQueue::loadBatchQueue ()
|
|||||||
|
|
||||||
auto job = rtengine::ProcessingJob::create (source, thumb->getType () == FT_Raw, pparams, fast);
|
auto job = rtengine::ProcessingJob::create (source, thumb->getType () == FT_Raw, pparams, fast);
|
||||||
|
|
||||||
auto prevh = getMaxThumbnailHeight ();
|
const auto prevh = getMaxThumbnailHeight ();
|
||||||
auto prevw = prevh;
|
const auto prevw = thumb->getThumbnailWidth(prevh, &pparams);
|
||||||
thumb->getThumbnailSize (prevw, prevh, &pparams);
|
|
||||||
|
|
||||||
auto entry = new BatchQueueEntry (job, pparams, source, prevw, prevh, thumb, options.overwriteOutputFile);
|
auto entry = new BatchQueueEntry (job, pparams, source, prevw, prevh, thumb, options.overwriteOutputFile);
|
||||||
thumb->decreaseRef (); // Removing the refCount acquired by cacheMgr->getEntry
|
thumb->decreaseRef (); // Removing the refCount acquired by cacheMgr->getEntry
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "batchqueuepanel.h"
|
#include "batchqueuepanel.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "preferences.h"
|
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
#include "rtwindow.h"
|
#include "rtwindow.h"
|
||||||
#include "soundman.h"
|
#include "soundman.h"
|
||||||
|
@ -672,7 +672,7 @@ void BayerProcess::checkBoxToggled (CheckBox* c, CheckValue newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BayerProcess::adjusterAutoToggled(Adjuster* a, bool newval)
|
void BayerProcess::adjusterAutoToggled(Adjuster* a)
|
||||||
{
|
{
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (dualDemosaicContrast->getAutoInconsistent()) {
|
if (dualDemosaicContrast->getAutoInconsistent()) {
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
void methodChanged();
|
void methodChanged();
|
||||||
void imageNumberChanged();
|
void imageNumberChanged();
|
||||||
void adjusterChanged(Adjuster* a, double newval) override;
|
void adjusterChanged(Adjuster* a, double newval) override;
|
||||||
void adjusterAutoToggled (Adjuster* a, bool newval) override;
|
void adjusterAutoToggled (Adjuster* a) override;
|
||||||
void checkBoxToggled(CheckBox* c, CheckValue newval) override;
|
void checkBoxToggled(CheckBox* c, CheckValue newval) override;
|
||||||
void pixelShiftMotionMethodChanged();
|
void pixelShiftMotionMethodChanged();
|
||||||
void pixelShiftDemosaicMethodChanged();
|
void pixelShiftDemosaicMethodChanged();
|
||||||
|
@ -1565,7 +1565,7 @@ void ColorAppearance::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorAppearance::adjusterAutoToggled(Adjuster* a, bool newval)
|
void ColorAppearance::adjusterAutoToggled(Adjuster* a)
|
||||||
{
|
{
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (degree->getAutoInconsistent()) {
|
if (degree->getAutoInconsistent()) {
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
|
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
|
||||||
void setBatchMode (bool batchMode) override;
|
void setBatchMode (bool batchMode) override;
|
||||||
void adjusterChanged (Adjuster* a, double newval) override;
|
void adjusterChanged (Adjuster* a, double newval) override;
|
||||||
void adjusterAutoToggled (Adjuster* a, bool newval) override;
|
void adjusterAutoToggled (Adjuster* a) override;
|
||||||
// void adjusterAdapToggled (Adjuster* a, bool newval);
|
// void adjusterAdapToggled (Adjuster* a, bool newval);
|
||||||
void enabledChanged () override;
|
void enabledChanged () override;
|
||||||
void surroundChanged ();
|
void surroundChanged ();
|
||||||
|
@ -259,7 +259,7 @@ void CropWindow::getCropAnchorPosition (int& x, int& y)
|
|||||||
cropHandler.getAnchorPosition(x, y);
|
cropHandler.getAnchorPosition(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CropWindow::setCropAnchorPosition (int& x, int& y)
|
void CropWindow::setCropAnchorPosition (int x, int y)
|
||||||
{
|
{
|
||||||
cropHandler.setAnchorPosition(x, y);
|
cropHandler.setAnchorPosition(x, y);
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ public:
|
|||||||
void centerCrop (bool update = true);
|
void centerCrop (bool update = true);
|
||||||
void getCropSize (int& w, int& h);
|
void getCropSize (int& w, int& h);
|
||||||
void getCropAnchorPosition (int& w, int& h);
|
void getCropAnchorPosition (int& w, int& h);
|
||||||
void setCropAnchorPosition (int& w, int& h);
|
void setCropAnchorPosition (int w, int h);
|
||||||
|
|
||||||
// listeners
|
// listeners
|
||||||
void setCropGUIListener (CropGUIListener* cgl);
|
void setCropGUIListener (CropGUIListener* cgl);
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "adjuster.h"
|
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
#include "mycurve.h"
|
#include "mycurve.h"
|
||||||
#include "shcselector.h"
|
#include "shcselector.h"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "curveeditorgroup.h"
|
#include "curveeditorgroup.h"
|
||||||
|
#include "adjuster.h"
|
||||||
#include "../rtengine/noncopyable.h"
|
#include "../rtengine/noncopyable.h"
|
||||||
|
|
||||||
class DiagonalCurveEditor;
|
class DiagonalCurveEditor;
|
||||||
|
@ -285,7 +285,7 @@ public:
|
|||||||
rtengine::Coord end;
|
rtengine::Coord end;
|
||||||
|
|
||||||
Line ();
|
Line ();
|
||||||
Line (rtengine::Coord& begin, rtengine::Coord& end);
|
Line (const rtengine::Coord& begin, const rtengine::Coord& end);
|
||||||
Line (int beginX, int beginY, int endX, int endY);
|
Line (int beginX, int beginY, int endX, int endY);
|
||||||
|
|
||||||
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override;
|
void drawOuterGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override;
|
||||||
@ -532,7 +532,7 @@ inline Circle::Circle (int centerX, int centerY, int radius, bool filled,
|
|||||||
radiusInImageSpace) {
|
radiusInImageSpace) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Line::Line (rtengine::Coord& begin, rtengine::Coord& end) :
|
inline Line::Line (const rtengine::Coord& begin, const rtengine::Coord& end) :
|
||||||
begin (begin), end (end) {
|
begin (begin), end (end) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,11 +18,9 @@
|
|||||||
#include "editwindow.h"
|
#include "editwindow.h"
|
||||||
#include "../rtengine/procparams.h"
|
#include "../rtengine/procparams.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "preferences.h"
|
|
||||||
#include "cursormanager.h"
|
#include "cursormanager.h"
|
||||||
#include "rtwindow.h"
|
#include "rtwindow.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "rtimage.h"
|
|
||||||
#include "threadutils.h"
|
#include "threadutils.h"
|
||||||
|
|
||||||
extern Glib::ustring argv0;
|
extern Glib::ustring argv0;
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "adjuster.h"
|
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
class ExportPanelListener
|
class ExportPanelListener
|
||||||
|
@ -137,13 +137,11 @@ bool ExtProgStore::searchProgram (const Glib::ustring& name,
|
|||||||
action.name = name;
|
action.name = name;
|
||||||
action.target = (allowRaw ? 1 : 2);
|
action.target = (allowRaw ? 1 : 2);
|
||||||
|
|
||||||
auto& filePath = action.filePathEXE;
|
|
||||||
|
|
||||||
if (maxVer > 0) {
|
if (maxVer > 0) {
|
||||||
|
|
||||||
for (auto ver = maxVer; ver >= 0; ver--) {
|
for (auto ver = maxVer; ver >= 0; ver--) {
|
||||||
|
|
||||||
filePath = progFilesDir + "\\" + Glib::ustring::compose(exePath, ver);
|
auto filePath = progFilesDir + "\\" + Glib::ustring::compose(exePath, ver);
|
||||||
|
|
||||||
if (Glib::file_test (filePath, Glib::FILE_TEST_EXISTS)) {
|
if (Glib::file_test (filePath, Glib::FILE_TEST_EXISTS)) {
|
||||||
break;
|
break;
|
||||||
@ -157,14 +155,12 @@ bool ExtProgStore::searchProgram (const Glib::ustring& name,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filePath.clear ();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
||||||
filePath = progFilesDir + "\\" + exePath;
|
auto filePath = progFilesDir + "\\" + exePath;
|
||||||
|
|
||||||
if (Glib::file_test (filePath, Glib::FILE_TEST_EXISTS)) {
|
if (Glib::file_test (filePath, Glib::FILE_TEST_EXISTS)) {
|
||||||
break;
|
break;
|
||||||
@ -178,9 +174,6 @@ bool ExtProgStore::searchProgram (const Glib::ustring& name,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filePath.clear ();
|
|
||||||
|
|
||||||
} while (false);
|
} while (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,9 +272,9 @@ bool ExtProgStore::openInGimp (const Glib::ustring& fileName)
|
|||||||
for (auto ver = 12; ver >= 0; --ver) {
|
for (auto ver = 12; ver >= 0; --ver) {
|
||||||
|
|
||||||
executable = Glib::build_filename (options.gimpDir, "bin", Glib::ustring::compose (Glib::ustring("gimp-2.%1.exe"), ver));
|
executable = Glib::build_filename (options.gimpDir, "bin", Glib::ustring::compose (Glib::ustring("gimp-2.%1.exe"), ver));
|
||||||
auto success = ShellExecute( NULL, "open", executable.c_str(), fileName.c_str(), NULL, SW_SHOWNORMAL );
|
auto lsuccess = ShellExecute( NULL, "open", executable.c_str(), fileName.c_str(), NULL, SW_SHOWNORMAL );
|
||||||
|
|
||||||
if ((uintptr_t)success > 32) {
|
if ((uintptr_t)lsuccess > 32) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,16 +114,16 @@ void findOriginalEntries (const std::vector<ThumbBrowserEntryBase*>& entries)
|
|||||||
|
|
||||||
// Find the original image for each bucket
|
// Find the original image for each bucket
|
||||||
for (BasenameIterator bucket = byBasename.begin (); bucket != byBasename.end (); ++bucket) {
|
for (BasenameIterator bucket = byBasename.begin (); bucket != byBasename.end (); ++bucket) {
|
||||||
const EntryVector& entries = bucket->second;
|
const EntryVector& lentries = bucket->second;
|
||||||
ThumbBrowserEntryBase* original = nullptr;
|
ThumbBrowserEntryBase* original = nullptr;
|
||||||
|
|
||||||
// Select the most likely original in a first pass...
|
// Select the most likely original in a first pass...
|
||||||
for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) {
|
for (EntryIterator entry = lentries.begin (); entry != lentries.end (); ++entry) {
|
||||||
original = selectOriginalEntry (original, *entry);
|
original = selectOriginalEntry (original, *entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...and link all other images to it in a second pass.
|
// ...and link all other images to it in a second pass.
|
||||||
for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) {
|
for (EntryIterator entry = lentries.begin (); entry != lentries.end (); ++entry) {
|
||||||
(*entry)->setOriginal (*entry != original ? original : nullptr);
|
(*entry)->setOriginal (*entry != original ? original : nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ void FileBrowserEntry::calcThumbnailSize ()
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (thumbnail) {
|
if (thumbnail) {
|
||||||
thumbnail->getThumbnailSize (prew, preh);
|
prew = thumbnail->getThumbnailWidth(preh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "crophandler.h"
|
|
||||||
#include "editenums.h"
|
#include "editenums.h"
|
||||||
#include "filethumbnailbuttonset.h"
|
#include "filethumbnailbuttonset.h"
|
||||||
#include "imageareatoollistener.h"
|
#include "imageareatoollistener.h"
|
||||||
|
@ -1222,9 +1222,8 @@ void FileCatalog::developRequested(const std::vector<FileBrowserEntry*>& tbe, bo
|
|||||||
|
|
||||||
rtengine::ProcessingJob* pjob = rtengine::ProcessingJob::create (fbe->filename, th->getType() == FT_Raw, params, fastmode && options.fastexport_use_fast_pipeline);
|
rtengine::ProcessingJob* pjob = rtengine::ProcessingJob::create (fbe->filename, th->getType() == FT_Raw, params, fastmode && options.fastexport_use_fast_pipeline);
|
||||||
|
|
||||||
int pw;
|
const int ph = BatchQueue::calcMaxThumbnailHeight();
|
||||||
int ph = BatchQueue::calcMaxThumbnailHeight();
|
const int pw = th->getThumbnailWidth(ph);
|
||||||
th->getThumbnailSize (pw, ph);
|
|
||||||
|
|
||||||
// processThumbImage is the processing intensive part, but adding to queue must be ordered
|
// processThumbImage is the processing intensive part, but adding to queue must be ordered
|
||||||
//#pragma omp ordered
|
//#pragma omp ordered
|
||||||
|
@ -252,7 +252,7 @@ void FlatField::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlatField::adjusterAutoToggled (Adjuster* a, bool newval)
|
void FlatField::adjusterAutoToggled (Adjuster* a)
|
||||||
{
|
{
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (flatFieldClipControl->getAutoInconsistent()) {
|
if (flatFieldClipControl->getAutoInconsistent()) {
|
||||||
|
@ -79,7 +79,7 @@ public:
|
|||||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
|
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval) override;
|
void adjusterChanged (Adjuster* a, double newval) override;
|
||||||
void adjusterAutoToggled (Adjuster* a, bool newval) override;
|
void adjusterAutoToggled (Adjuster* a) override;
|
||||||
void flatFieldFileChanged ();
|
void flatFieldFileChanged ();
|
||||||
void flatFieldFile_Reset ();
|
void flatFieldFile_Reset ();
|
||||||
void flatFieldAutoSelectChanged ();
|
void flatFieldAutoSelectChanged ();
|
||||||
|
@ -946,22 +946,21 @@ bool MyScrolledWindow::on_scroll_event (GdkEventScroll* event)
|
|||||||
const double lowerBound = adjust->get_lower();
|
const double lowerBound = adjust->get_lower();
|
||||||
double value = adjust->get_value();
|
double value = adjust->get_value();
|
||||||
double step = adjust->get_step_increment();
|
double step = adjust->get_step_increment();
|
||||||
double value2 = 0.;
|
|
||||||
|
|
||||||
if (event->direction == GDK_SCROLL_DOWN) {
|
if (event->direction == GDK_SCROLL_DOWN) {
|
||||||
value2 = rtengine::min<double>(value + step, upperBound);
|
double value2 = rtengine::min<double>(value + step, upperBound);
|
||||||
|
|
||||||
if (value2 != value) {
|
if (value2 != value) {
|
||||||
scroll->set_value(value2);
|
scroll->set_value(value2);
|
||||||
}
|
}
|
||||||
} else if (event->direction == GDK_SCROLL_UP) {
|
} else if (event->direction == GDK_SCROLL_UP) {
|
||||||
value2 = rtengine::max<double>(value - step, lowerBound);
|
double value2 = rtengine::max<double>(value - step, lowerBound);
|
||||||
|
|
||||||
if (value2 != value) {
|
if (value2 != value) {
|
||||||
scroll->set_value(value2);
|
scroll->set_value(value2);
|
||||||
}
|
}
|
||||||
} else if (event->direction == GDK_SCROLL_SMOOTH) {
|
} else if (event->direction == GDK_SCROLL_SMOOTH) {
|
||||||
value2 = rtengine::LIM<double>(value + event->delta_y * step, lowerBound, upperBound);
|
double value2 = rtengine::LIM<double>(value + event->delta_y * step, lowerBound, upperBound);
|
||||||
|
|
||||||
if (value2 != value) {
|
if (value2 != value) {
|
||||||
scroll->set_value(value2);
|
scroll->set_value(value2);
|
||||||
|
@ -983,7 +983,7 @@ void HistogramArea::on_realize ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HistogramArea::drawCurve(Cairo::RefPtr<Cairo::Context> &cr,
|
void HistogramArea::drawCurve(Cairo::RefPtr<Cairo::Context> &cr,
|
||||||
LUTu & data, double scale, int hsize, int vsize)
|
const LUTu & data, double scale, int hsize, int vsize)
|
||||||
{
|
{
|
||||||
double s = RTScalable::getScale();
|
double s = RTScalable::getScale();
|
||||||
|
|
||||||
@ -1013,7 +1013,7 @@ void HistogramArea::drawCurve(Cairo::RefPtr<Cairo::Context> &cr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HistogramArea::drawMarks(Cairo::RefPtr<Cairo::Context> &cr,
|
void HistogramArea::drawMarks(Cairo::RefPtr<Cairo::Context> &cr,
|
||||||
LUTu & data, double scale, int hsize, int & ui, int & oi)
|
const LUTu & data, double scale, int hsize, int & ui, int & oi)
|
||||||
{
|
{
|
||||||
int s = 8 * RTScalable::getScale();
|
int s = 8 * RTScalable::getScale();
|
||||||
|
|
||||||
|
@ -165,8 +165,8 @@ public:
|
|||||||
type_signal_factor_changed signal_factor_changed();
|
type_signal_factor_changed signal_factor_changed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void drawCurve(Cairo::RefPtr<Cairo::Context> &cr, LUTu & data, double scale, int hsize, int vsize);
|
void drawCurve(Cairo::RefPtr<Cairo::Context> &cr, const LUTu & data, double scale, int hsize, int vsize);
|
||||||
void drawMarks(Cairo::RefPtr<Cairo::Context> &cr, LUTu & data, double scale, int hsize, int & ui, int & oi);
|
void drawMarks(Cairo::RefPtr<Cairo::Context> &cr, const LUTu & data, double scale, int hsize, int & ui, int & oi);
|
||||||
Gtk::SizeRequestMode get_request_mode_vfunc () const override;
|
Gtk::SizeRequestMode get_request_mode_vfunc () const override;
|
||||||
void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const override;
|
void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const override;
|
||||||
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const override;
|
void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const override;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "adjuster.h"
|
|
||||||
#include "colorprovider.h"
|
#include "colorprovider.h"
|
||||||
#include "curvelistener.h"
|
#include "curvelistener.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
@ -58,6 +57,5 @@ public:
|
|||||||
void autoOpenCurve () override;
|
void autoOpenCurve () override;
|
||||||
void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller) override;
|
void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller) override;
|
||||||
|
|
||||||
//void adjusterChanged (Adjuster* a, double newval);
|
|
||||||
void enabledChanged() override;
|
void enabledChanged() override;
|
||||||
};
|
};
|
||||||
|
@ -240,7 +240,7 @@ void LockableColorPicker::updateBackBuffer ()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LockableColorPicker::draw (Cairo::RefPtr<Cairo::Context> &cr)
|
void LockableColorPicker::draw (const Cairo::RefPtr<Cairo::Context> &cr)
|
||||||
{
|
{
|
||||||
if (validity == Validity::OUTSIDE) {
|
if (validity == Validity::OUTSIDE) {
|
||||||
return;
|
return;
|
||||||
@ -284,7 +284,7 @@ void LockableColorPicker::setRGB (const float R, const float G, const float B, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LockableColorPicker::getImagePosition (rtengine::Coord &imgPos)
|
void LockableColorPicker::getImagePosition (rtengine::Coord &imgPos) const
|
||||||
{
|
{
|
||||||
imgPos = position;
|
imgPos = position;
|
||||||
}
|
}
|
||||||
@ -328,7 +328,7 @@ void LockableColorPicker::setSize (Size newSize)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LockableColorPicker::Size LockableColorPicker::getSize ()
|
LockableColorPicker::Size LockableColorPicker::getSize () const
|
||||||
{
|
{
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
@ -74,14 +74,14 @@ public:
|
|||||||
|
|
||||||
LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile);
|
LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile);
|
||||||
|
|
||||||
void draw (Cairo::RefPtr<Cairo::Context> &cr);
|
void draw (const Cairo::RefPtr<Cairo::Context> &cr);
|
||||||
|
|
||||||
// Used to update the RGB color, the HSV values will be updated accordingly
|
// Used to update the RGB color, the HSV values will be updated accordingly
|
||||||
void setPosition (const rtengine::Coord &newPos);
|
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 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 getImagePosition (rtengine::Coord &imgPos) const;
|
||||||
void getScreenPosition (rtengine::Coord &screenPos);
|
void getScreenPosition (rtengine::Coord &screenPos);
|
||||||
Size getSize ();
|
Size getSize () const;
|
||||||
bool isOver (int x, int y);
|
bool isOver (int x, int y);
|
||||||
void setValidity (Validity isValid);
|
void setValidity (Validity isValid);
|
||||||
void setSize (Size newSize);
|
void setSize (Size newSize);
|
||||||
|
@ -153,7 +153,7 @@ bool LWButton::releaseNotify (int x, int y)
|
|||||||
{
|
{
|
||||||
|
|
||||||
bool in = inside (x, y);
|
bool in = inside (x, y);
|
||||||
State nstate = state;
|
State nstate;
|
||||||
bool action = false;
|
bool action = false;
|
||||||
|
|
||||||
if (in && (state == Pressed_In || state == Pressed_Out)) {
|
if (in && (state == Pressed_In || state == Pressed_Out)) {
|
||||||
|
@ -592,7 +592,6 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event)
|
|||||||
|
|
||||||
curve.x.insert (itx, 0);
|
curve.x.insert (itx, 0);
|
||||||
curve.y.insert (ity, 0);
|
curve.y.insert (ity, 0);
|
||||||
num++;
|
|
||||||
|
|
||||||
// the graph is refreshed only if a new point is created
|
// the graph is refreshed only if a new point is created
|
||||||
curve.x.at(closest_point) = clampedX;
|
curve.x.at(closest_point) = clampedX;
|
||||||
@ -1504,7 +1503,7 @@ void MyDiagonalCurve::setActiveParam (int ac)
|
|||||||
queue_draw ();
|
queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyDiagonalCurve::updateBackgroundHistogram (LUTu & hist)
|
void MyDiagonalCurve::updateBackgroundHistogram (const LUTu & hist)
|
||||||
{
|
{
|
||||||
if (hist) {
|
if (hist) {
|
||||||
//memcpy (bghist, hist, 256*sizeof(unsigned int));
|
//memcpy (bghist, hist, 256*sizeof(unsigned int));
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
bool handleEvents (GdkEvent* event) override;
|
bool handleEvents (GdkEvent* event) override;
|
||||||
void setActiveParam (int ac);
|
void setActiveParam (int ac);
|
||||||
void reset (const std::vector<double> &resetCurve, double identityValue = 0.5) override;
|
void reset (const std::vector<double> &resetCurve, double identityValue = 0.5) override;
|
||||||
void updateBackgroundHistogram (LUTu & hist);
|
void updateBackgroundHistogram (const LUTu & hist);
|
||||||
|
|
||||||
void pipetteMouseOver (CurveEditor *ce, EditDataProvider *provider, int modifierKey) override;
|
void pipetteMouseOver (CurveEditor *ce, EditDataProvider *provider, int modifierKey) override;
|
||||||
bool pipetteButton1Pressed(EditDataProvider *provider, int modifierKey) override;
|
bool pipetteButton1Pressed(EditDataProvider *provider, int modifierKey) override;
|
||||||
|
@ -653,7 +653,6 @@ bool MyFlatCurve::handleEvents (GdkEvent* event)
|
|||||||
curve.y.insert (ity, 0);
|
curve.y.insert (ity, 0);
|
||||||
curve.leftTangent.insert (itlt, 0);
|
curve.leftTangent.insert (itlt, 0);
|
||||||
curve.rightTangent.insert (itrt, 0);
|
curve.rightTangent.insert (itrt, 0);
|
||||||
num++;
|
|
||||||
|
|
||||||
if (mod_type & GDK_CONTROL_MASK) {
|
if (mod_type & GDK_CONTROL_MASK) {
|
||||||
clampedY = point.getVal01(clampedX);
|
clampedY = point.getVal01(clampedX);
|
||||||
|
@ -270,7 +270,7 @@ void PdSharpening::autoRadiusChanged(double autoRadius)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PdSharpening::adjusterAutoToggled(Adjuster* a, bool newval)
|
void PdSharpening::adjusterAutoToggled(Adjuster* a)
|
||||||
{
|
{
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (a->getAutoInconsistent()) {
|
if (a->getAutoInconsistent()) {
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
|
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
|
||||||
void setBatchMode (bool batchMode) override;
|
void setBatchMode (bool batchMode) override;
|
||||||
|
|
||||||
void adjusterAutoToggled (Adjuster* a, bool newval) override;
|
void adjusterAutoToggled (Adjuster* a) override;
|
||||||
void adjusterChanged (Adjuster* a, double newval) override;
|
void adjusterChanged (Adjuster* a, double newval) override;
|
||||||
void enabledChanged () override;
|
void enabledChanged () override;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ Preferences::~Preferences ()
|
|||||||
get_size (options.preferencesWidth, options.preferencesHeight);
|
get_size (options.preferencesWidth, options.preferencesHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Preferences::getThemeRowNumber (Glib::ustring& longThemeFName)
|
int Preferences::getThemeRowNumber (const Glib::ustring& longThemeFName)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (regex->match (longThemeFName + ".css", matchInfo)) {
|
if (regex->match (longThemeFName + ".css", matchInfo)) {
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "adjuster.h"
|
|
||||||
#include "dynamicprofilepanel.h"
|
#include "dynamicprofilepanel.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "../rtengine/profilestore.h"
|
#include "../rtengine/profilestore.h"
|
||||||
@ -249,7 +248,7 @@ class Preferences :
|
|||||||
void switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize);
|
void switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize);
|
||||||
bool splashClosed (GdkEventAny* event);
|
bool splashClosed (GdkEventAny* event);
|
||||||
|
|
||||||
int getThemeRowNumber (Glib::ustring& longThemeFName);
|
int getThemeRowNumber (const Glib::ustring& longThemeFName);
|
||||||
|
|
||||||
void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set);
|
void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set);
|
||||||
|
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "adjuster.h"
|
|
||||||
|
|
||||||
class ImageArea;
|
class ImageArea;
|
||||||
|
|
||||||
class PreviewModePanel :
|
class PreviewModePanel :
|
||||||
|
@ -230,7 +230,7 @@ bool PreviewWindow::on_motion_notify_event (GdkEventMotion* event)
|
|||||||
if (x>imgX || y>imgY || w < imgW || h < imgH) {
|
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 inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6;
|
||||||
|
|
||||||
CursorShape newType = cursor_type;
|
CursorShape newType;
|
||||||
|
|
||||||
if (isMoving) {
|
if (isMoving) {
|
||||||
mainCropWin->remoteMove ((event->x - press_x) / zoom, (event->y - press_y) / zoom);
|
mainCropWin->remoteMove ((event->x - press_x) / zoom, (event->y - press_y) / zoom);
|
||||||
|
@ -79,9 +79,9 @@ class ProgressConnector
|
|||||||
static int emitEndSignalUI (void* data)
|
static int emitEndSignalUI (void* data)
|
||||||
{
|
{
|
||||||
|
|
||||||
sigc::signal0<bool>* opEnd = (sigc::signal0<bool>*) data;
|
sigc::signal0<bool>* lopEnd = (sigc::signal0<bool>*) data;
|
||||||
int r = opEnd->emit ();
|
int r = lopEnd->emit ();
|
||||||
delete opEnd;
|
delete lopEnd;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "adjuster.h"
|
|
||||||
#include "colorprovider.h"
|
#include "colorprovider.h"
|
||||||
#include "curvelistener.h"
|
#include "curvelistener.h"
|
||||||
#include "toolpanel.h"
|
#include "toolpanel.h"
|
||||||
|
@ -44,14 +44,14 @@ extern unsigned char initialGdkScale;
|
|||||||
static gboolean
|
static gboolean
|
||||||
osx_should_quit_cb (GtkosxApplication *app, gpointer data)
|
osx_should_quit_cb (GtkosxApplication *app, gpointer data)
|
||||||
{
|
{
|
||||||
RTWindow *rtWin = (RTWindow *)data;
|
RTWindow *rtWin = static_cast<RTWindow*>(data);
|
||||||
return rtWin->on_delete_event (0);
|
return rtWin->on_delete_event (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
osx_will_quit_cb (GtkosxApplication *app, gpointer data)
|
osx_will_quit_cb (GtkosxApplication *app, gpointer data)
|
||||||
{
|
{
|
||||||
RTWindow *rtWin = (RTWindow *)data;
|
RTWindow *rtWin = static_cast<RTWindow*>(data);
|
||||||
rtWin->on_delete_event (0);
|
rtWin->on_delete_event (0);
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ bool RTWindow::osxFileOpenEvent (Glib::ustring path)
|
|||||||
static gboolean
|
static gboolean
|
||||||
osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data)
|
osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data)
|
||||||
{
|
{
|
||||||
RTWindow *rtWin = (RTWindow *)data;
|
RTWindow *rtWin = static_cast<RTWindow*>(data);
|
||||||
|
|
||||||
if (!argv1.empty()) {
|
if (!argv1.empty()) {
|
||||||
// skip handling if we have a file argument or else we get double open of same file
|
// skip handling if we have a file argument or else we get double open of same file
|
||||||
@ -232,13 +232,6 @@ RTWindow::RTWindow ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
else if (!screen) {
|
|
||||||
printf ("ERROR: Can't get default screen!\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ------- end loading theme files
|
// ------- end loading theme files
|
||||||
|
|
||||||
RTScalable::init(this);
|
RTScalable::init(this);
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "adjuster.h"
|
|
||||||
#include "saveformatpanel.h"
|
#include "saveformatpanel.h"
|
||||||
|
|
||||||
class SaveAsDialog :
|
class SaveAsDialog :
|
||||||
|
@ -590,10 +590,8 @@ void Thumbnail::decreaseRef ()
|
|||||||
cachemgr->closeThumbnail (this);
|
cachemgr->closeThumbnail (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Thumbnail::getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams)
|
int Thumbnail::getThumbnailWidth (const int &h, const rtengine::procparams::ProcParams *pparams) const
|
||||||
{
|
{
|
||||||
MyMutex::MyLock lock(mutex);
|
|
||||||
|
|
||||||
int tw_ = tw;
|
int tw_ = tw;
|
||||||
int th_ = th;
|
int th_ = th;
|
||||||
float imgRatio_ = imgRatio;
|
float imgRatio_ = imgRatio;
|
||||||
@ -613,20 +611,17 @@ void Thumbnail::getThumbnailSize (int &w, int &h, const rtengine::procparams::Pr
|
|||||||
|
|
||||||
if (thisCoarse != ppCoarse) {
|
if (thisCoarse != ppCoarse) {
|
||||||
// different orientation -> swapping width & height
|
// different orientation -> swapping width & height
|
||||||
int tmp = th_;
|
std::swap(th_, tw_);
|
||||||
th_ = tw_;
|
|
||||||
tw_ = tmp;
|
|
||||||
|
|
||||||
if (imgRatio_ >= 0.0001f) {
|
if (imgRatio_ >= 0.0001f) {
|
||||||
imgRatio_ = 1.f / imgRatio_;
|
imgRatio_ = 1.f / imgRatio_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imgRatio_ > 0.) {
|
if (imgRatio_ > 0.f) {
|
||||||
w = (int)(imgRatio_ * (float)h);
|
return imgRatio_ * h;
|
||||||
} else {
|
} else {
|
||||||
w = tw_ * h / th_;
|
return tw_ * h / th_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,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
|
// 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* processThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale);
|
||||||
rtengine::IImage8* upgradeThumbImage (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 = nullptr);
|
int getThumbnailWidth (const int &h, const rtengine::procparams::ProcParams *pparams = nullptr) const;
|
||||||
void getFinalSize (const rtengine::procparams::ProcParams& pparams, int& w, int& h);
|
void getFinalSize (const rtengine::procparams::ProcParams& pparams, int& w, int& h);
|
||||||
void getOriginalSize (int& w, int& h);
|
void getOriginalSize (int& w, int& h);
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "toolbar.h"
|
#include "toolbar.h"
|
||||||
#include "multilangmgr.h"
|
#include "multilangmgr.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
#include "lockablecolorpicker.h"
|
||||||
#include "rtimage.h"
|
#include "rtimage.h"
|
||||||
|
|
||||||
ToolBar::ToolBar () : showColPickers(true), listener (nullptr), pickerListener(nullptr)
|
ToolBar::ToolBar () : showColPickers(true), listener (nullptr), pickerListener(nullptr)
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
|
|
||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
#include "lockablecolorpicker.h"
|
|
||||||
#include "toolenum.h"
|
#include "toolenum.h"
|
||||||
|
|
||||||
class RTImage;
|
class RTImage;
|
||||||
|
class LockablePickerToolListener;
|
||||||
|
|
||||||
class ToolBarListener
|
class ToolBarListener
|
||||||
{
|
{
|
||||||
|
@ -225,7 +225,7 @@ void XTransProcess::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTransProcess::adjusterAutoToggled(Adjuster* a, bool newval)
|
void XTransProcess::adjusterAutoToggled(Adjuster* a)
|
||||||
{
|
{
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (dualDemosaicContrast->getAutoInconsistent()) {
|
if (dualDemosaicContrast->getAutoInconsistent()) {
|
||||||
|
@ -66,5 +66,5 @@ public:
|
|||||||
void autoContrastChanged (double autoContrast) override;
|
void autoContrastChanged (double autoContrast) override;
|
||||||
void adjusterChanged(Adjuster* a, double newval) override;
|
void adjusterChanged(Adjuster* a, double newval) override;
|
||||||
void checkBoxToggled(CheckBox* c, CheckValue newval) override;
|
void checkBoxToggled(CheckBox* c, CheckValue newval) override;
|
||||||
void adjusterAutoToggled(Adjuster* a, bool newval) override;
|
void adjusterAutoToggled(Adjuster* a) override;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user