15 Jul
2019
15 Jul
'19
1:30 a.m.
Gerald Pfeifer <gerald(a)pfeifer.com> wrote:
-/* https://www.w3.org/Graphics/Color/srgb */ -static inline float from_sRGB_component(float f) -{ - if (f <= 0.04045f) return f / 12.92f; - return powf((f + 0.055f) / 1.055f, 2.4f); -} - static inline float to_sRGB_component(float f) { if (f <= 0.0031308f) return 12.92f * f; @@ -98,6 +91,13 @@ static inline float to_sRGB_component(float f) }
#if 0 /* FIXME: enable once needed */ +/* https://www.w3.org/Graphics/Color/srgb */ +static inline float from_sRGB_component(float f) +{ + if (f <= 0.04045f) return f / 12.92f; + return powf((f + 0.055f) / 1.055f, 2.4f); +}
Please leave the comment where it is now, it belongs to all of these helpers, not just the moved one. -- Dmitry.