[gimp/goat-invasion: 124/234] app: enable GEGL scaling of indexed drawables in gimp_drawable_scale()
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 124/234] app: enable GEGL scaling of indexed drawables in gimp_drawable_scale()
- Date: Fri, 23 Mar 2012 12:03:49 +0000 (UTC)
commit 0d156e376287d208bec2cbf350d35e8a710bc93b
Author: Michael Natterer <mitch gimp org>
Date: Sun Mar 18 16:33:22 2012 +0100
app: enable GEGL scaling of indexed drawables in gimp_drawable_scale()
by simply using gimp_drawable_apply_operation_to_buffer() and the
right Babl format on the buffer.
app/core/gimpdrawable.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index 7ccc715..e890c82 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -474,10 +474,10 @@ gimp_drawable_scale (GimpItem *item,
#endif
if (gimp_use_gegl (gimp_item_get_image (item)->gimp) &&
- ! gimp_drawable_is_indexed (drawable) &&
interpolation_type != GIMP_INTERPOLATION_LANCZOS)
{
- GeglNode *scale;
+ GeglNode *scale;
+ GeglBuffer *buffer;
scale = g_object_new (GEGL_TYPE_NODE,
"operation", "gegl:scale",
@@ -494,10 +494,15 @@ gimp_drawable_scale (GimpItem *item,
gimp_item_get_height (item)),
NULL);
- gimp_drawable_apply_operation_to_tiles (drawable, progress,
- C_("undo-type", "Scale"),
- scale, TRUE, new_tiles);
+ buffer = gimp_tile_manager_create_buffer (new_tiles,
+ gimp_drawable_get_format (drawable),
+ TRUE);
+
+ gimp_drawable_apply_operation_to_buffer (drawable, progress,
+ C_("undo-type", "Scale"),
+ scale, TRUE, buffer);
g_object_unref (scale);
+ g_object_unref (buffer);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]