[gimp/metadata-browser] app: use the mask's actual format instead of	always float in GimpMaskUndo
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gimp/metadata-browser] app: use the mask's actual format instead of	always float in GimpMaskUndo
- Date: Wed, 12 Sep 2012 23:56:08 +0000 (UTC)
commit 2776d825cf3ce7fc7454e95816b12eee9db08894
Author: Michael Natterer <mitch gimp org>
Date:   Tue Apr 24 14:18:31 2012 +0200
    app: use the mask's actual format instead of always float in GimpMaskUndo
 app/core/gimpmaskundo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimpmaskundo.c b/app/core/gimpmaskundo.c
index 32bc4ce..24962e1 100644
--- a/app/core/gimpmaskundo.c
+++ b/app/core/gimpmaskundo.c
@@ -85,7 +85,7 @@ gimp_mask_undo_constructed (GObject *object)
 
       mask_undo->buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0,
                                                            x2 - x1, y2 - y1),
-                                           babl_format ("Y float"));
+                                           gimp_drawable_get_format (drawable));
 
       gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
                         GEGL_RECTANGLE (x1, y1, x2 - x1, y2 - y1),
@@ -128,7 +128,7 @@ gimp_mask_undo_pop (GimpUndo            *undo,
   if (gimp_channel_bounds (channel, &x1, &y1, &x2, &y2))
     {
       new_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, x2 - x1, y2 - y1),
-                                    babl_format ("Y float"));
+                                    gimp_drawable_get_format (drawable));
 
       gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
                         GEGL_RECTANGLE (x1, y1, x2 - x1, y2 - y1),
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]