[babl] babl: make TRCs internal API



commit 4ce561ac02a11f8190f7c3a4092091d55d4873f1
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Sep 3 18:27:49 2017 +0200

    babl: make TRCs internal API

 babl/babl-internal.h |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 babl/babl.h          |   53 +------------------------------------------------
 2 files changed, 55 insertions(+), 52 deletions(-)
---
diff --git a/babl/babl-internal.h b/babl/babl-internal.h
index ca65279..fcdfe16 100644
--- a/babl/babl-internal.h
+++ b/babl/babl-internal.h
@@ -370,4 +370,58 @@ const Babl *babl_space_match_trc_matrix (const Babl *trc_red,
                                          float gx, float gy, float gz,
                                          float bx, float by, float bz);
 
+/**
+ * babl_space_from_chromaticities:
+ *
+ * Creates a new babl-space/ RGB matrix color space definition with the
+ * specified CIE xy(Y) values for white point: wx, wy and primary
+ * chromaticities: rx,ry,gx,gy,bx,by and TRCs to be used. After registering a
+ * new babl-space it can be used with babl_space() passing its name;
+ *
+ * Internally this does the math to derive the RGBXYZ matrix as used in an ICC
+ * profile.
+ */
+const Babl * babl_space_from_chromaticities (const char *name,
+                                             double wx, double wy,
+                                             double rx, double ry,
+                                             double gx, double gy,
+                                             double bx, double by,
+                                             const Babl *trc_red,
+                                             const Babl *trc_green,
+                                             const Babl *trc_blue);
+
+/**
+ * babl_space_from_rgbxyz_matrix:
+ *
+ * Creates a new RGB matrix color space definition using a precomputed D50
+ * adapted 3x3 matrix and associated CIE XYZ whitepoint, as possibly read from
+ * an ICC profile.
+ */
+const Babl *
+babl_space_from_rgbxyz_matrix (const char *name,
+                               double wx, double wy, double wz,
+                               double rx, double gx, double bx,
+                               double ry, double gy, double by,
+                               double rz, double gz, double bz,
+                               const Babl *trc_red,
+                               const Babl *trc_green,
+                               const Babl *trc_blue);
+
+/**
+ * babl_trc_gamma:
+ *
+ * Creates a Babl TRC for a specific gamma value, it will be given
+ * a name that is a short string representation of the value.
+ */
+const Babl * babl_trc_gamma (double gamma);
+
+/**
+ * babl_trc:
+ *
+ * Look up a TRC by name, "sRGB" "1.0" "linear" and "2.2" are recognized
+ * strings in a stock babl configuration.
+ */
+const Babl * babl_trc       (const char *name);
+
+
 #endif
diff --git a/babl/babl.h b/babl/babl.h
index 01431a0..98f49a9 100644
--- a/babl/babl.h
+++ b/babl/babl.h
@@ -80,68 +80,17 @@ const Babl * babl_component (const char *name);
  */
 const Babl * babl_model     (const char *name);
 
-/**
- * babl_trc:
- *
- * Look up a TRC by name, "sRGB" "1.0" "linear" and "2.2" are recognized
- * strings in a stock babl configuration.
- */
-const Babl * babl_trc       (const char *name);
-
-/**
- * babl_trc_gamma:
- *
- * Creates a Babl TRC for a specific gamma value, it will be given
- * a name that is a short string representation of the value.
- */
-const Babl * babl_trc_gamma (double gamma);
 
 /**
  * babl_space:
  *
  * Returns the babl object representing the specific RGB matrix color
  * working space referred to by name. Babl knows of:
- *    sRGB, Adobe, Apple and ProPhoto
+ *    sRGB, Rec2020, Adobe, Apple and ProPhoto, Widegamut
  */
 const Babl * babl_space (const char *name);
 
 /**
- * babl_space_from_chromaticities:
- *
- * Creates a new babl-space/ RGB matrix color space definition with the
- * specified CIE xy(Y) values for white point: wx, wy and primary
- * chromaticities: rx,ry,gx,gy,bx,by and TRCs to be used. After registering a
- * new babl-space it can be used with babl_space() passing its name;
- *
- * Internally this does the math to derive the RGBXYZ matrix as used in an ICC
- * profile.
- */
-const Babl * babl_space_from_chromaticities (const char *name,
-                                             double wx, double wy,
-                                             double rx, double ry,
-                                             double gx, double gy,
-                                             double bx, double by,
-                                             const Babl *trc_red,
-                                             const Babl *trc_green,
-                                             const Babl *trc_blue);
-
-/**
- * babl_space_from_rgbxyz_matrix:
- *
- * Creates a new RGB matrix color space definition using a precomputed D50
- * adapted 3x3 matrix and associated CIE XYZ whitepoint, as possibly read from
- * an ICC profile.
- */
-const Babl *
-babl_space_from_rgbxyz_matrix (const char *name,
-                               double wx, double wy, double wz,
-                               double rx, double gx, double bx,
-                               double ry, double gy, double by,
-                               double rz, double gz, double bz,
-                               const Babl *trc_red,
-                               const Babl *trc_green,
-                               const Babl *trc_blue);
-/**
  * babl_space_from_icc:
  *
  * @icc_data: pointer to icc profile in memory


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