procedure Light24Bitmap(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
begin
if pb[j]>(255-n) then pb[j]:=255 else inc(pb[j],n);
end;
end;
end;
本文为原创文章,转载请注明出处!
admin:支持一下,感谢分享!,+10,