summaryrefslogtreecommitdiff
path: root/src/cmsio1.c
diff options
context:
space:
mode:
authorMarti Maria <info@littlecms.com>2010-02-20 17:49:52 +0100
committerMarti Maria <info@littlecms.com>2010-02-20 17:49:52 +0100
commit5a09b02e88390589197509acfe833eec9f786a7c (patch)
tree069bcc9918371f5a76cba5e28bc37de5a78987bf /src/cmsio1.c
parent65f916397634f78f9c78c6bf27158a07e4a168b6 (diff)
downloadlcms2-5a09b02e88390589197509acfe833eec9f786a7c.tar.gz
Fixed a bug on precedence of LUTs
Diffstat (limited to 'src/cmsio1.c')
-rw-r--r--src/cmsio1.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmsio1.c b/src/cmsio1.c
index f86a9cf..331eaec 100644
--- a/src/cmsio1.c
+++ b/src/cmsio1.c
@@ -243,6 +243,11 @@ cmsPipeline* _cmsReadInputLUT(cmsHPROFILE hProfile, int Intent)
return cmsPipelineDup(cmsReadTag(hProfile, tagFloat));
}
+ // Revert to perceptual if no tag is found
+ if (!cmsIsTag(hProfile, tag16)) {
+ tag16 = Device2PCS16[0];
+ }
+
if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
// Check profile version and LUT type. Do the necessary adjustments if needed
@@ -386,6 +391,11 @@ cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent)
return cmsPipelineDup(cmsReadTag(hProfile, tagFloat));
}
+ // Revert to perceptual if no tag is found
+ if (!cmsIsTag(hProfile, tag16)) {
+ tag16 = PCS2Device16[0];
+ }
+
if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
// Check profile version and LUT type. Do the necessary adjustments if needed