Merge branch 'dev' into metadata-exiv2

This commit is contained in:
Lawrence Lee
2023-02-05 12:29:58 -08:00
278 changed files with 74278 additions and 13534 deletions

View File

@@ -1423,12 +1423,15 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
ipf.labColorCorrectionRegions(labView);
if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) {
ipf.EPDToneMap (labView, 5, 6);
}
ipf.softLight(labView, params.softlight);
if (params.colorappearance.enabled) {
CurveFactory::curveLightBrightColor (
params.colorappearance.curve,
@@ -1454,10 +1457,11 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
adap = 2000.f;
} else {
float E_V = fcomp + log2 ((fnum * fnum) / fspeed / (fiso / 100.f));
float expo2 = params.toneCurve.expcomp; // exposure compensation in tonecurve ==> direct EV
double kexp = 0.;
float expo2 = kexp * params.toneCurve.expcomp; // exposure compensation in tonecurve ==> direct EV
E_V += expo2;
float expo1;//exposure raw white point
expo1 = log2 (params.raw.expos); //log2 ==>linear to EV
expo1 = 0.5 * log2 (params.raw.expos); //log2 ==>linear to EV
E_V += expo1;
adap = powf (2.f, E_V - 3.f); //cd / m2
//end calculation adaptation scene luminosity
@@ -1477,6 +1481,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
delete cieView;
}
// color processing
//ipf.colorCurve (labView, labView);
@@ -1929,7 +1934,7 @@ bool Thumbnail::writeImage (const Glib::ustring& fname)
Glib::ustring fullFName = fname + ".rtti";
FILE* f = g_fopen (fullFName.c_str (), "wb");
FILE* f = ::g_fopen (fullFName.c_str (), "wb");
if (!f) {
return false;
@@ -1972,7 +1977,7 @@ bool Thumbnail::readImage (const Glib::ustring& fname)
return false;
}
FILE* f = g_fopen(fullFName.c_str (), "rb");
FILE* f = ::g_fopen(fullFName.c_str (), "rb");
if (!f) {
return false;
@@ -2203,7 +2208,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname)
return false;
}
FILE *f = g_fopen (fname.c_str (), "wt");
FILE *f = ::g_fopen (fname.c_str (), "wt");
if (!f) {
if (settings->verbose) {
@@ -2226,7 +2231,7 @@ bool Thumbnail::readEmbProfile (const Glib::ustring& fname)
embProfile = nullptr;
embProfileLength = 0;
FILE* f = g_fopen (fname.c_str (), "rb");
FILE* f = ::g_fopen (fname.c_str (), "rb");
if (f) {
if (!fseek (f, 0, SEEK_END)) {
@@ -2254,7 +2259,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname)
{
if (embProfileData) {
FILE* f = g_fopen (fname.c_str (), "wb");
FILE* f = ::g_fopen (fname.c_str (), "wb");
if (f) {
fwrite (embProfileData, 1, embProfileLength, f);