[gimp] Bug 694679 - lcms plug-in half-floating point support
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 694679 - lcms plug-in half-floating point support
- Date: Tue, 26 Feb 2013 08:13:50 +0000 (UTC)
commit ceebfe5d01b2642b9c6333f41f3e40632837becb
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]