图像处理(50分)

  • 主题发起人 主题发起人 jjy_888
  • 开始时间 开始时间
J

jjy_888

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大虾:
如何载入多个图像,并可以在image上显示出来。
 
Image.Picture.LoadFromFile(位图路径名);//加载一幅位图

Image.Canvas.Draw(x,y,位图);//根据起点坐标的不同,加载多幅位图
 
接受答案了.
 
你是想让多个图像同时显示在一个image上?
 
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Image1: TImage;
Image2: TImage;
OpenDialog1: TOpenDialog;
Button2: TButton;
edtx: TEdit;
edty: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
Image1.Transparent :=true; //
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Canvas.Draw(StrToInt(edtx.text),StrToInt(edty.text),Image2.Picture.Graphic);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog1.Execute then
Image2.Picture.LoadFromFile(OpenDialog1.FileName);
end;
end.
 
to 小人物
是的.
 
后退
顶部