下面是源码
unit main;
interface
uses
Messages, SysUtils, Variants, Classes, ImgList, Controls, ComCtrls,
ExtCtrls, StdCtrls,dialogs,forms,windows, jpeg,Graphics;
type
Tf = class(TForm)
Button1: TButton;
Image1: TImage;
procedure Button1Click(Sender: TObject);
private
public
published
end;
var
f: Tf;
implementation
{$R *.dfm}
{$R WindowsXP.res}
procedure Tf.Button1Click(Sender: TObject);
begin
Canvas.StretchDraw(Rect(0,0,Width,Height),image1.Picture.Graphic);
end;
end.
/////////////////////////////////////////
TGraphic接受任意图像