Skip to content

Commit

Permalink
Added brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Sep 6, 2019
1 parent 27d6fc7 commit 8ffe9a5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/libImaging/Convert.c
Expand Up @@ -698,12 +698,13 @@ i2hsv(UINT8* out, const UINT8* in_, int xsize)
for (x = 0; x < xsize; x++, in++, out+=4) {
out[0] = 0;
out[1] = 0;
if (*in <= 0)
if (*in <= 0) {
out[2] = 0;
else if (*in >= 255)
} else if (*in >= 255) {
out[2] = 255;
else
} else {
out[2] = (UINT8) *in;
}
out[3] = 255;
}
}
Expand Down

0 comments on commit 8ffe9a5

Please sign in to comment.