[gegl] channel-mixer: operate on linear RGB, remove clipping
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] channel-mixer: operate on linear RGB, remove clipping
- Date: Mon, 19 Oct 2015 18:50:45 +0000 (UTC)
commit d2c672dc169016085972ce87c9a2ce018811aad8
Author: Elle Stone <ellestone ninedegreesbelow com>
Date: Mon Oct 19 09:51:42 2015 -0400
channel-mixer: operate on linear RGB, remove clipping
To avoid hue/luminance shifts, and get radiometrically correct results.
operations/common/channel-mixer.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/operations/common/channel-mixer.c b/operations/common/channel-mixer.c
index 272680f..27dc660 100644
--- a/operations/common/channel-mixer.c
+++ b/operations/common/channel-mixer.c
@@ -130,12 +130,12 @@ static void prepare (GeglOperation *operation)
if (input_format == NULL || babl_format_has_alpha (input_format))
{
mix->has_alpha = TRUE;
- format = babl_format ("R'G'B'A float");
+ format = babl_format ("RGBA float");
}
else
{
mix->has_alpha = FALSE;
- format = babl_format ("R'G'B' float");
+ format = babl_format ("RGB float");
}
gegl_operation_set_format (operation, "input", format);
@@ -179,7 +179,7 @@ cm_mix_pixel (CmChannelType *ch,
c *= norm;
- return (gfloat) MIN(1, MAX(0, c));
+ return (gfloat) c;
}
static inline void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]