From 99dc21cf388c917dce328e0937c5c75afb6697c3 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 3 Dec 2010 23:46:51 -0800 Subject: [PATCH] Block display of named color icc profiles. --- src/color-profile.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; -- 2.30.2