diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2007-10-03 07:19:17 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2007-10-03 07:19:17 +0000 |
| commit | c6ec6595f756a891fc7b210f71d33065b96b1d55 (patch) | |
| tree | 95e6a6a550762eeda74f33a7075b60b534508d09 /src/color-profile.cpp | |
| parent | Initial cut of softproofing (diff) | |
| download | inkscape-c6ec6595f756a891fc7b210f71d33065b96b1d55.tar.gz inkscape-c6ec6595f756a891fc7b210f71d33065b96b1d55.zip | |
Added profile intent options
(bzr r3827)
Diffstat (limited to 'src/color-profile.cpp')
| -rw-r--r-- | src/color-profile.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 7cd4df598..b7c8c40ed 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -546,6 +546,8 @@ int errorHandlerCB(int ErrorCode, const char *ErrorText) } static bool gamutWarn = false; +static int lastIntent = INTENT_PERCEPTUAL; +static int lastProofIntent = INTENT_PERCEPTUAL; static cmsHTRANSFORM transf = 0; static cmsHPROFILE srcprof = 0; @@ -673,12 +675,17 @@ cmsHPROFILE Inkscape::colorprofile_get_proof_profile_handle() cmsHTRANSFORM Inkscape::colorprofile_get_display_transform() { bool warn = prefs_get_int_attribute_limited( "options.softproof", "gamutwarn", 0, 0, 1 ); - if ( (warn != gamutWarn) ) { + 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 ); + + if ( (warn != gamutWarn) || (lastIntent != intent) || (lastProofIntent != proofIntent)) { gamutWarn = warn; if ( transf ) { cmsDeleteTransform(transf); transf = 0; } + lastIntent = intent; + lastProofIntent = proofIntent; } // Fecth these now, as they might clear the transform as a side effect. @@ -695,9 +702,9 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_transform() dwFlags |= cmsFLAGS_GAMUTCHECK; } cmsSetAlarmCodes(0, 255, 0); - transf = cmsCreateProofingTransform( srcprof, TYPE_RGB_8, hprof, TYPE_RGB_8, proofProf, INTENT_PERCEPTUAL, INTENT_PERCEPTUAL, dwFlags ); + 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_PERCEPTUAL, 0 ); + transf = cmsCreateTransform( srcprof, TYPE_RGB_8, hprof, TYPE_RGB_8, intent, 0 ); } } |
