Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mm2/Little-CMS.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmsxform.c')
-rw-r--r--src/cmsxform.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cmsxform.c b/src/cmsxform.c
index 4e13e1a..e7f30c5 100644
--- a/src/cmsxform.c
+++ b/src/cmsxform.c
@@ -433,6 +433,13 @@ cmsBool GetXFormColorSpaces(int nProfiles, cmsHPROFILE hProfiles[], cmsColorSpac
*Input = PostColorSpace = cmsGetColorSpace(hProfiles[0]);
+ // Special handling for named color profiles as devicelinks
+ if (nProfiles == 1 && cmsGetDeviceClass(hProfiles[0]) == cmsSigNamedColorClass) {
+ *Input = cmsSig1colorData;
+ *Output = PostColorSpace;
+ return TRUE;
+ }
+
for (i=0; i < nProfiles; i++) {
cmsHPROFILE hProfile = hProfiles[i];
@@ -440,9 +447,13 @@ cmsBool GetXFormColorSpaces(int nProfiles, cmsHPROFILE hProfiles[], cmsColorSpac
int lIsInput = (PostColorSpace != cmsSigXYZData) &&
(PostColorSpace != cmsSigLabData);
+ int lIsDeviceLink;
+
if (hProfile == NULL) return FALSE;
- if (lIsInput) {
+ lIsDeviceLink = (cmsGetDeviceClass(hProfile) == cmsSigLinkClass);
+
+ if (lIsInput || lIsDeviceLink) {
ColorSpaceIn = cmsGetColorSpace(hProfile);
ColorSpaceOut = cmsGetPCS(hProfile);