Code

Block display of named color icc profiles.
authorJon A. Cruz <jon@joncruz.org>
Sat, 4 Dec 2010 07:46:51 +0000 (23:46 -0800)
committerJon A. Cruz <jon@joncruz.org>
Sat, 4 Dec 2010 07:46:51 +0000 (23:46 -0800)
src/color-profile.cpp

index 1189a7c29701f1886b7687d6de5105b652e04b28..4c71fd72b47d356f5383abcea339797150da1ba0 100644 (file)
@@ -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;