add RT_sRGB with 2 Lut 212 1024

This commit is contained in:
Desmis
2018-04-03 12:55:34 +02:00
parent 06fa05799a
commit 6a00ce0f82
4 changed files with 18 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -190,7 +190,6 @@ void Color::init ()
{
gammatab_srgb[i] = gammatab_srgb1[i] = gamma2(i / 65535.0);
}
gammatab_srgb *= 65535.f;
gamma2curve.share(gammatab_srgb, LUT_CLIP_BELOW | LUT_CLIP_ABOVE); // shares the buffer with gammatab_srgb but has different clip flags
}

View File

@@ -24,6 +24,10 @@
#include "colortemp.h"
#include "improcfun.h"
#include "iccstore.h"
#include <iostream>
#include <fstream>
#include <string>
#ifdef _OPENMP
#include <omp.h>
#endif
@@ -311,6 +315,19 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
if (params.wb.method == "Auto" && awbListener && params.wb.enabled) {
awbListener->WBChanged (params.wb.temperature, params.wb.green);
}
Glib::ustring datal;
datal = "lutsrgb.txt";
ofstream fou(datal, ios::out | ios::trunc);
for(int i=0; i < 1024; i++) {
//printf("igamma2=%i\n", (int) 65535.f*Color::igamma2(i/212.0));
float gam = Color::igamma2(i/1023.0);
int lutga = 65535.f* gam;
// fou << 65535*(int)Color::igamma2(i/212.0) << endl;
fou << i << " " << lutga << endl;
}
fou.close();
int tr = getCoarseBitMask (params.coarse);