The conversion from float to char (byte) was not correct. It should include
the possibility for colors like 0.999999 to become 255 still. The correct
multiplication factor I don't know though... and this should become a system
wide definition!
This commit is contained in:
2007-09-02 16:34:02 +00:00
parent 0caf8e477f
commit 22c23fb04f

View File

@@ -174,7 +174,7 @@ void IMB_gamwarp(struct ImBuf *ibuf, double gamma)
}
}
#define FTOCHAR(val) val<=0.0f?0: (val>=1.0f?255: (char)(255.0f*val))
#define FTOCHAR(val) val<=0.0f?0: (val>=1.0f?255: (char)(255.99f*val))
void IMB_rect_from_float(struct ImBuf *ibuf)
{