Rid of macros

This commit is contained in:
JonDeen 2015-06-20 00:05:46 +02:00
parent 92c046e571
commit 517ea286aa
1 changed files with 7 additions and 7 deletions

View File

@ -58,36 +58,36 @@ vips_sRGB2HSV_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width )
float wrap_around_hue, secondary_diff;
#define RED 255.0f;
#define GREEN 85.0f;
#define BLUE 170.0f;
for( i = 0; i < width; i++ ) {
if (p[1] < p[2]) {
if (p[2] < p[0]) {
// Center red (at top)
c_max = p[0];
c_min = p[1];
secondary_diff = p[1] - p[2];
wrap_around_hue = RED;
wrap_around_hue = 255.0f;
} else {
// Center blue
c_max = p[2];
c_min = VIPS_MIN(p[1], p[0]);
secondary_diff = p[0] - p[1];
wrap_around_hue = BLUE;
wrap_around_hue = 170.0f;
}
} else {
if (p[1] < p[0]) {
// Center red (at bottom)
c_max = p[0];
c_min = p[2];
secondary_diff = p[1] - p[2];
wrap_around_hue = 0.0f;
} else {
// Center green
c_max = p[1];
c_min = VIPS_MIN(p[2], p[0]);
secondary_diff = p[2] - p[0];
wrap_around_hue = GREEN;
wrap_around_hue = 85.0f;
}
}