[gimp] app: gimp:grow propagate babl space
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: gimp:grow propagate babl space
- Date: Fri, 6 Jul 2018 12:54:20 +0000 (UTC)
commit 045328c88908cc84657d0b7b057ea0dd1c024ffb
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Jul 6 14:53:16 2018 +0200
app: gimp:grow propagate babl space
app/operations/gimpoperationgrow.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/app/operations/gimpoperationgrow.c b/app/operations/gimpoperationgrow.c
index 1e3b79d8a6..5ec2d2ccaf 100644
--- a/app/operations/gimpoperationgrow.c
+++ b/app/operations/gimpoperationgrow.c
@@ -167,8 +167,9 @@ gimp_operation_grow_set_property (GObject *object,
static void
gimp_operation_grow_prepare (GeglOperation *operation)
{
- gegl_operation_set_format (operation, "input", babl_format ("Y float"));
- gegl_operation_set_format (operation, "output", babl_format ("Y float"));
+ const Babl *space = gegl_operation_get_source_space (operation, "input");
+ gegl_operation_set_format (operation, "input", babl_format_with_space ("Y float", space));
+ gegl_operation_set_format (operation, "output", babl_format_with_space ("Y float", space));
}
static GeglRectangle
@@ -235,8 +236,8 @@ gimp_operation_grow_process (GeglOperation *operation,
* Blame all bugs in this function on jaycox gimp org
*/
GimpOperationGrow *self = GIMP_OPERATION_GROW (operation);
- const Babl *input_format = babl_format ("Y float");
- const Babl *output_format = babl_format ("Y float");
+ const Babl *input_format = gegl_operation_get_format (operation, "input");
+ const Babl *output_format = gegl_operation_get_format (operation, "output");
gint32 i, j, x, y;
gfloat **buf; /* caches the region's pixel data */
gfloat *out; /* holds the new scan line we are computing */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]