Adjust calculation of secondary colour for checkerboard pattern in dummy video provider. New calculation produces better results for dark colours, the old calculation produced very high contrast patterns for dark colours.
Originally committed to SVN as r3015.
This commit is contained in:
parent
26ac4e65f8
commit
88a5335004
1 changed files with 2 additions and 1 deletions
|
@ -68,7 +68,8 @@ void DummyVideoProvider::Create(double _fps, int frames, int _width, int _height
|
||||||
|
|
||||||
unsigned char h, s, l, lr, lg, lb; // light variants
|
unsigned char h, s, l, lr, lg, lb; // light variants
|
||||||
rgb_to_hsl(r, g, b, &h, &s, &l);
|
rgb_to_hsl(r, g, b, &h, &s, &l);
|
||||||
l = 255 - (255 - l) / 2;
|
l += 24;
|
||||||
|
if (l < 24) l -= 48;
|
||||||
hsl_to_rgb(h, s, l, &lr, &lg, &lb);
|
hsl_to_rgb(h, s, l, &lr, &lg, &lb);
|
||||||
|
|
||||||
if (pattern) {
|
if (pattern) {
|
||||||
|
|
Loading…
Reference in a new issue