Improvements to histogram in curves tools. Now histograms in curves tools are not modified by changes in curves themselves.

This commit is contained in:
Emil Martinec
2011-01-11 17:51:59 -06:00
parent 4717653626
commit 6f1654d8fe
2 changed files with 5 additions and 5 deletions

View File

@@ -602,9 +602,9 @@ double CurveFactory::centercontrast (double x, double b, double m) {
delete [] dcurve;
delete tcurve;
delete brightcurve;
if (outBeforeCCurveHistogram) {
//for (int i=0; i<256; i++) printf("i= %d bchist= %d \n",i,outBeforeCCurveHistogram[i]);
}
/*if (outBeforeCCurveHistogram) {
for (int i=0; i<256; i++) printf("i= %d bchist= %d \n",i,outBeforeCCurveHistogram[i]);
}*/
}

View File

@@ -428,7 +428,7 @@ void ImProcCoordinator::updateHistograms (int x1, int y1, int x2, int y2) {
memset (rhist, 0, 256*sizeof(int));
memset (ghist, 0, 256*sizeof(int));
memset (bhist, 0, 256*sizeof(int));
memset (bcrgbhist, 0, 256*sizeof(int));
//memset (bcrgbhist, 0, 256*sizeof(int));
for (int i=y1; i<y2; i++) {
int ofs = (i*pW + x1)*3;
@@ -437,7 +437,7 @@ void ImProcCoordinator::updateHistograms (int x1, int y1, int x2, int y2) {
int g=previmg->data[ofs++];
int b=previmg->data[ofs++];
bcrgbhist[(int)(0.299*r + 0.587*g + 0.114*b)]++;
//bcrgbhist[(int)(0.299*r + 0.587*g + 0.114*b)]++;
rhist[r]++;
ghist[g]++;
bhist[b]++;