Fixed the weird colors in clipped region in thumbs (hopefully)

This commit is contained in:
Oliver Duis
2011-04-09 23:48:05 +02:00
parent d45ddd3ff5
commit e6196158ef

View File

@@ -1679,13 +1679,18 @@ void RawImageSource::colorSpaceConversion16 (Image16* im, ColorManagementParams
if (inProfile=="(camera)" || inProfile=="" || (inProfile=="(embedded)" && !embedded)) {
// in this case we avoid using the slllllooooooowwww lcms
// 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);
// cmsDoTransform (hTransform, im->data, im->data, im->planestride/2);
// cmsDeleteTransform(hTransform);
TMatrix work = iccStore->workingSpaceInverseMatrix (cmp.working);
out = iccStore->workingSpace (cmp.working);
lcmsMutex->lock ();
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);
lcmsMutex->unlock ();
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}};
for (int i=0; i<3; i++)
for (int j=0; j<3; j++)
@@ -1703,7 +1708,7 @@ void RawImageSource::colorSpaceConversion16 (Image16* im, ColorManagementParams
im->r[i][j] = (newr);
im->g[i][j] = (newg);
im->b[i][j] = (newb);
}
}*/
}
else {
out = iccStore->workingSpace (cmp.working);