核心提示:procedure Dark24Bitmap(var B : TBitmap;N : integer);var i,j : integer; pB : PByteArray; Count: Integ...
procedure Dark24Bitmap(var B : TBitmap;N : integer);var
i,j : integer;
pB : PByteArray;
Count: Integer;
begin
i := Integer(B.PixelFormat);
if i < 4 then
i := 4
else if i = 4 then
inc(i);
Count := (i - 3) * B.Width - 1;
for i:=0 to B.Height-1 do
begin
pb:=B.ScanLine[i];
for j:=0 to Count do
if pb[j]<n then pb[j]:=0 else dec(pb[j],n);
end;
end;