unit Unit1;
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, AspTlb, Project2_TLB, StdVcl,TMultiP, Buttons, Dll96v1, Dllsp96, StdCtrls,Forms;
type
TIMG = class(TASPObject, IIMG)
protected
procedure OnEndPage
safecall;
procedure OnStartPage(const AScriptingContext: IUnknown)
safecall;
procedure ReSize
safecall;
end;
implementation
uses ComServ;
procedure TIMG.OnEndPage;
begin
inherited OnEndPage;
end;
procedure TIMG.OnStartPage(const AScriptingContext: IUnknown);
begin
inherited OnStartPage(AScriptingContext);
end;
procedure TIMG.ReSize;
var PMultiImage1:TPMultiImage;
begin
PMultiImage1:=TPMultiImage.Create(Application);
PMultiImage1.Parent:=self;
PMultiImage1.ImageName:='d:/aa.jpg';
PMultiImage1.SaveAsBMP('d:/A.bmp');
PMultiImage1.Free;
end;
initialization
TAutoObjectFactory.Create(ComServer, TIMG, Class_IMG,
ciMultiInstance, tmApartment);
end.
谢谢lclking:
到了 PMultiImage1:=TPMultiImage.Create(Application);这句就过不去了
我想做的是写个Com(在ASP里用),可以读出一幅图的长宽,并且可以缩放该图。
或者有什么更好的办法