[gimp] app: fix the (unused) "mask and value" case in GimpOperationSetAlpha
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix the (unused) "mask and value" case in GimpOperationSetAlpha
- Date: Mon, 11 Jun 2012 10:43:16 +0000 (UTC)
commit e13b892c6ea576805cc438a92139fb235c999aea
Author: Michael Natterer <mitch gimp org>
Date: Mon Jun 11 12:41:32 2012 +0200
app: fix the (unused) "mask and value" case in GimpOperationSetAlpha
and operate in linear RGBA, this op doesn't touch the colors anyway.
app/operations/gimpoperationsetalpha.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/operations/gimpoperationsetalpha.c b/app/operations/gimpoperationsetalpha.c
index 15ad8d8..29ae0a7 100644
--- a/app/operations/gimpoperationsetalpha.c
+++ b/app/operations/gimpoperationsetalpha.c
@@ -136,9 +136,9 @@ gimp_operation_set_alpha_set_property (GObject *object,
static void
gimp_operation_set_alpha_prepare (GeglOperation *operation)
{
- gegl_operation_set_format (operation, "input", babl_format ("R'G'B'A float"));
+ gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
gegl_operation_set_format (operation, "aux", babl_format ("Y float"));
- gegl_operation_set_format (operation, "output", babl_format ("R'G'B'A float"));
+ gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
}
static gboolean
@@ -162,9 +162,10 @@ gimp_operation_set_alpha_process (GeglOperation *operation,
dest[RED] = src[RED];
dest[GREEN] = src[GREEN];
dest[BLUE] = src[BLUE];
- dest[ALPHA] = self->value * src[0];
+ dest[ALPHA] = self->value * *aux;
src += 4;
+ aux += 1;
dest += 4;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]