[gegl] load: propagate detected output format from loader on meta-op



commit 4f069229ed08485a67f08df67ae8b627557dbb67
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sat Nov 24 14:30:06 2012 +1100

    load: propagate detected output format from loader on meta-op

 operations/common/load.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/load.c b/operations/common/load.c
index 83240bd..0f0e321 100644
--- a/operations/common/load.c
+++ b/operations/common/load.c
@@ -144,6 +144,16 @@ prepare (GeglOperation *operation)
           self->cached_path = g_strdup (o->path);
         }
     }
+
+  {
+    /* forward the set BablFormat of the image loader on the meta-op itself,
+     * making potential cache buffers be created with the proper format, there
+     * might be cleaner ways of achieving this.
+     */
+    GeglOperation *op;
+    g_object_get (self->load, "gegl-operation", &op, NULL);
+    gegl_operation_set_format (operation, "output", gegl_operation_get_format (op, "output"));
+  }
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]