Merge branch 'master' into softproofing

This commit is contained in:
Hombre
2016-08-27 23:52:53 +02:00
12 changed files with 1584 additions and 1312 deletions

View File

@@ -242,6 +242,19 @@ public:
*/
static void rgb2hsv (float r, float g, float b, float &h, float &s, float &v);
static inline float rgb2s(float r, float g, float b) // fast version if only saturation is needed
{
float var_Min = min(r, g, b);
float var_Max = max(r, g, b);
float del_Max = var_Max - var_Min;
if (del_Max < 0.00001f) {
return 0.f;
} else {
return del_Max / var_Max;
}
}
static inline bool rgb2hsvdcp(float r, float g, float b, float &h, float &s, float &v)
{