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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue