Bugfix #7125
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user