Commit 98272178 authored by Téo Mazars's avatar Téo Mazars

operations: Make color-to-alpha work on float instead of double.

parent 03163c6b
...@@ -42,9 +42,9 @@ static void ...@@ -42,9 +42,9 @@ static void
prepare (GeglOperation *operation) prepare (GeglOperation *operation)
{ {
gegl_operation_set_format (operation, "input", gegl_operation_set_format (operation, "input",
babl_format ("R'G'B'A double")); babl_format ("R'G'B'A float"));
gegl_operation_set_format (operation, "output", gegl_operation_set_format (operation, "output",
babl_format ("R'G'B'A double")); babl_format ("R'G'B'A float"));
} }
/* /*
...@@ -81,12 +81,12 @@ prepare (GeglOperation *operation) ...@@ -81,12 +81,12 @@ prepare (GeglOperation *operation)
*/ */
static void static void
color_to_alpha (const gdouble *color, color_to_alpha (const gfloat *color,
const gdouble *src, const gfloat *src,
gdouble *dst) gfloat *dst)
{ {
gint i; gint i;
gdouble alpha[4]; gfloat alpha[4];
for (i=0; i<4; i++) for (i=0; i<4; i++)
dst[i] = src[i]; dst[i] = src[i];
...@@ -141,12 +141,12 @@ process (GeglOperation *operation, ...@@ -141,12 +141,12 @@ process (GeglOperation *operation,
gint level) gint level)
{ {
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation); GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
const Babl *format = babl_format ("R'G'B'A double"); const Babl *format = babl_format ("R'G'B'A float");
gdouble color[4]; gfloat color[4];
gint x; gint x;
gdouble *in_buff = in_buf; gfloat *in_buff = in_buf;
gdouble *out_buff = out_buf; gfloat *out_buff = out_buf;
gegl_color_get_pixel (o->color, format, color); 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