summaryrefslogtreecommitdiffstats
path: root/src/color-profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/color-profile.cpp')
-rw-r--r--src/color-profile.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 1189a7c29..4c71fd72b 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -722,6 +722,18 @@ static bool isIccFile( gchar const *filepath )
}
close(fd);
+#if ENABLE_LCMS
+ if (isIccFile) {
+ cmsHPROFILE prof = cmsOpenProfileFromFile( filepath, "r" );
+ if ( prof ) {
+ icProfileClassSignature profClass = cmsGetDeviceClass(prof);
+ if ( profClass == icSigNamedColorClass ) {
+ isIccFile = false; // Ignore named color profiles for now.
+ }
+ cmsCloseProfile( prof );
+ }
+ }
+#endif // ENABLE_LCMS
}
}
return isIccFile;