[gimp/metadata-browser] app: keep the projection around in the image's layer format



commit ac1bc30a84ac14cd2a9ffbf7fdd9b850b7196d4e
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jul 30 16:00:02 2012 +0200

    app: keep the projection around in the image's layer format
    
    so it's not always 8 bit and can be used to copy real data from in all
    precisions.

 app/core/gimpimage.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index c1e803d..be079a9 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1270,20 +1270,12 @@ gimp_image_get_proj_format (GimpProjectable *projectable)
     {
     case GIMP_RGB:
     case GIMP_INDEXED:
-#if 0
-      /* XXX use real format once the legacy projection is gone */
-      return gimp_image_get_format (image, GIMP_RGB, GIMP_PRECISION_U8, TRUE);
-#else
-      return babl_format ("R'G'B'A u8");
-#endif
+      return gimp_image_get_format (image, GIMP_RGB,
+                                    gimp_image_get_precision (image), TRUE);
 
     case GIMP_GRAY:
-#if 0
-      /* XXX use real format once the legacy projection is gone */
-      return gimp_image_get_format (image, GIMP_GRAY, GIMP_PRECISION_U8, TRUE);
-#else
-      return babl_format ("Y'A u8");
-#endif
+      return gimp_image_get_format (image, GIMP_GRAY,
+                                    gimp_image_get_precision (image), TRUE);
     }
 
   g_assert_not_reached ();



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