[gegl] color-to-alpha: default to white
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] color-to-alpha: default to white
- Date: Tue, 1 May 2012 02:04:53 +0000 (UTC)
commit 7cba423640ecc3254118c35f8b2f810274bbb2d5
Author: Ãyvind KolÃs <pippin gimp org>
Date: Tue May 1 04:04:35 2012 +0200
color-to-alpha: default to white
operations/common/color-to-alpha.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/operations/common/color-to-alpha.c b/operations/common/color-to-alpha.c
index 0785c52..f55fddb 100644
--- a/operations/common/color-to-alpha.c
+++ b/operations/common/color-to-alpha.c
@@ -25,8 +25,8 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_color (color, _("Color"), "black",
- _("The color to render (defaults to 'black')"))
+gegl_chant_color (color, _("Color"), "white",
+ _("The color to render (defaults to 'white')"))
#else
@@ -40,9 +40,9 @@ gegl_chant_color (color, _("Color"), "black",
static void prepare (GeglOperation *operation)
{
gegl_operation_set_format (operation, "input",
- babl_format ("R'G'B'A float"));
+ babl_format ("R'G'B'A double"));
gegl_operation_set_format (operation, "output",
- babl_format ("R'G'B'A float"));
+ babl_format ("R'G'B'A double"));
}
/*
@@ -79,12 +79,12 @@ static void prepare (GeglOperation *operation)
*/
static void
-color_to_alpha (const gfloat *color,
- const gfloat *src,
- gfloat *dst)
+color_to_alpha (const gdouble *color,
+ const gdouble *src,
+ gdouble *dst)
{
gint i;
- gfloat alpha[4];
+ gdouble alpha[4];
for (i=0; i<4; i++)
dst[i] = src[i];
@@ -139,12 +139,12 @@ process (GeglOperation *operation,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- const Babl *format = babl_format ("R'G'B'A float");
- gfloat color[4];
+ const Babl *format = babl_format ("R'G'B'A double");
+ gdouble color[4];
gint x;
- gfloat *in_buff = in_buf;
- gfloat *out_buff = out_buf;
+ gdouble *in_buff = in_buf;
+ gdouble *out_buff = out_buf;
gegl_color_get_pixel (o->color, format, color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]