diff options
Diffstat (limited to 'lcms2mt/src/cmsio1.c')
-rw-r--r-- | lcms2mt/src/cmsio1.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lcms2mt/src/cmsio1.c b/lcms2mt/src/cmsio1.c index 627f8598..5c3d3fa2 100644 --- a/lcms2mt/src/cmsio1.c +++ b/lcms2mt/src/cmsio1.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2017 Marti Maria Saguer +// Copyright (c) 1998-2020 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), @@ -308,7 +308,6 @@ cmsPipeline* CMSEXPORT _cmsReadInputLUT(cmsContext ContextID, cmsHPROFILE hProfi cmsTagTypeSignature OriginalType; cmsTagSignature tag16; cmsTagSignature tagFloat; - int k; // On named color, take the appropriate tag if (cmsGetDeviceClass(ContextID, hProfile) == cmsSigNamedColorClass) { @@ -346,17 +345,9 @@ cmsPipeline* CMSEXPORT _cmsReadInputLUT(cmsContext ContextID, cmsHPROFILE hProfi return _cmsReadFloatInputTag(ContextID, hProfile, tagFloat); } - /* There are profiles out there (not legal) that may only have a - colorimetric or saturation tag and no perceptual tag. If we - can't find the specified intent be a bit robust and not give - up until we can't find any table, starting with perceptual */ + // Revert to perceptual if no tag is found if (!cmsIsTag(ContextID, hProfile, tag16)) { - for (k = 0; k < 3; k++) { - if (cmsIsTag(ContextID, hProfile, Device2PCS16[k])) { - tag16 = Device2PCS16[k]; - break; - } - } + tag16 = Device2PCS16[0]; } if (cmsIsTag(ContextID, hProfile, tag16)) { // Is there any LUT-Based table? |