Fixed the weird colors in clipped region in thumbs (hopefully)
This commit is contained in:
@@ -1679,13 +1679,18 @@ void RawImageSource::colorSpaceConversion16 (Image16* im, ColorManagementParams
|
|||||||
|
|
||||||
|
|
||||||
if (inProfile=="(camera)" || inProfile=="" || (inProfile=="(embedded)" && !embedded)) {
|
if (inProfile=="(camera)" || inProfile=="" || (inProfile=="(embedded)" && !embedded)) {
|
||||||
// in this case we avoid using the slllllooooooowwww lcms
|
|
||||||
|
out = iccStore->workingSpace (cmp.working);
|
||||||
// out = iccStore->workingSpace (wProfile);
|
|
||||||
// hTransform = cmsCreateTransform (in, TYPE_RGB_16_PLANAR, out, TYPE_RGB_16_PLANAR, settings->colorimetricIntent, cmsFLAGS_MATRIXINPUT | cmsFLAGS_MATRIXOUTPUT);//cmsFLAGS_MATRIXINPUT | cmsFLAGS_MATRIXOUTPUT);
|
lcmsMutex->lock ();
|
||||||
// cmsDoTransform (hTransform, im->data, im->data, im->planestride/2);
|
cmsHTRANSFORM hTransform = cmsCreateTransform (in, TYPE_RGB_16_PLANAR, out, TYPE_RGB_16_PLANAR, settings->colorimetricIntent, cmsFLAGS_NOCACHE); //cmsFLAGS_MATRIXINPUT | cmsFLAGS_MATRIXOUTPUT);//cmsFLAGS_MATRIXINPUT | cmsFLAGS_MATRIXOUTPUT);
|
||||||
// cmsDeleteTransform(hTransform);
|
lcmsMutex->unlock ();
|
||||||
TMatrix work = iccStore->workingSpaceInverseMatrix (cmp.working);
|
|
||||||
|
im->ExecCMSTransform(hTransform);
|
||||||
|
cmsDeleteTransform(hTransform);
|
||||||
|
/* // TODO: This short cut does not work any more it seems. Because of
|
||||||
|
// in this case we avoid using the slllllooooooowwww lcms
|
||||||
|
TMatrix work = iccStore->workingSpaceInverseMatrix (cmp.working);
|
||||||
double mat[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
double mat[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
for (int i=0; i<3; i++)
|
for (int i=0; i<3; i++)
|
||||||
for (int j=0; j<3; j++)
|
for (int j=0; j<3; j++)
|
||||||
@@ -1703,7 +1708,7 @@ void RawImageSource::colorSpaceConversion16 (Image16* im, ColorManagementParams
|
|||||||
im->r[i][j] = (newr);
|
im->r[i][j] = (newr);
|
||||||
im->g[i][j] = (newg);
|
im->g[i][j] = (newg);
|
||||||
im->b[i][j] = (newb);
|
im->b[i][j] = (newb);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
out = iccStore->workingSpace (cmp.working);
|
out = iccStore->workingSpace (cmp.working);
|
||||||
|
Reference in New Issue
Block a user