From 7508e009c6b9232379789d8f9bf9342430801734 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 24 Mar 2013 21:19:07 +0000 Subject: Remove linearisation from low-valued pixels in XYZ to sRGB LUT. --- src/xyz_srgb_lut.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/xyz_srgb_lut.cc b/src/xyz_srgb_lut.cc index 3d207195..eb443a59 100644 --- a/src/xyz_srgb_lut.cc +++ b/src/xyz_srgb_lut.cc @@ -13,11 +13,15 @@ XYZsRGBLUT::XYZsRGBLUT(int bits, float gamma) for (int i = 0; i < bit_length; ++i) { float v = float(i) / (bit_length - 1); +#if 0 if (v < (0.04045 / 12.92)) { v *= 12.92; } else { +#endif v = (1.055 * pow (v, (1 / gamma))) - 0.055; +#if 0 } +#endif _lut[i] = int(v * 255); } -- cgit v1.2.3