[babl] add some standard u32 based formats



commit c0c379e5cebb50bfae3010f4f9e0d9a4bed87af4
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Tue May 1 02:34:18 2012 +0200

    add some standard u32 based formats

 babl/base/model-gray.c |   39 ++++++++++++++++++++++++++++++----
 babl/base/model-rgb.c  |   53 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 5 deletions(-)
---
diff --git a/babl/base/model-gray.c b/babl/base/model-gray.c
index 1101393..057c831 100644
--- a/babl/base/model-gray.c
+++ b/babl/base/model-gray.c
@@ -597,37 +597,66 @@ formats (void)
     babl_component_from_id (BABL_LUMINANCE),
     babl_component_from_id (BABL_ALPHA),
     NULL);
-
   babl_format_new (
     babl_model_from_id (BABL_GRAY_ALPHA_PREMULTIPLIED),
     babl_type_from_id (BABL_HALF),
     babl_component_from_id (BABL_LUMINANCE_MUL_ALPHA),
     babl_component_from_id (BABL_ALPHA),
     NULL);
-
   babl_format_new (
     babl_model_from_id (BABL_GRAY),
     babl_type_from_id (BABL_HALF),
     babl_component_from_id (BABL_LUMINANCE),
     NULL);
-
   babl_format_new (
     babl_model_from_id (BABL_GRAY_GAMMA_2_2_ALPHA),
     babl_type_from_id (BABL_HALF),
     babl_component_from_id (BABL_LUMA),
     babl_component_from_id (BABL_ALPHA),
     NULL);
-
   babl_format_new (
     babl_model_from_id (BABL_GRAY_GAMMA_2_2_ALPHA_PREMULTIPLIED),
     babl_type_from_id (BABL_HALF),
     babl_component_from_id (BABL_LUMA_MUL_ALPHA),
     babl_component_from_id (BABL_ALPHA),
     NULL);
-
   babl_format_new (
     babl_model_from_id (BABL_GRAY_GAMMA_2_2),
     babl_type_from_id (BABL_HALF),
     babl_component_from_id (BABL_LUMA),
     NULL);
+  babl_format_new (
+    babl_model_from_id (BABL_GRAY_ALPHA),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_LUMINANCE),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+  babl_format_new (
+    babl_model_from_id (BABL_GRAY_ALPHA_PREMULTIPLIED),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_LUMINANCE_MUL_ALPHA),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+  babl_format_new (
+    babl_model_from_id (BABL_GRAY),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_LUMINANCE),
+    NULL);
+  babl_format_new (
+    babl_model_from_id (BABL_GRAY_GAMMA_2_2_ALPHA),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_LUMA),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+  babl_format_new (
+    babl_model_from_id (BABL_GRAY_GAMMA_2_2_ALPHA_PREMULTIPLIED),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_LUMA_MUL_ALPHA),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+  babl_format_new (
+    babl_model_from_id (BABL_GRAY_GAMMA_2_2),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_LUMA),
+    NULL);
 }
diff --git a/babl/base/model-rgb.c b/babl/base/model-rgb.c
index 0f4e751..2d72343 100644
--- a/babl/base/model-rgb.c
+++ b/babl/base/model-rgb.c
@@ -570,6 +570,59 @@ formats (void)
     babl_component_from_id (BABL_ALPHA),
     NULL);
 
+
+  babl_format_new (
+    babl_model_from_id (BABL_RGB),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_RED),
+    babl_component_from_id (BABL_GREEN),
+    babl_component_from_id (BABL_BLUE),
+    NULL);
+
+  babl_format_new (
+    babl_model_from_id (BABL_RGBA),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_RED),
+    babl_component_from_id (BABL_GREEN),
+    babl_component_from_id (BABL_BLUE),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+
+  babl_format_new (
+    babl_model_from_id (BABL_RGBA_PREMULTIPLIED),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_RED_MUL_ALPHA),
+    babl_component_from_id (BABL_GREEN_MUL_ALPHA),
+    babl_component_from_id (BABL_BLUE_MUL_ALPHA),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+
+  babl_format_new (
+    babl_model_from_id (BABL_RGB_GAMMA_2_2),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_RED_GAMMA_2_2),
+    babl_component_from_id (BABL_GREEN_GAMMA_2_2),
+    babl_component_from_id (BABL_BLUE_GAMMA_2_2),
+    NULL);
+
+  babl_format_new (
+    babl_model_from_id (BABL_RGBA_GAMMA_2_2),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_RED_GAMMA_2_2),
+    babl_component_from_id (BABL_GREEN_GAMMA_2_2),
+    babl_component_from_id (BABL_BLUE_GAMMA_2_2),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+
+  babl_format_new (
+    babl_model_from_id (BABL_RGBA_GAMMA_2_2_PREMULTIPLIED),
+    babl_type_from_id (BABL_U32),
+    babl_component_from_id (BABL_RED_GAMMA_2_2_MUL_ALPHA),
+    babl_component_from_id (BABL_GREEN_GAMMA_2_2_MUL_ALPHA),
+    babl_component_from_id (BABL_BLUE_GAMMA_2_2_MUL_ALPHA),
+    babl_component_from_id (BABL_ALPHA),
+    NULL);
+
 #ifdef XXXX
   babl_format_new (
     "id", BABL_RGB565,



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