

{ガンマ値のテーブル}
for i := 0 to 255 do
gTBL[i] := Round(255 * Power(i/255,gamma));
for i := 0 to Bitmap.Height -1 do
begin
P := Bitmap.ScanLine[i];
for j := 0 to Bitmap.Width - 1 do
begin
P[j].B := gTBL[P[j].B];
P[j].G := gTBL[P[j].G];
P[j].R := gTBL[P[j].R];
end;
end;