[gegl] panorama-projection: propagate BablSpace
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] panorama-projection: propagate BablSpace
- Date: Thu, 5 Jul 2018 20:11:55 +0000 (UTC)
commit f5e4e01f5a18be9869ec540f7b01d618dd5dac79
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Jul 5 22:11:21 2018 +0200
panorama-projection: propagate BablSpace
operations/common/panorama-projection.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/operations/common/panorama-projection.c b/operations/common/panorama-projection.c
index da9ae1f3f..74c357771 100644
--- a/operations/common/panorama-projection.c
+++ b/operations/common/panorama-projection.c
@@ -250,12 +250,13 @@ static void prepare_transform (Transform *transform,
static void
prepare (GeglOperation *operation)
{
+ const Babl *space = gegl_operation_get_source_space (operation, "input");
GeglProperties *o = GEGL_PROPERTIES (operation);
const Babl *format;
if (o->sampler_type == GEGL_SAMPLER_NEAREST)
- format = babl_format ("RGBA float");
+ format = babl_format_with_space ("RGBA float", space);
else
- format = babl_format ("RaGaBaA float");
+ format = babl_format_with_space ("RaGaBaA float", space);
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "output", format);
@@ -329,7 +330,7 @@ process (GeglOperation *operation,
GeglMatrix2 scale_matrix;
GeglMatrix2 *scale = NULL;
gint sampler_type = o->sampler_type;
- const Babl *format_io = babl_format ("RaGaBaA float");
+ const Babl *format_io = gegl_operation_get_format (operation, "output");
GeglSamplerGetFun getfun;
level = 0;
@@ -352,8 +353,6 @@ process (GeglOperation *operation,
/* skip the computation of sampler neighborhood scale matrix in cases where
* we are unlikely to be scaling down */
scale = &scale_matrix;
- else
- format_io = babl_format ("RGBA float");
sampler = gegl_buffer_sampler_new_at_level (input, format_io, sampler_type, 0);
getfun = gegl_sampler_get_fun (sampler);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]