From 9b6bced49a799c3bba8a3b3782f1f3d22debbdf1 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 3 Dec 2010 23:46:51 -0800 Subject: Block display of named color icc profiles. (bzr r9934) --- src/color-profile.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/color-profile.cpp') 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; -- cgit v1.2.3