indent rgblinear.c rgblinear.h
This commit is contained in:
parent
85be8b8fff
commit
c7c5a53324
2 changed files with 8 additions and 8 deletions
|
|
@ -33,13 +33,14 @@
|
|||
unsigned char linear_to_sRGB(float linear)
|
||||
{
|
||||
unsigned slot;
|
||||
|
||||
slot = linear * 4096.0 + 0.5;
|
||||
if (slot > 4095)
|
||||
{
|
||||
if (linear > 0.5)
|
||||
slot = 4095;
|
||||
else
|
||||
slot = 0;
|
||||
}
|
||||
{
|
||||
if (linear > 0.5)
|
||||
slot = 4095;
|
||||
else
|
||||
slot = 0;
|
||||
}
|
||||
return linear_to_sRGB_table[slot];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,8 +305,7 @@ static const unsigned char linear_to_sRGB_table[4096] =
|
|||
"\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd"
|
||||
"\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfd\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
|
||||
"\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
|
||||
"\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
|
||||
"\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff" "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
|
||||
|
||||
unsigned char linear_to_sRGB(float linear) FUNCTION;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue