fixed bug in discriminating between matrix and lut profiles for the OOG check

This commit is contained in:
Alberto Griggio
2018-03-17 22:54:48 +01:00
parent 956c44905e
commit 17dc4af424
3 changed files with 8 additions and 4 deletions

View File

@@ -24,15 +24,16 @@
*/
#include "gamutwarning.h"
#include <iostream>
namespace rtengine {
GamutWarning::GamutWarning(cmsHPROFILE iprof, cmsHPROFILE gamutprof, bool gamutbpc):
GamutWarning::GamutWarning(cmsHPROFILE iprof, cmsHPROFILE gamutprof, RenderingIntent intent, bool gamutbpc):
lab2ref(nullptr),
lab2softproof(nullptr),
softproof2ref(nullptr)
{
if (cmsIsMatrixShaper(gamutprof)) {
if (cmsIsMatrixShaper(gamutprof) && !cmsIsCLUT(gamutprof, intent, LCMS_USED_AS_OUTPUT)) {
cmsHPROFILE aces = ICCStore::getInstance()->getProfile("ACES");
if (aces) {
lab2ref = cmsCreateTransform(iprof, TYPE_Lab_FLT, aces, TYPE_RGB_FLT, INTENT_ABSOLUTE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE);