[babl] babl: return the linear TRC when 1.0 is asked for numerically
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: return the linear TRC when 1.0 is asked for numerically
- Date: Sat, 19 Aug 2017 01:54:19 +0000 (UTC)
commit f2581d9c6730f182907699ec3fda5970dd4dd8af
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Aug 19 03:53:16 2017 +0200
babl: return the linear TRC when 1.0 is asked for numerically
babl/babl-trc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl-trc.c b/babl/babl-trc.c
index c1bc107..9f8cb58 100644
--- a/babl/babl-trc.c
+++ b/babl/babl-trc.c
@@ -89,6 +89,8 @@ babl_trc_gamma (double gamma)
{
char name[32];
int i;
+ if (fabs (gamma - 1.0) < 0.0001)
+ return babl_trc_new ("linear", BABL_TRC_LINEAR, 1.0);
sprintf (name, "%.6f", gamma);
for (i = 0; name[i]; i++)
if (name[i] == ',') name[i] = '.';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]