[gimp] app: also port gimp_channel_convert() to apply_operation_to_buffer()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: also port gimp_channel_convert() to apply_operation_to_buffer()
- Date: Wed, 2 May 2012 16:06:53 +0000 (UTC)
commit cfd94be627cb981a3d17f7027ce1a0061ead6760
Author: Michael Natterer <mitch gimp org>
Date: Sun Mar 18 16:39:24 2012 +0100
app: also port gimp_channel_convert() to apply_operation_to_buffer()
app/core/gimpchannel.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index d66429f..18e5494 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -461,6 +461,7 @@ gimp_channel_convert (GimpItem *item,
{
GeglNode *flatten;
TileManager *new_tiles;
+ GeglBuffer *buffer;
GimpRGB background;
new_tiles = tile_manager_new (gimp_item_get_width (item),
@@ -470,10 +471,15 @@ gimp_channel_convert (GimpItem *item,
gimp_rgba_set (&background, 0.0, 0.0, 0.0, 0.0);
flatten = gimp_gegl_create_flatten_node (&background);
- gimp_drawable_apply_operation_to_tiles (drawable, NULL, NULL,
- flatten, TRUE, new_tiles);
+ buffer = gimp_tile_manager_create_buffer (new_tiles,
+ gimp_drawable_get_format_without_alpha (drawable),
+ TRUE);
+
+ gimp_drawable_apply_operation_to_buffer (drawable, NULL, NULL,
+ flatten, TRUE, buffer);
g_object_unref (flatten);
+ g_object_unref (buffer);
gimp_drawable_set_tiles_full (drawable, FALSE, NULL,
new_tiles, GIMP_GRAY_IMAGE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]