From 93e6bd86ee87fbc9a558ee581b71596d797b52d5 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 5 Oct 2007 04:11:50 +0000 Subject: Guards for lcms < 1.15 (bzr r3837) --- src/color-profile.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/color-profile.cpp') diff --git a/src/color-profile.cpp b/src/color-profile.cpp index eb8f7754c..614fdfd6d 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -551,7 +551,9 @@ int errorHandlerCB(int ErrorCode, const char *ErrorText) static bool gamutWarn = false; static Gdk::Color lastGamutColor("#00ff00"); static bool lastBPC = false; +#if defined(cmsFLAGS_PRESERVEBLACK) static bool lastPreserveBlack = false; +#endif // defined(cmsFLAGS_PRESERVEBLACK) static int lastIntent = INTENT_PERCEPTUAL; static int lastProofIntent = INTENT_PERCEPTUAL; static cmsHTRANSFORM transf = 0; @@ -686,7 +688,9 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_transform() int intent = prefs_get_int_attribute_limited( "options.displayprofile", "intent", 0, 0, 3 ); int proofIntent = prefs_get_int_attribute_limited( "options.softproof", "intent", 0, 0, 3 ); bool bpc = prefs_get_int_attribute_limited( "options.softproof", "bpc", 0, 0, 1 ); +#if defined(cmsFLAGS_PRESERVEBLACK) bool preserveBlack = prefs_get_int_attribute_limited( "options.softproof", "preserveblack", 0, 0, 1 ); +#endif //defined(cmsFLAGS_PRESERVEBLACK) gchar const* colorStr = prefs_get_string_attribute("options.softproof", "gamutcolor"); Gdk::Color gamutColor( (colorStr && colorStr[0]) ? colorStr : "#00ff00"); @@ -694,7 +698,9 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_transform() || (lastIntent != intent) || (lastProofIntent != proofIntent) || (bpc != lastBPC) +#if defined(cmsFLAGS_PRESERVEBLACK) || (preserveBlack != lastPreserveBlack) +#endif // defined(cmsFLAGS_PRESERVEBLACK) || (gamutColor != lastGamutColor) ) { gamutWarn = warn; @@ -705,7 +711,9 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_transform() lastIntent = intent; lastProofIntent = proofIntent; lastBPC = bpc; +#if defined(cmsFLAGS_PRESERVEBLACK) lastPreserveBlack = preserveBlack; +#endif // defined(cmsFLAGS_PRESERVEBLACK) lastGamutColor = gamutColor; } @@ -726,9 +734,11 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_transform() if ( bpc ) { dwFlags |= cmsFLAGS_BLACKPOINTCOMPENSATION; } +#if defined(cmsFLAGS_PRESERVEBLACK) if ( preserveBlack ) { dwFlags |= cmsFLAGS_PRESERVEBLACK; } +#endif // defined(cmsFLAGS_PRESERVEBLACK) transf = cmsCreateProofingTransform( srcprof, TYPE_RGB_8, hprof, TYPE_RGB_8, proofProf, intent, proofIntent, dwFlags ); } else if ( hprof ) { transf = cmsCreateTransform( srcprof, TYPE_RGB_8, hprof, TYPE_RGB_8, intent, 0 ); -- cgit v1.2.3