[gegl] *-load: update with tweaks to recent babl APIs



commit 3d992dac18a6dba4052b0826b766820241b560b9
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jul 16 18:34:50 2018 +0200

    *-load: update with tweaks to recent babl APIs

 operations/external/exr-load.cpp |  2 +-
 operations/external/jp2-load.c   |  4 ++--
 operations/external/jpg-load.c   |  2 +-
 operations/external/png-load.c   | 18 +++++++++---------
 operations/external/tiff-load.c  |  2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/operations/external/exr-load.cpp b/operations/external/exr-load.cpp
index c46eaa8b6..e3a2538a3 100644
--- a/operations/external/exr-load.cpp
+++ b/operations/external/exr-load.cpp
@@ -555,7 +555,7 @@ query_exr (const gchar *path,
       if (hasChromaticities(file.header()))
       {
         const Chromaticities &c2 = chromaticities (file.header());
-        space = babl_chromaticities_make_space
+        space = babl_space_from_chromaticities
  (NULL, c2.white[0], c2.white[1], c2.red[0], c2.red[1], c2.green[0], c2.green[1], c2.blue[0], c2.blue[1], 
babl_trc ("sRGB"), babl_trc ("sRGB"), babl_trc ("sRGB"), BABL_SPACE_FLAG_EQUALIZE);
       }
 
diff --git a/operations/external/jp2-load.c b/operations/external/jp2-load.c
index b3fa2e50a..c96917cbf 100644
--- a/operations/external/jp2-load.c
+++ b/operations/external/jp2-load.c
@@ -435,12 +435,12 @@ process (GeglOperation       *operation,
           switch (depth)
             {
             case 16:
-              gegl_buffer_set (output, &rect, 0, babl_format ("R'G'B' u16"),
+              gegl_buffer_set (output, &rect, 0, p->format,
                                data_s, GEGL_AUTO_ROWSTRIDE);
               break;
 
             case 8:
-              gegl_buffer_set (output, &rect, 0, babl_format ("R'G'B' u8"),
+              gegl_buffer_set (output, &rect, 0, p->format,
                                data_b, GEGL_AUTO_ROWSTRIDE);
              break;
 
diff --git a/operations/external/jpg-load.c b/operations/external/jpg-load.c
index faa4dfd0b..374a1711a 100644
--- a/operations/external/jpg-load.c
+++ b/operations/external/jpg-load.c
@@ -185,7 +185,7 @@ static const Babl *jpg_get_space (struct jpeg_decompress_struct *cinfo)
   {
     const char *error = NULL;
     const Babl *ret;
-    ret = babl_icc_make_space ((void*)icc_data, icc_len,
+    ret = babl_space_from_icc ((void*)icc_data, icc_len,
                                 BABL_ICC_INTENT_RELATIVE_COLORIMETRIC,
                                 &error);
     free (icc_data);
diff --git a/operations/external/png-load.c b/operations/external/png-load.c
index d71a710b2..72a498ea0 100644
--- a/operations/external/png-load.c
+++ b/operations/external/png-load.c
@@ -171,7 +171,7 @@ gegl_png_space (png_structp load_png_ptr,
       PNG_INFO_iCCP)
     {
       const char *error = NULL;
-      return babl_icc_make_space ((void*)profile, proflen,
+      return babl_space_from_icc ((void*)profile, proflen,
                                  BABL_ICC_INTENT_RELATIVE_COLORIMETRIC, &error);
     }
 
@@ -199,14 +199,14 @@ gegl_png_space (png_structp load_png_ptr,
                      &green[0], &green[1],
                      &blue[0], &blue[1]);
       }
-      return babl_chromaticities_make_space (NULL, wp[0], wp[1],
-                                                   red[0], red[1],
-                                                   green[0], green[1],
-                                                   blue[0], blue[1],
-                                                   babl_trc_gamma (1.0/gamma),
-                                                   babl_trc_gamma (1.0/gamma),
-                                                   babl_trc_gamma (1.0/gamma),
-                                                   1);
+      return babl_space_from_chromaticities (NULL, wp[0], wp[1],
+                                             red[0], red[1],
+                                             green[0], green[1],
+                                             blue[0], blue[1],
+                                             babl_trc_gamma (1.0/gamma),
+                                             babl_trc_gamma (1.0/gamma),
+                                             babl_trc_gamma (1.0/gamma),
+                                             1);
     }
 
   return NULL;
diff --git a/operations/external/tiff-load.c b/operations/external/tiff-load.c
index 6443f2db8..3ebc68d79 100644
--- a/operations/external/tiff-load.c
+++ b/operations/external/tiff-load.c
@@ -504,7 +504,7 @@ query_tiff(GeglOperation *operation)
     if (TIFFGetField (p->tiff, TIFFTAG_ICCPROFILE, &profile_size, &icc_profile))
       {
         const char *error = NULL;
-        space = babl_icc_make_space ((void*)icc_profile, profile_size,
+        space = babl_space_from_icc ((void*)icc_profile, profile_size,
                                      BABL_ICC_INTENT_RELATIVE_COLORIMETRIC, &error);
       }
 


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