PIMPLed and streamlined ICCStore
(#3691)
This commit is contained in:
@@ -805,13 +805,13 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
bool opautili = false;
|
||||
|
||||
if(params.colorToning.enabled) {
|
||||
TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working);
|
||||
TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working);
|
||||
double wp[3][3] = {
|
||||
{wprof[0][0], wprof[0][1], wprof[0][2]},
|
||||
{wprof[1][0], wprof[1][1], wprof[1][2]},
|
||||
{wprof[2][0], wprof[2][1], wprof[2][2]}
|
||||
};
|
||||
TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params.icm.working);
|
||||
TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params.icm.working);
|
||||
double wip[3][3] = {
|
||||
{wiprof[0][0], wiprof[0][1], wiprof[0][2]},
|
||||
{wiprof[1][0], wiprof[1][1], wiprof[1][2]},
|
||||
@@ -1165,7 +1165,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
//or selected Free gamma
|
||||
useLCMS = false;
|
||||
|
||||
if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) {
|
||||
if ((jprof = ICCStore::getInstance()->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) {
|
||||
useLCMS = true;
|
||||
}
|
||||
|
||||
@@ -1221,15 +1221,15 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
if (!useLCMS) {
|
||||
// use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma
|
||||
ProfileContent pc(jprof);
|
||||
readyImg->setOutputProfile (pc.data, pc.length);
|
||||
readyImg->setOutputProfile(pc.getData().data(), pc.getData().size());
|
||||
}
|
||||
} else {
|
||||
// use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma
|
||||
|
||||
if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) {
|
||||
|
||||
// if iccStore->getProfile send back an object, then iccStore->getContent will do too
|
||||
cmsHPROFILE jprof = iccStore->getProfile(params.icm.output); //get outProfile
|
||||
// if ICCStore::getInstance()->getProfile send back an object, then ICCStore::getInstance()->getContent will do too
|
||||
cmsHPROFILE jprof = ICCStore::getInstance()->getProfile(params.icm.output); //get outProfile
|
||||
|
||||
if (jprof == nullptr) {
|
||||
if (settings->verbose) {
|
||||
@@ -1240,8 +1240,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
||||
printf("Using \"%s\" output profile\n", params.icm.output.c_str());
|
||||
}
|
||||
|
||||
ProfileContent pc = iccStore->getContent (params.icm.output);
|
||||
readyImg->setOutputProfile (pc.data, pc.length);
|
||||
ProfileContent pc = ICCStore::getInstance()->getContent (params.icm.output);
|
||||
readyImg->setOutputProfile(pc.getData().data(), pc.getData().size());
|
||||
}
|
||||
} else {
|
||||
// No ICM
|
||||
|
Reference in New Issue
Block a user