![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Create mirror for image
Use Canvas.Pixels for changing your image to image as mirror.
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap: TBitmap;
i, j: Integer;
begin
if OpenDialog1.Execute then
Image1.Picture.LoadFromFile(OpenDialog1.FileName);
Bitmap:=TBitmap.Create;
with Image1 do
begin
Bitmap.Height:=Height;
Bitmap.Width:=Width;
for i:=0 to Width-1 do
for j:=0 to Height-1 do
Bitmap.Canvas.Pixels[Width-i, j]:=Image1.Canvas.Pixels[i,j];
Image2.Picture.Assign(Bitmap);
end;
end;
-
More for developers