summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d49c742)
raw | patch | inline | side by side (parent: d49c742)
author | joncruz <joncruz@users.sourceforge.net> | |
Fri, 5 Oct 2007 04:11:50 +0000 (04:11 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Fri, 5 Oct 2007 04:11:50 +0000 (04:11 +0000) |
src/color-profile.cpp | patch | blob | history | |
src/ui/dialog/inkscape-preferences.cpp | patch | blob | history |
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index eb8f7754ccafd8ba125e0ca0e35cad2c8f94004b..614fdfd6d3c7821f01e1c405cb4272a5fc655282 100644 (file)
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
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;
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");
|| (lastIntent != intent)
|| (lastProofIntent != proofIntent)
|| (bpc != lastBPC)
+#if defined(cmsFLAGS_PRESERVEBLACK)
|| (preserveBlack != lastPreserveBlack)
+#endif // defined(cmsFLAGS_PRESERVEBLACK)
|| (gamutColor != lastGamutColor)
) {
gamutWarn = warn;
lastIntent = intent;
lastProofIntent = proofIntent;
lastBPC = bpc;
+#if defined(cmsFLAGS_PRESERVEBLACK)
lastPreserveBlack = preserveBlack;
+#endif // defined(cmsFLAGS_PRESERVEBLACK)
lastGamutColor = gamutColor;
}
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 );
index 9ca4b54cb2e15693e0890e762f2a788f6f30c2a0..8878f21ed5a0fd8d35dccaa6ab9dcdc94e9aa619 100644 (file)
_("Enables black point compensation."), false);
_cms_proof_preserveblack.init( _("Preserve black."), "options.softproof", "preserveblack", false);
- _page_cms.add_line( false, "", _cms_proof_preserveblack, "",
- "", false);
+ _page_cms.add_line( false, "", _cms_proof_preserveblack,
+#if defined(cmsFLAGS_PRESERVEBLACK)
+ "",
+#else
+ _("(LittleCMS 1.15 or later required)"),
+#endif // defined(cmsFLAGS_PRESERVEBLACK)
+ _("Preserve K channel on CMYK -> CMYK transforms"), false);
+
+#if !defined(cmsFLAGS_PRESERVEBLACK)
+ _cms_proof_preserveblack.set_sensitive( false );
+#endif // !defined(cmsFLAGS_PRESERVEBLACK)
+
#if ENABLE_LCMS
{