核心提示:procedure VertMirror(pBitMap:TBitmap);var bmp1: TBitmap; j: integer; p, p1: pByteArray;begin bmp1 :=...
procedure VertMirror(pBitMap:TBitmap);
var
bmp1: TBitmap;
j: integer;
p, p1: pByteArray;
begin
bmp1 := TBitmap.create;
bmp1.assign(pBitMap);
bmp1.PixelFormat := pf24bit;
for j := 0 to pBitMap.Height - 1 do
begin
p := pBitMap.ScanLine[j];
p1 := Bmp1.ScanLine[pBitMap.Height - 1 - j];
for i := 0 to pBitMap.Width - 1 do
begin
p[3 * i] := p1[3 * i];
p[3 * i + 1] := p1[3 * i + 1];
p[3 * i + 2] := p1[3 * i + 2];
end;
end;
Form1.Image1.picture.bitmap.Assign(pBitMap);
bmp1.free;
end;