Saturation
procedure Saturation(var Bitmap: TBitmap; Amount: Integer); var Wsk:^TRGBTriple; Gray,H,V: Integer; begin for V:=0 to Bitmap.Height-1 do begin Wsk:=Bitmap.ScanLine[V]; for H:=0 to Bitmap.Width-1 do begin Gray:=(Wsk.rgbtBlue+Wsk.rgbtGreen+Wsk.rgbtRed)div 3; Wsk.rgbtRed:=IntToByte(Gray+(((Wsk.rgbtRed-Gray)*Amount)div 255)); Wsk.rgbtGreen:=IntToByte(Gray+(((Wsk.rgbtGreen-Gray)*Amount)div 255)); Wsk.rgbtBlue:=IntToByte(Gray+(((Wsk.rgbtBlue-Gray)*Amount)div 255)); inc(Wsk); end; end; end;