[gimp/soc-2011-seamless-clone2] Bug 694679 - lcms plug-in half-floating point support



commit 8b5844aea473d2df884ab5a2d35c00ecd1e6b9d5
Author: Elle Stone <l elle stone gmail com>
Date:   Mon Feb 25 09:55:30 2013 -0500

    Bug 694679 - lcms plug-in half-floating point support
    
    Again, this time in an #ifdef: add support for half-floating point ICC
    profile conversions.

 plug-ins/common/lcms.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c
index ae689d5..094cb6d 100644
--- a/plug-ins/common/lcms.c
+++ b/plug-ins/common/lcms.c
@@ -1019,6 +1019,22 @@ lcms_image_transform_rgb (gint32                    image,
               iter_format = babl_format ("R'G'B' u16");
             }
         }
+#ifdef TYPE_RGB_HALF_FLT
+      /* half float types are only in lcms 2.4 and newer */
+      else if (type == babl_type ("half")) /* 16-bit floating point (half) */
+        {
+          if (has_alpha)
+            {
+              lcms_format = TYPE_RGBA_HALF_FLT;
+              iter_format = babl_format ("R'G'B'A half");
+            }
+          else
+            {
+              lcms_format = TYPE_RGB_HALF_FLT;
+              iter_format = babl_format ("R'G'B' half");
+            }
+        }
+#endif /* TYPE_RGB_HALF_FLT */
       else if (type == babl_type ("float"))
         {
           if (has_alpha)


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