呵呵, 就是s的问题
改写一下.
var
WebModule1: TWebModule1;
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest
Response: TWebResponse
var Handled: Boolean);
var
S: TMemoryStream;
sCode, sKind, sSize: string;
Kind, Size: integer;
begin
s:=tmemorystream.create;
try
s.LoadFromFile( 'c:/Circles.bmp' );
S.Position := 0;
Response.ContentType := 'image/bmp';
Response.ContentStream := S;
except
Response.contenttype:='text/html';
response.content:='some error occured';
finally
s.Free;
end;
end;