#include <math.h>
-#if defined( macintosh )
-const float system_gamma = 1.4;
-
-#elif defined (sgi)
+#if defined (sgi)
const float system_gamma = 2.0/1.7;
#else // others
color[0] = pow(color[0], tmp);
color[1] = pow(color[1], tmp);
color[2] = pow(color[2], tmp);
-};
+}
inline void gamma_correct_c(float *color,
float reff = 2.5, float system = system_gamma)
return;
*color = pow(*color, reff/system);
-};
+}
inline void gamma_restore_rgb(float *color,
float reff = 2.5, float system = system_gamma)
color[0] = pow(color[0], tmp);
color[1] = pow(color[1], tmp);
color[2] = pow(color[2], tmp);
-};
+}
inline void gamma_restore_c(float *color,
float reff = 2.5, float system = system_gamma)
return;
*color = pow(*color, system/reff);
-};
+}
#endif // _SG_COLORS_HXX