Merge branch 'dev' into spot-removal-tool

This commit is contained in:
Ingo Weyrich
2020-11-24 17:16:41 +01:00
257 changed files with 79066 additions and 10075 deletions

View File

@@ -272,10 +272,10 @@ void Image16::getStdImage(const ColorTemp &ctemp, int tran, Imagefloat* image, c
lineB[dst_x] = CLIP(bm * btot);
} else {
// computing a special factor for this incomplete sub-region
float area = src_sub_width * src_sub_height;
lineR[dst_x] = CLIP(rm2 * rtot / area);
lineG[dst_x] = CLIP(gm2 * gtot / area);
lineB[dst_x] = CLIP(bm2 * btot / area);
float larea = src_sub_width * src_sub_height;
lineR[dst_x] = CLIP(rm2 * rtot / larea);
lineG[dst_x] = CLIP(gm2 * gtot / larea);
lineB[dst_x] = CLIP(bm2 * btot / larea);
}
}
}
@@ -309,21 +309,6 @@ void Image16::getStdImage(const ColorTemp &ctemp, int tran, Imagefloat* image, c
#undef GCLIP
}
Image8* Image16::to8() const
{
Image8* img8 = new Image8(width, height);
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
img8->r(h, w) = uint16ToUint8Rounded(r(h, w));
img8->g(h, w) = uint16ToUint8Rounded(g(h, w));
img8->b(h, w) = uint16ToUint8Rounded(b(h, w));
}
}
return img8;
}
// Parallelized transformation; create transform with cmsFLAGS_NOCACHE!
void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform)
{