[gimp] plug-ins: get rid of babl_format() in file-heif too.



commit fb3007edeff7120000b5c030b5b8b40c07d09713
Author: Jehan <jehan girinstud io>
Date:   Wed Jul 17 14:21:23 2019 +0200

    plug-ins: get rid of babl_format() in file-heif too.

 plug-ins/common/file-heif.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c
index 26588bbb71..67cc6a65b8 100644
--- a/plug-ins/common/file-heif.c
+++ b/plug-ins/common/file-heif.c
@@ -691,6 +691,7 @@ save_image (GFile             *file,
   struct heif_error         err;
   GOutputStream            *output;
   GeglBuffer               *buffer;
+  const gchar              *encoding;
   const Babl               *format;
   const Babl               *space   = NULL;
   guint8                   *data;
@@ -779,18 +780,18 @@ save_image (GFile             *file,
   if (has_alpha)
     {
       if (out_linear)
-        format = babl_format ("RGBA u8");
+        encoding = "RGBA u8";
       else
-        format = babl_format ("R'G'B'A u8");
+        encoding = "R'G'B'A u8";
     }
   else
     {
       if (out_linear)
-        format = babl_format ("RGB u8");
+        encoding = "RGB u8";
       else
-        format = babl_format ("R'G'B' u8");
+        encoding = "R'G'B' u8";
     }
-  format = babl_format_with_space (babl_format_get_encoding (format), space);
+  format = babl_format_with_space (encoding, space);
 
   gegl_buffer_get (buffer,
                    GEGL_RECTANGLE (0, 0, width, height),


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