summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e09b67)
raw | patch | inline | side by side (parent: 9e09b67)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Sat, 15 Aug 2009 05:25:49 +0000 (05:25 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Sat, 15 Aug 2009 05:25:49 +0000 (05:25 +0000) |
src/widgets/sp-color-notebook.cpp | patch | blob | history |
index 5eb44c2cb3d8b4ab1805d38f42db37d9b250a91c..52c78ba42af754871279493b9a8a6c034e8b6434 100644 (file)
/* update out-of-gamut icon */
gtk_widget_set_sensitive (_box_outofgamut, false);
if (color.icc){
- BYTE outofgamut;
- cmsSetAlarmCodes(255, 255, 255);
+ BYTE outofgamut = 0;
static cmsHPROFILE hNULL = cmsCreateNULLProfile();
static cmsHPROFILE hsRGB = cmsCreate_sRGBProfile();
- cmsHTRANSFORM trans;
Inkscape::ColorProfile* target_profile = SP_ACTIVE_DOCUMENT->profileManager->find(color.icc->colorProfile.c_str());
if ( target_profile ) {
- trans = cmsCreateProofingTransform(hsRGB, TYPE_RGB_DBL, hNULL, TYPE_GRAY_8, target_profile->profHandle,
+ cmsHTRANSFORM trans = cmsCreateProofingTransform(hsRGB, TYPE_RGBA_8, hNULL, TYPE_GRAY_8, target_profile->profHandle,
INTENT_RELATIVE_COLORIMETRIC, INTENT_RELATIVE_COLORIMETRIC, (cmsFLAGS_GAMUTCHECK|cmsFLAGS_SOFTPROOFING));
if ( trans ) {
SP_RGBA32_B_U(val),
255};
+ int alarm_r, alarm_g, alarm_b;
+ cmsGetAlarmCodes(&alarm_r, &alarm_g, &alarm_b);
+ cmsSetAlarmCodes(255, 255, 255);
cmsDoTransform(trans, &check_color, &outofgamut, 1);
+ cmsSetAlarmCodes(alarm_r, alarm_g, alarm_b);
gtk_widget_set_sensitive (_box_outofgamut, outofgamut == 255);
}
}