procedure Sepia ( Bitmap:TBitmap;depth:byte);
var
Row:^TRGBTriple;
H,V:Integer;
begin
Bitmap.PixelFormat:=pf24bit;
for V:=0 to Bitmap.Height-1 do
begin
Row:=Bitmap.ScanLine[V];
for H:=0 to Bitmap.Width -1 do
begin
Row.rgbtBlue :=(Row.rgbtBlue +Row.rgbtGreen +Row.rgbtRed)div 3;
Row.rgbtGreen:=Row.rgbtBlue;
Row.rgbtRed :=Row.rgbtBlue;
inc(Row.rgbtRed,depth*2); //dodane wartosci
inc(Row.rgbtGreen,depth);
if Row.rgbtRed < (depth*2) then Row.rgbtRed:=255;
if Row.rgbtGreen < (depth) then Row.rgbtGreen:=255;
inc(Row);
end;
end;
end;