Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32_Gamma🞂SetInv_sRGBProcedure

SetInv_sRGB

Populates a custom 256-byte lookup table with inverse sRGB transfer function values (sRGB to linear light).

Declaration ​

pascal
procedure SetInv_sRGB(var GammaTable: TGammaTable8Bit);

Parameters ​

ParameterTypeDescription
GammaTableTGammaTable8BitTarget 256-byte table array to receive inverse sRGB values.

Description ​

SetInv_sRGB populates a custom TGammaTable8Bit array with inverse sRGB (sRGB space to linear light) transfer function values.

Formula ​

For a normalized channel input V=i/255:

GammaTable[i]={Round(255⋅V12.92)if V<0.004045Round(255⋅(V+0.0551.055)2.4)if V≥0.004045

Example ​

pascal
var
  InvSRGBTable: TGammaTable8Bit;
begin
  SetInv_sRGB(InvSRGBTable);
  ApplyCustomGamma(Bitmap, InvSRGBTable);
end;

See also ​