[gegl] operations: Make color-to-alpha work on float instead of double.
- From: Téo Mazars <teom src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations: Make color-to-alpha work on float instead of double.
- Date: Wed, 25 Sep 2013 16:31:07 +0000 (UTC)
commit 98272178e09a7f370fc894ccb50298a3eeb4e204
Author: Téo Mazars <teo mazars ensimag fr>
Date: Wed Sep 25 18:28:04 2013 +0200
operations: Make color-to-alpha work on float instead of double.
operations/common/color-to-alpha.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/operations/common/color-to-alpha.c b/operations/common/color-to-alpha.c
index aae21c4..2d61c24 100644
--- a/operations/common/color-to-alpha.c
+++ b/operations/common/color-to-alpha.c
@@ -42,9 +42,9 @@ static void
prepare (GeglOperation *operation)
{
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",
- babl_format ("R'G'B'A double"));
+ babl_format ("R'G'B'A float"));
}
/*
@@ -81,12 +81,12 @@ prepare (GeglOperation *operation)
*/
static void
-color_to_alpha (const gdouble *color,
- const gdouble *src,
- gdouble *dst)
+color_to_alpha (const gfloat *color,
+ const gfloat *src,
+ gfloat *dst)
{
gint i;
- gdouble alpha[4];
+ gfloat alpha[4];
for (i=0; i<4; i++)
dst[i] = src[i];
@@ -141,12 +141,12 @@ process (GeglOperation *operation,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- const Babl *format = babl_format ("R'G'B'A double");
- gdouble color[4];
+ const Babl *format = babl_format ("R'G'B'A float");
+ gfloat color[4];
gint x;
- gdouble *in_buff = in_buf;
- gdouble *out_buff = out_buf;
+ gfloat *in_buff = in_buf;
+ gfloat *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]