color-to-alpha: default to white

parent 6f2420f3
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment