[gimp] Bug 662739 - Port to lcms2 for icc V4 profile support
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 662739 - Port to lcms2 for icc V4 profile support
- Date: Wed, 24 Oct 2012 16:21:54 +0000 (UTC)
commit 2d6a880b12214e38731a10fbc4dba28f256a5fa3
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 24 18:19:33 2012 +0200
Bug 662739 - Port to lcms2 for icc V4 profile support
Apply patch from Laurent Martelli which multiplies the out-of-gammut
color components by 256 to match the new 16 bit lcms data type.
modules/display-filter-lcms.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/modules/display-filter-lcms.c b/modules/display-filter-lcms.c
index 7e4f584..ab047c4 100644
--- a/modules/display-filter-lcms.c
+++ b/modules/display-filter-lcms.c
@@ -367,7 +367,7 @@ cdisplay_lcms_changed (GimpColorDisplay *display)
cmsHPROFILE dest_profile = NULL;
cmsHPROFILE proof_profile = NULL;
cmsUInt32Number flags = 0;
- cmsUInt16Number alarmCodes[cmsMAXCHANNELS] = { 0 };
+ cmsUInt16Number alarmCodes[cmsMAXCHANNELS] = { 0, };
if (lcms->transform)
{
@@ -402,10 +402,10 @@ cdisplay_lcms_changed (GimpColorDisplay *display)
if (proof_profile)
{
if (! src_profile)
- src_profile = cmsCreate_sRGBProfile ();
+ src_profile = cmsCreate_sRGBProfile ();
if (! dest_profile)
- dest_profile = cmsCreate_sRGBProfile ();
+ dest_profile = cmsCreate_sRGBProfile ();
flags |= cmsFLAGS_SOFTPROOFING;
@@ -417,9 +417,9 @@ cdisplay_lcms_changed (GimpColorDisplay *display)
gimp_rgb_get_uchar (&config->out_of_gamut_color, &r, &g, &b);
- alarmCodes[0] = (cmsUInt16Number) r;
- alarmCodes[1] = (cmsUInt16Number) g;
- alarmCodes[2] = (cmsUInt16Number) b;
+ alarmCodes[0] = (cmsUInt16Number) r * 256;
+ alarmCodes[1] = (cmsUInt16Number) g * 256;
+ alarmCodes[2] = (cmsUInt16Number) b * 256;
cmsSetAlarmCodes (alarmCodes);
}
@@ -435,10 +435,10 @@ cdisplay_lcms_changed (GimpColorDisplay *display)
else if (src_profile || dest_profile)
{
if (! src_profile)
- src_profile = cmsCreate_sRGBProfile ();
+ src_profile = cmsCreate_sRGBProfile ();
if (! dest_profile)
- dest_profile = cmsCreate_sRGBProfile ();
+ dest_profile = cmsCreate_sRGBProfile ();
lcms->transform = cmsCreateTransform (src_profile, TYPE_ARGB_8,
dest_profile, TYPE_ARGB_8,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]