diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 1352e4e1454632da7a32e627d491f92780f97e5a..4c71fd72b47d356f5383abcea339797150da1ba0 100644 (file)
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
#include <cstring>
#include <string>
+#include <io/sys.h>
#ifdef WIN32
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. Required for correctly including icm.h
return (outofgamut == 255);
}
-
-#include <io/sys.h>
-
class ProfileInfo
{
public:
}
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;
@@ -1182,4 +1192,4 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_per( Glib::ustring const& id )
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :